[release-1.37] Fix validate workflow: Update to Node 24 and remove GOPATH structure - #4168
Conversation
…_action to v4.6 for Node 24 support, remove GOPATH and nested checkout paths
Fixes: - Run Checkout before Setup Golang so go.mod exists for caching - Remove GOPATH and nested ./src/github.com/... path structure - Force golangci-lint-action@v6 to use Node 24 (avoid deprecation) - Update prettier_action v4.3 → v4.6 (Node 24 support) - Remove all working-directory overrides The critical fix is step ordering: setup-go needs go.mod to exist before it runs, which requires checkout to happen first.
| ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node24 | ||
| ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | ||
| with: | ||
| version: v1.64.8 |
There was a problem hiding this comment.
| version: v1.64.8 | |
| version: v2.11.4 | |
| only-new-issues: true |
There was a problem hiding this comment.
Yes, I tried all possible approaches yesterday, but no luck with v2 or the latest version, so I reverted to the previous version. Today, I’ll try a different approach with v2. There are quite a few breaking changes, and the setup needs to be updated accordingly. Let me try.
| @@ -182,16 +176,17 @@ jobs: | |||
|
|
|||
| - name: Go Lint - knative-operator | |||
| uses: golangci/golangci-lint-action@v6 | |||
There was a problem hiding this comment.
| uses: golangci/golangci-lint-action@v6 | |
| uses: golangci/golangci-lint-action@v9 |
There was a problem hiding this comment.
I have tried this too in any of commit but it still failed and looks like need to change approach little bit. let me try to fix that.
|
@dsimansk Looks like this works, but the scan found 37 issues. It seems that v2 is stricter than v1. |
…PORARY: Exclude 37 linter warnings found during v2.13.2 upgrade
|
TEMPORARY: Exclude all above 37 linter warnings found during v2.13.2 upgrade. Reference CI run with findings: Excluded warnings breakdown:
These are legitimate code quality findings from upgraded linters, |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dsimansk, Kaustubh-pande The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/override ci/prow/420-kitchensink-upgrade ci/prow/421-kitchensink-e2e ci/prow/421-mesh-e2e ci/prow/421-mesh-upgrade ci/prow/421-operator-e2e ci/prow/421-test-upgrade ci/prow/421-upstream-e2e ci/prow/421-upstream-e2e-kafka |
|
@Kaustubh-pande: Overrode contexts on behalf of Kaustubh-pande: ci/prow/420-kitchensink-upgrade, ci/prow/421-kitchensink-e2e, ci/prow/421-mesh-e2e, ci/prow/421-mesh-upgrade, ci/prow/421-operator-e2e, ci/prow/421-test-upgrade, ci/prow/421-upstream-e2e, ci/prow/421-upstream-e2e-kafka DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
d7716c0
into
openshift-knative:release-1.37
Fixes the
Lintjob in the validate workflow that was failing due to Node 20 deprecation and GOPATH-based directory structure issues.Problems
Node 20 is being deprecated. This workflow is running with Node 24 by default.
golangci-lint-action@v6uses deprecated Node 20prettier_action@v4.3uses deprecated Node 20Running in: /home/runner/work/.../src/github.com/openshift-knative/serverless-operator
Error: golangci-lint couldn't find go.mod
GOPATH: ${{ github.workspace }}./src/github.com/${{ github.repository }}go.modChanges
✅ Node 24 Compatibility
✅ Modern Go Module Structure
Removed:
env.GOPATH: ${{ github.workspace }}- Not needed for Go modulescheckout.path: ./src/github.com/${{ github.repository }}- Nested path caused issuesworking-directoryoverrides in lint stepsUpdated:
src/.../templates/*.yaml→templates/*.yamlDetailed Changes
Before (GOPATH structure):