-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Checkout before setting up Go This prevents the following error during setup step caused by missing dependency files. Warning: Restore cache failed: Dependencies file is not found in /home/runner/work/telefonistka/telefonistka. Supported file pattern: go.sum * Use Go version from go.mod This consolidates on a single place to specify the Go version. * Replace golang/mock with maintained Uber fork * Replace deprecated exportloopref with copyloopvar Using the deprecated linter results in the following warning. The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar." Offenders of copyloopvar are removed as they result in the following. The copy of the 'for' variable "tt" can be deleted (Go 1.22+) (copyloopvar) As per https://go.dev/blog/loopvar-preview this should be all safe! * Stop vendoring dependencies Vendoring of dependencies is a strategy that can be useful for certain scenarios. This project does not need to use vendoring and it can be frustrating to work with as it has subtle side-effects in tooling that developers need to be aware of. Additionally, when vendoring is used, vendored dependencies should conventionally be checked in together with the rest of the code which is currently not done. Instead of vendoring switch to use go mod download for fetching dependencies and let the module system take care of the rest. The go.mod and go.sum file should specify all dependencies to achieve hermetic builds. * Upgrade dependencies This resolves a few dependency issues that are seemingly causing friction for security and dependabot updates. Mainly it drops the replace directives in go.mod and upgrades the following dependencies using go get. k8s.io/cli-runtime k8s.io/api k8s.io/apimachinery k8s.io/kubernetes k8s.io/controller-manager github.com/argoproj/argo-cd/v2 github.com/argoproj/gitops-engine@v0.7.1-0.20240905010810-bd7681ae3f8b k8s.io/kubectl sigs.k8s.io/controller-runtime One notable difference here is the upgrade of github.com/argoproj/argo-cd/v2 which further requires a code change to be compatible with new upstream API: it is now requires to pass in an installation ID when setting the instance ID for resource tracking. * Upgrade go-git to v5.13.1 This should fix [1] and [2]. [1] https://github.com/commercetools/telefonistka/security/dependabot/12 [2] https://github.com/commercetools/telefonistka/security/dependabot/13
- Loading branch information
1 parent
496aed4
commit 4406866
Showing
11 changed files
with
258 additions
and
1,546 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.