-
Notifications
You must be signed in to change notification settings - Fork 141
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
Update to Traefik v2.10, go1.21 and alpine 3.18 #842
base: v1.4
Are you sure you want to change the base?
Conversation
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.
Hello,
can you rebase your PR on the branch v1.4?
the modifications of the .golangci.yml
are not right but we will talk about them after the rebase.
Sure, I didn't see it in the build instructions, master is still the default branch. |
You can update Traefik v2.10 inside this PR (in a separate commit). The update of dependencies should be linked to the Traefik update. Some notes:
|
1dd4aad
to
1cd6abb
Compare
I didn't see that, should I open an issue now? I will close the second PR. I will remove the indirect updates and add Traefik 2.10 in a separate commit. |
the PR is already open, so you don't need it. |
1cd6abb
to
e38b637
Compare
.golangci.toml
Outdated
"Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*printf?|os\\.(Un)?Setenv|\\(k8s\\.io/client-go/tools/cache\\.SharedInformer\\)\\.AddEventHandler). is not checked", | ||
"package-comments: should have a package comment", | ||
"import '[^']+' is not allowed from list 'Main'", | ||
"if-return: redundant if ...; err != nil check, just return error instead.", | ||
"unused-parameter: parameter '[^']+' seems to be unused, consider removing or renaming it as _", | ||
"tag is not aligned, should be: description:", |
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.
you should revert this modification.
And add the following snippet inside the .golangci.toml
file:
[linters-settings.depguard]
[linters-settings.depguard.rules.main]
[[linters-settings.depguard.rules.main.deny]]
pkg = "github.com/instana/testify"
desc = "not allowed"
[[linters-settings.depguard.rules.main.deny]]
pkg = "github.com/pkg/errors"
desc = "Should be replaced by standard lib errors package"
[linters-settings.tagalign]
align = false
sort = true
order = [
"description",
"json",
"toml",
"yaml",
"yml",
"label",
"label-slice-as-struct",
"file",
"kv",
"export"
]
The other problem should be fixed (and not ignored) except "package-comments: should have a package comment"
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.
Will do except fixing the actual problems, you know your code better 😅
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.
Could fix linter issues except AddEventHandler and unused-parameter.
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.
Sorry can you revert the change related to tagalign and add this configuration:
[linters-settings.tagalign]
align = false
sort = true
order = [
"description",
"json",
"toml",
"yaml",
"yml",
"label",
"label-slice-as-struct",
"file",
"kv",
"export"
]
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.
You can fix unused-parameter
: you just have to replace the name of the parameter with _
.
And AddEventHandler
can also be fixed but it's a bit more complex, so you can ignore them inside this PR but I will fix them after the merge of your PR.
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.
Already tried that yesterday, it doesn't work, just another linter pops up instead of revive:
File is not `gci`-ed with --skip-generated -s standard -s default (gci)
It would be much easier if you fix those special cases yourself, you know your code and Go better than me.
And no single check has been run yet, can't you start the GitHub Actions manually to see if all integration tests work?
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.
It works I did it locally.
If I remove an unnecessary layer and use upx, I can shrink the image to 16 MB (58% smaller than v1.4.8). When I use scratch instead of alpine, I can shrink the image by another 50% (8.4 MB) and also shrink the attack surface significantly (no binaries except traefik-mesh). |
I added more versions to coredns_test.go according to https://github.com/coredns/deployment/blob/master/kubernetes/CoreDNS-k8s_version.md in a separate commit. |
https://www.freebsd.org/platforms/arm/#status states that freebsd/arm64 is fully supported since 2021, can I remove the goreleaser ignore? |
Hello @reneleonhardt and thanks for your contribution, As said by @ldez, it is better to open issues before opening a pull request and to address only one thing in it (see our contributing guide). As this pull request is already open, I would only address the dependency, image, and go version updates, and revert the other changes (and open issues accordingly). |
f8d9ebd
to
57d3deb
Compare
Hello @kevinpollet okay I will try tonight, but as you know updating the images alone require many other updates like the whole docs toolchain. |
I reverted what I understood that you don't want now. |
What does this PR do?
This PR:
How to test it
Additional Notes
This PR updates everything to the latest versions, except: