You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lo...@apache.org on 2023/02/20 00:57:26 UTC

[beam] 04/13: Update Go SDK minimum Go version to 1.19 (#25545)

This is an automated email from the ASF dual-hosted git repository.

lostluck pushed a commit to branch prism-jobservices
in repository https://gitbox.apache.org/repos/asf/beam.git

commit efc1d3629c29431338c482e448a743d7c20d9842
Author: Robert Burke <lo...@users.noreply.github.com>
AuthorDate: Fri Feb 17 14:47:32 2023 -0800

    Update Go SDK minimum Go version to 1.19 (#25545)
    
    * Update Go SDK version to 1.19
    
    * update CHANGES.md
    
    * Update docs.
    
    * staticheckfix
    
    ---------
    
    Co-authored-by: lostluck <13...@users.noreply.github.com>
---
 .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 +
 .../main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy    | 2 +-
 dev-support/docker/Dockerfile                                     | 2 +-
 sdks/go.mod                                                       | 2 +-
 website/www/site/content/en/documentation/programming-guide.md    | 2 +-
 website/www/site/content/en/get-started/quickstart-go.md          | 2 +-
 11 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/.github/actions/setup-self-hosted-action/action.yml b/.github/actions/setup-self-hosted-action/action.yml
index 27469359e26..430a7e1d828 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 d2f64dfddb2..26800b6cfec 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 fc772eb1ab2..49cbe902a7b 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 b42db802778..02a4c799261 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 181a90e1da5..faffbea165f 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 252fba0ca04..e5c09743924 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=<path_to_model>`. ([#25321](https://github.com/apache/beam/pull/25321))
+* The Go SDK now requires Go 1.19 to build. ([#25545](https://github.com/apache/beam/pull/25545))
 
 ## 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 e44b1ff4cb0..7c04d81ef58 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<Project> {
       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 3e17c9c9677..1301baa041f 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 ec8a5852788..cd246981352 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
diff --git a/website/www/site/content/en/documentation/programming-guide.md b/website/www/site/content/en/documentation/programming-guide.md
index 08e47637634..eeda63211b6 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 6c82f10e30f..c2504205aa6 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