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

Update automation to use Go 1.19 #24175

Merged
merged 1 commit into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"SPARK_VERSIONS": ["2", "3"]
},
"GoTestProperties": {
"SUPPORTED_VERSIONS": ["1.18"]
"SUPPORTED_VERSIONS": ["1.19"]
}
}
2 changes: 1 addition & 1 deletion .github/workflows/build_playground_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
name: Build Playground Backend App
runs-on: ubuntu-latest
env:
GO_VERSION: 1.18.0
GO_VERSION: 1.19.3
BEAM_VERSION: 2.40.0
TERRAFORM_VERSION: 1.0.9
STAND_SUFFIX: ''
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
fetch-depth: 2
- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we still test on the oldest version of Go that we support?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 - we should also probably matrix from the GoTestProperties.SUPPORTED_VERSIONS variable like we do here -

That way there's a single place to update going forwards

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No.

For all that BeamGo is doing, it's not that compiler version sensitive (thus far), and we'd have other issues in our dependencies first. Go's very keen on the Go 1 Support policy, and that's not changing.

I'm more concerned that we continue working going forward, rather than backwards, since that gives us better signal, with an action (fix it going forward), and a recommendation for users (use the latest Beam Go with the latest version of Go).

We're also more likely to adopt newer features going forward for more robust examples or type inference changes to generics, etc, so the "oldest supported version" isn't meaningful from a SDK support perspective either.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I replied and wasn't aware of Danny's response. Certainly can't do matrix testing along with the format check as evidenced by the failure with this 1.19 change, but if that's split out, then I don't have a problem with.

I am against doing so at the same time as a routine upgrade. We should file a p3 issue to do the matrix testing change if we're keen on it, and separately for fixing the formatting for 1.19. 1.19 introduces newer interpretations of the Go Doc comments which allows for richer linkified documentation. I'll file the formating fix issue.

- name: Delete old coverage
run: "cd sdks/go/pkg && rm -rf .coverage || :"
- name: Run coverage
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/local_env_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'
- name: "Installing local env dependencies"
run: "sudo ./local-env-setup.sh"
id: local_env_install_ubuntu
Expand All @@ -57,7 +57,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'
- name: "Installing local env dependencies"
run: "./local-env-setup.sh"
id: local_env_install_mac
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,7 @@ class BeamModulePlugin implements Plugin<Project> {
def goRootDir = "${project.rootDir}/sdks/go"

// This sets the whole project Go version.
project.ext.goVersion = "go1.18.1"
project.ext.goVersion = "go1.19.3"

// Minor TODO: Figure out if we can pull out the GOCMD env variable after goPrepare script
// completion, and avoid this GOBIN substitution.
Expand Down
2 changes: 1 addition & 1 deletion release/go-licenses/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.
###############################################################################

FROM golang:1.18-bullseye
FROM golang:1.19-bullseye

WORKDIR /usr/src/app
COPY go.mod ./
Expand Down
2 changes: 1 addition & 1 deletion sdks/go/run_with_go_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ set -e
#
# This variable is also used as the execution command downscript.
# The list of downloadable versions are at https://go.dev/dl/
GOVERS=go1.18.1
GOVERS=go1.19.3

if ! command -v go &> /dev/null
then
Expand Down