-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Maintenance #64
Merged
Merged
Maintenance #64
Conversation
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
hnnsgstfssn
commented
Jan 21, 2025
Oded-B
approved these changes
Jan 21, 2025
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
This consolidates on a single place to specify the Go version.
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)
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.
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. 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.
e592c9e
to
0ebca21
Compare
Making note of two things:
For (1) I have opened a support ticket with Github since this should not fail and Dependabot reportedly runs For (2) I'd leave things as is for now since I think we're actually using some of the later features. Just noting this. |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several updates and improvements across different files, focusing on dependency updates, workflow configurations, and code refactoring. The most important changes are summarized below:
Dependency Updates:
go.mod
file to their latest versions, includinggithub.heygears.com/argoproj/argo-cd
,github.com/cenkalti/backoff
, andgoogle.golang.org/grpc
. [1] [2] [3] [4] [5]Workflow Configurations:
.github/workflows/lint.yml
file to usego-version-file
instead of a hardcoded Go version and reordered steps for better clarity.Code Refactoring:
exportloopref
linter withcopyloopvar
in the.golangci.yml
file.Makefile
to usego mod download
instead ofgo mod vendor
for dependency management.Mock Generation:
internal/pkg/mocks/mocks.go
to usego.uber.org/mock
for generating mock files, replacinggithub.heygears.com/golang/mock
.Function Enhancements:
SetAppInstance
function call ininternal/pkg/argocd/argocd_copied_from_upstream.go
to includeGetInstallationID
.internal/pkg/argocd/argocd_test.go
to usego.uber.org/mock/gomock
.The above is a generated description of the changes.