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

Bump to go 1.22 and fixes #8035

Merged
merged 6 commits into from
Jun 18, 2024
Merged

Conversation

vdemeester
Copy link
Member

Changes

  • go.mod: switch go version to 1.22
    This should unblock some dependencies updates.
  • Update golangci-lint to 1.59.x and fix linting
    Mainly fixing the for loop copy range not needed anymore.
  • go.mod: remove k8s.io replace directive
    It shouldn't be required anymore.

Closes #7187

/kind misc

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • pre-commit Passed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

tektoncd/pipeline now requires go 1.22 to be built

@tekton-robot tekton-robot added kind/misc Categorizes issue or PR as a miscellaneuous one. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 10, 2024
@vdemeester
Copy link
Member Author

This should help #8032 be green I hope 🤞🏼

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/apis/pipeline/v1/merge.go 85.4% 85.0% -0.4
pkg/apis/pipeline/v1beta1/merge.go 85.4% 85.0% -0.4

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/apis/pipeline/v1/merge.go 85.4% 85.0% -0.4
pkg/apis/pipeline/v1beta1/merge.go 85.4% 85.0% -0.4

@vdemeester vdemeester force-pushed the go-1.22-bump-and-misc branch from f4d5e4c to 260e0bd Compare June 10, 2024 13:19
@tekton-robot tekton-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 10, 2024
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/reconciler/pipelinerun/resources/resultrefresolution.go 99.2% 98.3% -0.8

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4

@vdemeester vdemeester force-pushed the go-1.22-bump-and-misc branch from 260e0bd to 467607a Compare June 10, 2024 13:32
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/apis/pipeline/v1/merge.go 85.4% 85.0% -0.4
pkg/apis/pipeline/v1beta1/merge.go 85.4% 85.0% -0.4
pkg/reconciler/pipelinerun/resources/resultrefresolution.go 99.2% 98.3% -0.8

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/apis/pipeline/v1/merge.go 85.4% 85.0% -0.4
pkg/apis/pipeline/v1beta1/merge.go 85.4% 85.0% -0.4

@vdemeester vdemeester force-pushed the go-1.22-bump-and-misc branch from 467607a to 47f940a Compare June 10, 2024 17:47
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/apis/pipeline/v1/merge.go 85.4% 85.0% -0.4
pkg/apis/pipeline/v1beta1/merge.go 85.4% 85.0% -0.4

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/apis/pipeline/v1/merge.go 85.4% 85.0% -0.4
pkg/apis/pipeline/v1beta1/merge.go 85.4% 85.0% -0.4
pkg/reconciler/pipelinerun/resources/resultrefresolution.go 99.2% 98.3% -0.8

@vdemeester
Copy link
Member Author

Hum.. not sure why codeql is unhappy...

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/apis/pipeline/v1/merge.go 85.4% 85.0% -0.4
pkg/apis/pipeline/v1beta1/merge.go 85.4% 85.0% -0.4

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/apis/pipeline/v1/merge.go 85.4% 85.0% -0.4
pkg/apis/pipeline/v1beta1/merge.go 85.4% 85.0% -0.4
pkg/reconciler/pipelinerun/resources/resultrefresolution.go 99.2% 98.3% -0.8

@vdemeester
Copy link
Member Author

/retest

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 11, 2024
@vdemeester vdemeester force-pushed the go-1.22-bump-and-misc branch 2 times, most recently from 0e4c35d to 250d73b Compare June 11, 2024 18:27
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 11, 2024
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/apis/pipeline/v1/merge.go 85.4% 85.0% -0.4
pkg/apis/pipeline/v1beta1/merge.go 85.4% 85.0% -0.4

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/apis/pipeline/v1/merge.go 85.4% 85.0% -0.4
pkg/apis/pipeline/v1beta1/merge.go 85.4% 85.0% -0.4

@vdemeester
Copy link
Member Author

/retest

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 11, 2024
@vdemeester vdemeester force-pushed the go-1.22-bump-and-misc branch from 250d73b to f351930 Compare June 12, 2024 07:06
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 12, 2024
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/apis/pipeline/v1/merge.go 85.4% 85.0% -0.4
pkg/apis/pipeline/v1beta1/merge.go 85.4% 85.0% -0.4
pkg/reconciler/pipelinerun/resources/resultrefresolution.go 98.3% 99.2% 0.8

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/apis/pipeline/v1/merge.go 85.4% 85.0% -0.4
pkg/apis/pipeline/v1beta1/merge.go 85.4% 85.0% -0.4

@chitrangpatel
Copy link
Contributor

/approve

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chitrangpatel

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 14, 2024
@vdemeester vdemeester force-pushed the go-1.22-bump-and-misc branch from f351930 to 10de121 Compare June 18, 2024 06:04
@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 18, 2024
This will unblock some dependencies updates (such as go-scm)

Signed-off-by: Vincent Demeester <[email protected]>
upstream knative/pkg seem to have fixed the issue refered in the
comment, so let's delete this.

Signed-off-by: Vincent Demeester <[email protected]>
The idea is to not get false positive.

Signed-off-by: Vincent Demeester <[email protected]>
This mainly removing the need to copy variable in a for loop to
capture rang as it is now "fixed" in go 1.22+.

> The copy of the 'for' variable "td" can be deleted (Go
1.22+) (copyloopvar)

This also fixes some fatcontext issues, for loop range, …

Signed-off-by: Vincent Demeester <[email protected]>
This is to ensure it installs the correct go toolchain version we need
to build the project.

Signed-off-by: Vincent Demeester <[email protected]>
And "version" the binary so we *ensure* that it doesn't execute an
older version of `golangci-lint` when we update the dependency.

Signed-off-by: Vincent Demeester <[email protected]>
@vdemeester vdemeester force-pushed the go-1.22-bump-and-misc branch from 10de121 to 7ff2c93 Compare June 18, 2024 06:24
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 18, 2024
@piyush-garg
Copy link
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 18, 2024
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/apis/pipeline/v1/merge.go 85.4% 85.0% -0.4
pkg/apis/pipeline/v1beta1/merge.go 85.4% 85.0% -0.4

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
internal/sidecarlogresults/sidecarlogresults.go 87.9% 87.6% -0.4
pkg/apis/pipeline/v1/merge.go 85.4% 85.0% -0.4
pkg/apis/pipeline/v1beta1/merge.go 85.4% 85.0% -0.4
pkg/reconciler/pipelinerun/resources/resultrefresolution.go 98.3% 99.2% 0.8

@tekton-robot tekton-robot merged commit 3ca7423 into tektoncd:main Jun 18, 2024
14 checks passed
@vdemeester vdemeester deleted the go-1.22-bump-and-misc branch June 18, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/misc Categorizes issue or PR as a miscellaneuous one. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix go.mod now that issue has been completed
4 participants