From 330de82272ee984463ec0d8db6ce93f4393936b3 Mon Sep 17 00:00:00 2001 From: lostluck <13907733+lostluck@users.noreply.github.com> Date: Fri, 17 Feb 2023 12:25:24 -0800 Subject: [PATCH 1/4] Update Go SDK version to 1.19 --- .github/actions/setup-self-hosted-action/action.yml | 8 ++++---- .github/workflows/build_playground_frontend.yml | 2 +- .github/workflows/go_tests.yml | 2 +- .github/workflows/playground_deploy_backend.yml | 2 +- .github/workflows/python_tests.yml | 2 +- CHANGES.md | 1 + .../groovy/org/apache/beam/gradle/BeamModulePlugin.groovy | 2 +- dev-support/docker/Dockerfile | 2 +- sdks/go.mod | 2 +- 9 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/actions/setup-self-hosted-action/action.yml b/.github/actions/setup-self-hosted-action/action.yml index 27469359e26a..430a7e1d828e 100644 --- a/.github/actions/setup-self-hosted-action/action.yml +++ b/.github/actions/setup-self-hosted-action/action.yml @@ -34,9 +34,9 @@ inputs: required: false description: 'Set as false if does not require java-8 setup' default: 'true' - requires-go-18: + requires-go-19: required: false - description: 'Set as false if does not require go-18 setup' + description: 'Set as false if does not require go-19 setup' default: 'true' runs: @@ -64,7 +64,7 @@ runs: distribution: 'temurin' java-version: 8 - name: Set Go Version - if: ${{ inputs.requires-go-18 == 'true' }} + if: ${{ inputs.requires-go-19 == 'true' }} uses: actions/setup-go@v3 with: - go-version: '1.18.0' + go-version: '1.19.0' diff --git a/.github/workflows/build_playground_frontend.yml b/.github/workflows/build_playground_frontend.yml index d2f64dfddb24..26800b6cfecb 100644 --- a/.github/workflows/build_playground_frontend.yml +++ b/.github/workflows/build_playground_frontend.yml @@ -34,7 +34,7 @@ jobs: name: Build Playground Frontend App runs-on: [self-hosted, ubuntu-20.04] env: - GO_VERSION: 1.18.0 + GO_VERSION: 1.19.6 BEAM_VERSION: 2.40.0 TERRAFORM_VERSION: 1.0.9 FLUTTER_VERSION: 3.3.2 diff --git a/.github/workflows/go_tests.yml b/.github/workflows/go_tests.yml index fc772eb1ab2d..49cbe902a7b3 100644 --- a/.github/workflows/go_tests.yml +++ b/.github/workflows/go_tests.yml @@ -44,7 +44,7 @@ jobs: fetch-depth: 2 - uses: actions/setup-go@v3 with: - go-version: '1.18' + go-version: '1.19' - name: Delete old coverage run: "cd sdks/go/pkg && rm -rf .coverage || :" - name: Run coverage diff --git a/.github/workflows/playground_deploy_backend.yml b/.github/workflows/playground_deploy_backend.yml index b42db8027785..02a4c7992613 100644 --- a/.github/workflows/playground_deploy_backend.yml +++ b/.github/workflows/playground_deploy_backend.yml @@ -34,7 +34,7 @@ jobs: name: Build Playground Backend App runs-on: ubuntu-latest env: - GO_VERSION: 1.18.0 + GO_VERSION: 1.19.6 BEAM_VERSION: 2.40.0 TERRAFORM_VERSION: 1.0.9 STAND_SUFFIX: '' diff --git a/.github/workflows/python_tests.yml b/.github/workflows/python_tests.yml index 181a90e1da57..faffbea165fb 100644 --- a/.github/workflows/python_tests.yml +++ b/.github/workflows/python_tests.yml @@ -179,7 +179,7 @@ jobs: - name: Install go uses: actions/setup-go@v3 with: - go-version: '1.18' + go-version: '1.19' - name: Download source from artifacts uses: actions/download-artifact@v3 with: diff --git a/CHANGES.md b/CHANGES.md index 252fba0ca044..204ba11ca09b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -75,6 +75,7 @@ * Add `WatchFilePattern` transform, which can be used as a side input to the RunInference PTransfrom to watch for model updates using a file pattern. ([#24042](https://github.com/apache/beam/issues/24042)) * Add support for loading TorchScript models with `PytorchModelHandler`. The TorchScript model path can be passed to PytorchModelHandler using `torch_script_model_path=`. ([#25321](https://github.com/apache/beam/pull/25321)) +* The Go SDK now requires Go 1.19 to build. ## Breaking Changes diff --git a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy index e44b1ff4cb08..7c04d81ef58a 100644 --- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy +++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy @@ -2015,7 +2015,7 @@ class BeamModulePlugin implements Plugin { def goRootDir = "${project.rootDir}/sdks/go" // This sets the whole project Go version. - project.ext.goVersion = "go1.19.3" + project.ext.goVersion = "go1.19.6" // Minor TODO: Figure out if we can pull out the GOCMD env variable after goPrepare script // completion, and avoid this GOBIN substitution. diff --git a/dev-support/docker/Dockerfile b/dev-support/docker/Dockerfile index 3e17c9c96777..1301baa041f4 100644 --- a/dev-support/docker/Dockerfile +++ b/dev-support/docker/Dockerfile @@ -78,7 +78,7 @@ RUN pip3 install distlib==0.3.1 yapf==0.29.0 pytest ### # Install Go ### -ENV DOWNLOAD_GO_VERSION=1.17.6 +ENV DOWNLOAD_GO_VERSION=1.19.6 RUN wget https://golang.org/dl/go${DOWNLOAD_GO_VERSION}.linux-amd64.tar.gz && \ tar -C /usr/local -xzf go${DOWNLOAD_GO_VERSION}.linux-amd64.tar.gz ENV GOROOT /usr/local/go diff --git a/sdks/go.mod b/sdks/go.mod index ec8a5852788a..cd2469813528 100644 --- a/sdks/go.mod +++ b/sdks/go.mod @@ -20,7 +20,7 @@ // directory. module github.com/apache/beam/sdks/v2 -go 1.18 +go 1.19 require ( cloud.google.com/go/bigquery v1.45.0 From 2d2408d6293741cca0ab06154c85469e4ab2cbe7 Mon Sep 17 00:00:00 2001 From: lostluck <13907733+lostluck@users.noreply.github.com> Date: Fri, 17 Feb 2023 12:27:39 -0800 Subject: [PATCH 2/4] update CHANGES.md --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 204ba11ca09b..e5c097439240 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -75,7 +75,7 @@ * Add `WatchFilePattern` transform, which can be used as a side input to the RunInference PTransfrom to watch for model updates using a file pattern. ([#24042](https://github.com/apache/beam/issues/24042)) * Add support for loading TorchScript models with `PytorchModelHandler`. The TorchScript model path can be passed to PytorchModelHandler using `torch_script_model_path=`. ([#25321](https://github.com/apache/beam/pull/25321)) -* The Go SDK now requires Go 1.19 to build. +* The Go SDK now requires Go 1.19 to build. ([#25545](https://github.com/apache/beam/pull/25545)) ## Breaking Changes From 4b4ec9cd19d3e6e753b8cca95635dc1751667c11 Mon Sep 17 00:00:00 2001 From: lostluck <13907733+lostluck@users.noreply.github.com> Date: Fri, 17 Feb 2023 12:33:46 -0800 Subject: [PATCH 3/4] Update docs. --- website/www/site/content/en/documentation/programming-guide.md | 2 +- website/www/site/content/en/get-started/quickstart-go.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/www/site/content/en/documentation/programming-guide.md b/website/www/site/content/en/documentation/programming-guide.md index 08e47637634c..eeda63211b6e 100644 --- a/website/www/site/content/en/documentation/programming-guide.md +++ b/website/www/site/content/en/documentation/programming-guide.md @@ -39,7 +39,7 @@ The Python SDK supports Python 3.7, 3.8, 3.9, and 3.10. {{< /paragraph >}} {{< paragraph class="language-go">}} -The Go SDK supports Go v1.18+. SDK release 2.32.0 is the last experimental version. +The Go SDK supports Go v1.19+. SDK release 2.32.0 is the last experimental version. {{< /paragraph >}} {{< paragraph class="language-typescript">}} diff --git a/website/www/site/content/en/get-started/quickstart-go.md b/website/www/site/content/en/get-started/quickstart-go.md index 6c82f10e30fa..c2504205aa6c 100644 --- a/website/www/site/content/en/get-started/quickstart-go.md +++ b/website/www/site/content/en/get-started/quickstart-go.md @@ -25,7 +25,7 @@ If you're interested in contributing to the Apache Beam Go codebase, see the [Co ## Set up your environment -The Beam SDK for Go requires `go` version 1.18 or newer. It can be downloaded [here](https://golang.org/). Check that you have version 1.18 by running: +The Beam SDK for Go requires `go` version 1.19 or newer. It can be downloaded [here](https://golang.org/). Check that you have version 1.19 by running: {{< highlight >}} $ go version From 66f05779020f7e6a688265f8024867e1739bcad1 Mon Sep 17 00:00:00 2001 From: lostluck <13907733+lostluck@users.noreply.github.com> Date: Fri, 17 Feb 2023 14:38:08 -0800 Subject: [PATCH 4/4] staticheckfix --- .../beam/runners/prism/internal/jobservices/metrics_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdks/go/pkg/beam/runners/prism/internal/jobservices/metrics_test.go b/sdks/go/pkg/beam/runners/prism/internal/jobservices/metrics_test.go index d06d6774828e..e0346731f300 100644 --- a/sdks/go/pkg/beam/runners/prism/internal/jobservices/metrics_test.go +++ b/sdks/go/pkg/beam/runners/prism/internal/jobservices/metrics_test.go @@ -23,7 +23,6 @@ import ( "github.com/apache/beam/sdks/v2/go/pkg/beam/core/graph/coder" fnpb "github.com/apache/beam/sdks/v2/go/pkg/beam/model/fnexecution_v1" - "github.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1" pipepb "github.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1" "github.com/google/go-cmp/cmp" "google.golang.org/protobuf/proto" @@ -73,7 +72,7 @@ func Test_metricsStore_ContributeMetrics(t *testing.T) { // TODO convert input to non-legacy metrics once we support, and then delete these. input [][]*pipepb.MonitoringInfo - want []*pipeline_v1.MonitoringInfo + want []*pipepb.MonitoringInfo }{ { name: "int64Sum",