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 to go 1.20 #12014

Merged
merged 4 commits into from
Feb 17, 2023
Merged

chore: upgrade to go 1.20 #12014

merged 4 commits into from
Feb 17, 2023

Conversation

crenshaw-dev
Copy link
Collaborator

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).

@@ -390,24 +392,66 @@ func TestCreateServerTLSConfig(t *testing.T) {
})
}

// getCert does the same thing as tls.AppendCertsFromPEM, but throws an error if something goes wrong.
func getCert(pemCerts []byte) (*x509.Certificate, error) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

golangci-lint was failing because p.Subjects was deprecated. This change lets us do the same test by using p.Equal against the expected cert pool instead of directly inspecting p.Subjects.

@codecov
Copy link

codecov bot commented Jan 17, 2023

Codecov Report

Base: 47.29% // Head: 47.62% // Increases project coverage by +0.33% 🎉

Coverage data is based on head (0835422) compared to base (2358669).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12014      +/-   ##
==========================================
+ Coverage   47.29%   47.62%   +0.33%     
==========================================
  Files         245      246       +1     
  Lines       41670    41795     +125     
==========================================
+ Hits        19707    19905     +198     
+ Misses      19978    19897      -81     
- Partials     1985     1993       +8     
Impacted Files Coverage Δ
util/argo/normalizers/corev1_known_types.go 100.00% <ø> (ø)
applicationset/generators/git.go 86.80% <100.00%> (-0.14%) ⬇️
util/oidc/provider.go 34.42% <0.00%> (-20.12%) ⬇️
server/application/terminal.go 19.48% <0.00%> (-1.17%) ⬇️
util/app/discovery/discovery.go 36.09% <0.00%> (-1.12%) ⬇️
util/db/repository_secrets.go 68.35% <0.00%> (-0.44%) ⬇️
util/oidc/oidc.go 57.43% <0.00%> (-0.34%) ⬇️
cmpserver/plugin/plugin.go 78.51% <0.00%> (-0.34%) ⬇️
server/repository/repository.go 51.49% <0.00%> (-0.13%) ⬇️
reposerver/repository/repository.go 60.49% <0.00%> (-0.11%) ⬇️
... and 23 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

* Upgrade Golang to 1.19

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>

* go mod tidy with go 1.19

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>

* Replace deprecated ioutil

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>

* make codegen changes

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>

* Codegen Changes

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>

chore: upgrade golangci-lint to 1.50.1

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

missed a spot

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

tidy

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix bad merge

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Author:    Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-Authored-By: OmarKalloush <omar.kalloush@optimumpartners.co>

fix indentation

fix lint and codegen

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@crenshaw-dev crenshaw-dev changed the title chore: upgrade to go 1.19 chore: upgrade to go 1.20 Feb 2, 2023
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
…ke test-race-local"

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Copy link
Collaborator

@leoluz leoluz left a comment

Choose a reason for hiding this comment

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

Please check my comment

Copy link
Collaborator

@leoluz leoluz left a comment

Choose a reason for hiding this comment

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

LGTM

@crenshaw-dev crenshaw-dev merged commit e75cf73 into argoproj:master Feb 17, 2023
@crenshaw-dev crenshaw-dev deleted the go-1.19 branch February 17, 2023 20:21
yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
* chore: Upgrade Golang to 1.19 (argoproj#10176) (argoproj#10186)

* Upgrade Golang to 1.19

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>

* go mod tidy with go 1.19

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>

* Replace deprecated ioutil

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>

* make codegen changes

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>

* Codegen Changes

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>

chore: upgrade golangci-lint to 1.50.1

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

missed a spot

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

tidy

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix bad merge

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Author:    Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-Authored-By: OmarKalloush <omar.kalloush@optimumpartners.co>

fix indentation

fix lint and codegen

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* 1.20

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix lint errors

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix "syntax error: unexpected var after top level declaration" in "make test-race-local"

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: OmarKalloush <100078273+OmarKalloush@users.noreply.github.com>
@crenshaw-dev crenshaw-dev mentioned this pull request Aug 9, 2023
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.

None yet

3 participants