-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bump the minimum version of go to 1.22.0 * Bump assets to use use/require go1.22 * Update README with new Go version
- Loading branch information
Showing
24 changed files
with
43 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/cloudfoundry/cf-acceptance-tests/assets/binary | ||
|
||
go 1.21 | ||
go 1.22.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/cloudfoundry/cf-acceptance-tests/assets/go_calls_ruby | ||
|
||
go 1.21 | ||
go 1.22.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/cloudfoundry/cf-acceptance-tests/assets/golang | ||
|
||
go 1.21 | ||
go 1.22.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
applications: | ||
- env: | ||
GOPACKAGENAME: go-online | ||
GOVERSION: go1.21 | ||
- env: | ||
GOPACKAGENAME: go-online | ||
GOVERSION: go1.22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/cloudfoundry-samples/logging-route-service | ||
|
||
go 1.21 | ||
go 1.22.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
applications: | ||
- buildpacks: | ||
- go_buildpack | ||
env: | ||
GOVERSION: go1.21 | ||
GOPACKAGENAME: github.com/cloudfoundry-samples/logging-route-service | ||
- buildpacks: | ||
- go_buildpack | ||
env: | ||
GOVERSION: go1.22 | ||
GOPACKAGENAME: github.com/cloudfoundry-samples/logging-route-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/cloudfoundry/cf-acceptance-tests/assets/multi-port-app | ||
|
||
go 1.21 | ||
go 1.22.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--- | ||
applications: | ||
- env: | ||
GOVERSION: go1.21 | ||
- env: | ||
GOVERSION: go1.22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/cloudfoundry/cf-acceptance-tests/assets/pora | ||
|
||
go 1.21 | ||
go 1.22.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
applications: | ||
- name: pora | ||
buildpacks: | ||
- go_buildpack | ||
env: | ||
GOPACKAGENAME: pora | ||
GOVERSION: go1.21 | ||
- name: pora | ||
buildpacks: | ||
- go_buildpack | ||
env: | ||
GOPACKAGENAME: pora | ||
GOVERSION: go1.22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module example-apps/proxy | ||
|
||
go 1.21 | ||
go 1.22.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module github.com/cloudfoundry/cf-acceptance-tests/assets/syslog-drain-listener | ||
|
||
go 1.21 | ||
go 1.22.0 | ||
|
||
require code.cloudfoundry.org/tlsconfig v0.0.0-20220621140725-0e6fbd869921 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
applications: | ||
- name: syslog-drain-listener | ||
env: | ||
GOPACKAGENAME: main | ||
GOVERSION: go1.21 | ||
- name: syslog-drain-listener | ||
env: | ||
GOPACKAGENAME: main | ||
GOVERSION: go1.22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/cloudfoundry/cf-acceptance-tests/assets/tcp-listener | ||
|
||
go 1.21 | ||
go 1.22.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
applications: | ||
- env: | ||
GOPACKAGENAME: tcp-listener | ||
GOVERSION: go1.21 | ||
- env: | ||
GOPACKAGENAME: tcp-listener | ||
GOVERSION: go1.22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/cloudfoundry/cf-acceptance-tests/assets/worker | ||
|
||
go 1.21 | ||
go 1.22.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
043a63f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ctlong, hey this change causes breaks in our pipelines as the 1.22.0 runtime isn't available in the buildpack and it causes it to download the older specific 1.22.0 from proxy.golang.org which we block.
Could you please change this
1.22.0
values to be more flexible like1.22
then the apps will bounce between the available runtimes as new buildpacks are released?043a63f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear,
1.22.0
is valid, as thego
line is only meant to specify the minimum version of Go for a project.I've no problem changing these to use
1.22
right now. I would recommend revisiting your buildpack logic though, as it's likely that this project (or real production Go apps) will use this format again in the future.043a63f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ctlong , appreciate the time
Our buildpack packaging is just a simple offline build using the official library which includes the main runtimes. We haven't done anything special to remove stuff.
Here's the error, maybe I'm not articulating it particularly well or have misunderstood the error and it's more of a the test assets needing go mod vendoring issue then.
I just know that this issue appeared after the recent pinning.
Not sure which asset it is but it causes this test to fail
[apps] Healthcheck when the healthcheck is set to none [It] starts up successfully
043a63f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend looking into your GOTOOLCHAIN setting. This error looks to be coming from your Go runtime trying, and failing, to implement forward/backward compatibility by downloading (what it determines to be) the correct toolchain for this project.
You can turn off all toolchain checks by setting
GOTOOLCHAIN=local
, which I think would likely fix your error.043a63f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ctlong , this sounds interesting but I'm not sure how I would implement this in a buildpack. I only want to consume a non-hacked offline version of the "official" go-buildpack and run the stock cf-acceptance-tests against this but since this change was made, this isn't possible.
Are you suggesting that we clone/fork/repackage all of the assets in the cf-acceptance-tests to have this GOTOOLCHAIN setting or sedding the cf-acceptance-tests scripts to use GOTOOLCHAIN set to local?
It doesn't sound very intuitive
https://docs.cloudfoundry.org/buildpacks/go/index.html seems to indicate "When you specify versions, specify only majoror[sic] minor versions, such as Go 1.6, rather than Go 1.6.0. This ensures you receive the most recent patches."
If this is cf-acceptance-tests which is used to test specific versions of CF which specific dependencies, you'd want to make sure that you're testing apps against the buildpacks relevant for that version and the default runtimes contained within. You'd need to go back to February to find a buildpack with 1.22.0 runtime set as default. So currently you're testing a modern CF, using a new/modern buildpack with old dependencies from a non-default runtime.
043a63f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, the "official" Go Buildpack is online-only and neither the folks maintaining it, nor CATs, test it for offline use-cases, as far as I know. CATs' CI, which only tests the Go Buildpack in an online setting, succeeded. Obviously, we would like to accommodate every use-case, but that's not always possible.
Hopefully, the changes in #1195 work for both your use-case, and others'.
I'm not suggesting either of those options.
What I was suggesting is that the offline Go Buildpack in question should change its default GOTOOLCHAIN env var to only present the versions that are bundled in that buildpack. Since it presumably only has a few versions of Go bundled, and can't reach out to the internet to download more, it would ideally export a GOTOOLCHAIN env var of value
x+path
, wherex
is the lowest version of Go that is bundled. As of this writing, that would be1.21.13
in the latest release of the Go Buildpack, so1.21.13+path
. A simpler alternative would be to just export GOTOOLCHAIN aslocal
to skip compatibility computation and use the installed version.That docs line is 8 years old (ignoring a minor cosmetic edit). Go modules were only introduced around 6 years ago, so there's no way that line was referring to the
go
line in a Go module.You seem to be misunderstanding the purpose of the
go
line in the Go Module. According to the Go Modules Reference, it only "sets the minimum version of Go required to use this module". If the unset toolchain in the Go Buildpack results in a value ofauto
, which I suspect it does, then it would elect to use the latest version of Go available. In a supported, online use-case, that would be go1.23.0.043a63f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This medium (i.e. comments on a commit) is too hard for me to track. If you want to continue this conversation further, I'd suggest you raise a GH issue or start a thread in CFF Slack.