Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Fix fsnotify and apimachinery dependency errors #895

Merged
merged 2 commits into from
Mar 30, 2018
Merged

Fix fsnotify and apimachinery dependency errors #895

merged 2 commits into from
Mar 30, 2018

Conversation

johnmccabe
Copy link
Contributor

The currently pinned dependencies have two problems that are highlighted when attempting to vendor new dependencies or reproduce the vendor directory from the Gopkg.lock file (I'd encountered these while investigating building on windows).

  • hpcloud/tail has a transitive dependency to a no-longer existing repo.
  • k8s.io/apimachinery pins to an invalid revision

If you wipe the vendor directory and attempt to reproduce it via dep ensure -v you should see something similar to the following:

(121/126) Wrote github.com/mailru/easyjson@dffba8d
(122/126) Wrote google.golang.org/[email protected]
(123/126) Failed to write gopkg.in/[email protected]
(124/126) Failed to write k8s.io/[email protected]
(125/126) Failed to write k8s.io/[email protected]
grouped write of manifest, lock and vendor: error while writing out vendor tree: failed to write dep tree: failed to export gopkg.in/fsnotify.v1: fatal: failed to unpack tree object 629574ca2a5df945712d3079857300b5e4da0236
: exit status 128

hpcloud/tail/fsnotify fix

This PR pins the hpcloud/tail dependency to the fix in the PR branch for hpcloud/tail#138 which addresses problems due to the fsnotify Github org name changing from go-fsnotify to fsnotify (see go-fsnotify/fsnotify#1).

This change also effectively bumps the vendored hpcloud/tail version to 1.4.7, no impact to CI tests have been observed.

When this upstream PR is merged we can point again at the hpcloud/tail repo.

k8s.io/apimachinery fix

This commit also addresses an issue introduced when migrating the dependencies from Rancher Trash to dep, the dep init used to populate the Gopkg.toml file had interpreted the pinned value for
k8s.io/apimachinery as a revision and not the branch which it pointed to.

The fix involves pinning k8s.io/apimachinery to the release-1.7 branch again in an override.

It should be possible to remove this when moving the k8s.io/kubernetes dependency to a version > 1.7.5 (there is no corresponding 1.7.5 tag on the apimachinery project, the earliest being 1.7.6).

This commit pins the hpcloud/tail dependency to the fix in the PR branch
for hpcloud/tail#138 which addresses problems due to the fsnotify github
org name changing from go-fsnotify to fsnotify
(see go-fsnotify/fsnotify#1).

This change also effectively bumps the vendored hpcloud/tail version to
`1.4.7`, no impact to tests has been observed.

When this upstream PR is merged we can point again at the hpcloud/tail
repo.

This commit also addresses an issue introduced when migrating the
dependencies from Rancher Trash to dep, the `dep init` used to
populate the `Gopkg.toml` file had interpreted the pinned value for
k8s.io/apimachinery as a revision and not the branch which it pointed
to. This then resulted in errors when trying to add new dependencies
or freshly `dep ensure` the current locked versions as it was treating
`release-1.7` as a revision.

The fix involves pinning k8s.io/apimachinery to the `release-1.7`
branch again in an override.

It should be possible to remove this when moving the k8s.io/kubernetes
dependency to a version `> 1.7.5` (there is no corresponding `1.7.5`
tag on the apimachinery project, the earliest being `1.7.6`).

Signed-off-by: John McCabe <[email protected]>
This commit updates the vendored depdencies, impacting the following:

Direct dependency:
- hpcloud/tail

Transitive dependency:
- go-fsnotify -> fsnotify/fsnotify

Note that the pinning for k8s.io/apimachinery has been updated but has
had no impact on the vendored code.

Signed-off-by: John McCabe <[email protected]>
@codecov
Copy link

codecov bot commented Mar 26, 2018

Codecov Report

Merging #895 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #895      +/-   ##
==========================================
+ Coverage   48.53%   48.56%   +0.02%     
==========================================
  Files          84       84              
  Lines        7837     7837              
==========================================
+ Hits         3804     3806       +2     
+ Misses       3722     3721       -1     
+ Partials      311      310       -1
Impacted Files Coverage Δ
pkg/types/spec.go 60.17% <0%> (+1.76%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 365de38...f11e866. Read the comment docs.

@chungers chungers merged commit 5fc9c58 into docker-archive:master Mar 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants