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 exact Go versions during update-golang #2757

Merged
merged 3 commits into from
Mar 13, 2024
Merged

Conversation

geigerj0
Copy link
Contributor

@geigerj0 geigerj0 commented Mar 13, 2024

Problem

As of Go 1.21, versions specified in go.mod files are treated not as a guideline but as a strict rule. Also, go 1.21 is automatically being mapped to 1.21.0.

The following example basically says that Go 1.21.0 is required

Which causes problems because the "1.21 -> 1.21.0 mapping" doesn't work for go.work files

Example of a failing CI build:

go.work file requires go >= 1.21.0, but go.work lists go 1.21.

Solution

  • bump to exact Go versions and include go.work during the bumping process.

Somewhat related changes

@geigerj0 geigerj0 added the allow-acceptance-tests This label needs to be added to enable the acceptance tests to run. label Mar 13, 2024
@geigerj0 geigerj0 requested a review from silvestre March 13, 2024 14:05
Copy link
Member

@silvestre silvestre left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Very nice simplifications by editing the go.{mod,work} files with go. ❤️

Copy link

sonarcloud bot commented Mar 13, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@geigerj0 geigerj0 enabled auto-merge (squash) March 13, 2024 14:54
@geigerj0 geigerj0 disabled auto-merge March 13, 2024 14:54
@geigerj0 geigerj0 enabled auto-merge (squash) March 13, 2024 14:54
@geigerj0 geigerj0 merged commit c29b78d into main Mar 13, 2024
38 checks passed
@geigerj0 geigerj0 deleted the dry-run-golang-update branch March 13, 2024 16:47
silvestre pushed a commit that referenced this pull request Apr 5, 2024
# Problem
Go tries to download a specific toolchain version whenever the required version is not available on the system. The following PR introduced the exact Go toolchain version pinning #2757.

Requiring an exact Go toolchain version can make the acceptance tests execution fail in an environment that has no connectivity to the public internet. Here is a sample failure from an execution in China which tries to download a required toolchain version:
```
download go1.21.4: golang.org/[email protected]: Get "https://proxy.golang.org/golang.org/toolchain/@v/v0.0.1-go1.21.4.linux-amd64.zip": dial tcp 172.217.163.49:443: i/o timeout
```



# Solution
Compile test suites and ginkgo CLI for 
* `linux` (`amd64`, `arm64`) 
* `darwin` (`amd64`, `arm64`)

Acceptance test executions with no public internet access can make use of these binaries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
allow-acceptance-tests This label needs to be added to enable the acceptance tests to run. exclude-from-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants