Skip to content
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

chore: Upgrade Go module to v2 #5931

Merged
merged 5 commits into from
Apr 1, 2021
Merged

Conversation

jannfis
Copy link
Member

@jannfis jannfis commented Mar 31, 2021

Fixes #5930

This is one of the recommended approaches given in https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

Context (https://github.com/golang/go/wiki/Modules#semantic-import-versioning):

As a result of Semantic Import Versioning, code opting in to Go modules must comply with these rules:

  • Follow semver. (An example VCS tag is v1.2.3).
  • If the module is version v2 or higher, the major version of the module must be included as a /vN at the end of the module paths used in go.mod files (e.g., module github.com/my/mod/v2, require github.com/my/mod/v2 v2.0.1) and in the package import path (e.g., import "github.com/my/mod/v2/mypkg"). This includes the paths used in go get commands (e.g., go get github.com/my/mod/v2@v2.0.1. Note there is both a /v2 and a @v2.0.1 in that example. One way to think about it is that the module name now includes the /v2, so include /v2 whenever you are using the module name).
  • If the module is version v0 or v1, do not include the major version in either the module path or the import path.

Signed-off-by: jannfis jann@mistrust.net

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

jannfis added 2 commits March 31, 2021 08:08
Signed-off-by: jannfis <jann@mistrust.net>
Signed-off-by: jannfis <jann@mistrust.net>
@codecov
Copy link

codecov bot commented Mar 31, 2021

Codecov Report

Merging #5931 (f2806ab) into master (d085636) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5931   +/-   ##
=======================================
  Coverage   40.91%   40.91%           
=======================================
  Files         147      147           
  Lines       19635    19635           
=======================================
  Hits         8033     8033           
  Misses      10497    10497           
  Partials     1105     1105           
Impacted Files Coverage Δ
cmd/argocd-util/commands/app.go 31.71% <ø> (ø)
cmd/argocd-util/commands/argocd_util.go 14.63% <ø> (ø)
cmd/argocd-util/commands/backup.go 0.00% <ø> (ø)
cmd/argocd-util/commands/cluster.go 0.00% <ø> (ø)
cmd/argocd-util/commands/project.go 28.77% <ø> (ø)
cmd/argocd-util/commands/project_allowlist.go 47.29% <ø> (ø)
cmd/argocd-util/commands/repo.go 0.00% <ø> (ø)
cmd/argocd-util/commands/settings.go 68.14% <ø> (ø)
cmd/argocd-util/commands/settings_rbac.go 23.24% <ø> (ø)
cmd/argocd/commands/account.go 0.00% <ø> (ø)
... and 90 more

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 d085636...f2806ab. Read the comment docs.

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
@sbose78
Copy link
Contributor

sbose78 commented Apr 1, 2021

Interesting, I wasn't aware of this.

alexmt added 2 commits April 1, 2021 08:45
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
@@ -43,6 +43,9 @@ APIMACHINERY_PKGS=(
k8s.io/api/core/v1
)

export GO111MODULE=on
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@alexmt alexmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM . Thank you @jannfis

@jannfis jannfis marked this pull request as ready for review April 1, 2021 18:30
@jannfis
Copy link
Member Author

jannfis commented Apr 1, 2021

Thanks for collaboration @alexmt

@jannfis jannfis merged commit ae49b45 into argoproj:master Apr 1, 2021
alexmt added a commit that referenced this pull request Apr 1, 2021
* chore: Upgrade Go module to v2

Signed-off-by: jannfis <jann@mistrust.net>

* Restore import order

Signed-off-by: jannfis <jann@mistrust.net>

* fix knowntypes_normalizer codegen error

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* fix codegen

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* fix Procfile

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
yujunz added a commit to abcue/argo-cd that referenced this pull request Apr 7, 2021
* 4f9c500 (upstream/master) docs: k8s version in Ingress Configuration documentation (argoproj#5727)
* 7c88ac8 feat: Allow to pass Kubernetes configuration overrides (argoproj#5906)
* 834a5fa chore: Change grammar in high_availability.md (argoproj#5964)
* 2a2b81f fix: Improvements to mobile UI (argoproj#5965)
* f06fc0d feat: allow per-version kustomize options (argoproj#5967)
* 92c7ca0 chore: make argocd gitpod friendly (argoproj#5973)
* 1bc3348 Upgrade gitops-engine (argoproj#5972)
* a686f12 fix: run dex as nonroot (argoproj#5815)
* ed5c5b6 chore: Update go-git to v5 (argoproj#5520)
* ac3d4cc fix: correct package name in Makefile (argoproj#5960)
* 24b2cac chore: fix incorrect image name in 'publish' CI job (argoproj#5956)
* b37eee1 chore: fix invalid IMAGE_NAMESPACE in image 'publish' CI job (argoproj#5953)
* dc4eaff chore: Remove specification of user id for the Redis workload (argoproj#5863)
* 8eeb9a0 chore: use clusterrolebinding v1 (argoproj#5939)
* 7945286 docs: clarify that the certificate must be in PEM format (argoproj#5946)
* de522bf chore: migrate argocd dev images to ghcr.io (argoproj#5948)
* 0a53fb1 chore(deps): bump y18n from 4.0.0 to 4.0.1 in /ui (argoproj#5919)
* ae49b45 chore: Upgrade Go module to v2 (argoproj#5931)
* a2ebe15 add user (argoproj#5938)
* 7f5a23d Update USERS.md (argoproj#5835)
* 24218b4 docs: Propose an enhancement proposal process (argoproj#5771)
shubhamagarwal19 pushed a commit to shubhamagarwal19/argo-cd that referenced this pull request Apr 15, 2021
* chore: Upgrade Go module to v2

Signed-off-by: jannfis <jann@mistrust.net>

* Restore import order

Signed-off-by: jannfis <jann@mistrust.net>

* fix knowntypes_normalizer codegen error

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* fix codegen

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* fix Procfile

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
kshamajain99 pushed a commit to kshamajain99/argo-cd that referenced this pull request Apr 16, 2021
* chore: Upgrade Go module to v2

Signed-off-by: jannfis <jann@mistrust.net>

* Restore import order

Signed-off-by: jannfis <jann@mistrust.net>

* fix knowntypes_normalizer codegen error

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* fix codegen

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* fix Procfile

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ArgoCD version 2.0+ could not be imported as package
3 participants