-
-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade dependencies to latest versions #387
Conversation
docker_test.go
Outdated
defer func() { | ||
os.Setenv("HOME", oldHome) | ||
}() | ||
tmpDir := t.TempDir() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
oldHome := os.Getenv("HOME") | ||
os.Unsetenv("HOME") | ||
defer func() { | ||
os.Setenv("HOME", oldHome) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it required to avoid resetting the env to previous value of the HOME variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, according to the docs that's automatically done after the test is completed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just saw this is brand new in Go 1.17 😅 shall I revert it or is it okay to update the test environment?
I don't expect this to break compatibility for the library itself but I'm not sure about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I replaced the 'fancy' standard lib calls with gotest.tools
pendants to get compatibility with Go 1.14 again. The dependency was already in place and this way I still can remove filet and the env is automatically managed 😊
0e02a18
to
2b47886
Compare
- apply major upgrades for gopkg.in/yaml, gotest.tools and github.com/cenkalti/backoff - get rid of obsolete github.com/pkg/errors - replace github.com/Flaque/filet with standard library - make error ignores explicit where possible
@mdelapenya sorry, hat to rebase it once more to switch back to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this! Let's get it checked in!
Some of the dependencies are already one or multiple major versions behind upstream.
For instance
gopkg.in/yaml.v2
in the previous version is known to be vulnerable.Also
github.com/Flaque/filet
can easily be replaced with functions from the standard library andgithub.com/pkg/errors
is an archived project and replaced with Go 1.13 error extensions.To get rid of at least as many warnings GoLand reports as possible I made all error ignores explicit where they weren't in a
defer
call. The remaining ones could be replaced - at least in test cases - with a neat helper method?