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

Generating dependency report fails on release #4812

Open
richardcase opened this issue Feb 23, 2024 · 3 comments
Open

Generating dependency report fails on release #4812

richardcase opened this issue Feb 23, 2024 · 3 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. needs-priority triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@richardcase
Copy link
Member

/kind bug

What steps did you take and what happened:

When trying to do recent releases of v2.3.x & v2.4.0-beta.0 we encountered the following problem when generating the dependency report for the release notes:

ERRO unable to run cmd: go list -mod=readonly -m all, workdir: /tmp/go-modiff3838785554, stdout: , stderr: go: updates to go.mod needed, disabled by -mod=readonly; to update it:
       go mod tidy
, error: exit status 1  file="modiff/modiff.go:276"
FATA generating dependency report: getting dependency changes: unable to run cmd: go list -mod=readonly -m all, workdir: /tmp/go-modiff3838785554, stdout: , stderr: go: updates to go.mod needed, disabled by -mod=readonly; to update it:
       go mod tidy
, error: exit status 1  file="release-notes/main.go:193

Digging into it (and looking at the temporary directory created) its requiring changes to go.mod including:

toolchain go1.21.5

However, adding this causes the staging image build to fail with:

/workspace/hack/tools/go.mod:5: unknown directive: toolchain
go: errors parsing go.mod:

What did you expect to happen:

The build of the staging image and release notes should succeed.

Anything else you would like to add:

Short term we can disable the dependency report generation. Then for the future we can look to do:

  • add the `toolchain1 back into go mod
  • Upgrade the gcb image

Environment:

  • Cluster-api-provider-aws version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 23, 2024
@richardcase richardcase self-assigned this Feb 23, 2024
@k8s-ci-robot k8s-ci-robot added needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 23, 2024
@richardcase
Copy link
Member Author

/triage accepted
/lifecycle active

@k8s-ci-robot k8s-ci-robot added lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 23, 2024
@richardcase
Copy link
Member Author

There is an issue with release-notes. It turns out if the previous version (i.e specified in --start-sha) was for a version of go prior to 1.21 and the current version (i.e. specified in --end-sha) is now v1.21 then when it checks out the starting sha there is no toolchain directive and so when go list -mod=readonly -m all is run it tries to update go.mod to add toolchain and fails.

@richardcase
Copy link
Member Author

We will probably have to disable the dependency report generation short term using --dependencies=false and then re-enable it again in the next release.

I will also investigate if we can influence this behaviour via env vars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. needs-priority triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

2 participants