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

uranusjr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 79b500352e0 Run Go SDK tests outside repo and on latest Go (#77014)
79b500352e0 is described below

commit 79b500352e0f03554a2f296a87686c2da77357b5
Author: Tzu-ping Chung <[email protected]>
AuthorDate: Mon Nov 16 16:06:59 2026 +0800

    Run Go SDK tests outside repo and on latest Go (#77014)
    
    The Go SDK 1.0.0 vote found two test failures CI had missed.
    TestRuleConstantsMatchPython read files outside go-sdk, so it failed in
    the source release, and TestTriggerDagRunRejectsAnInvalidSpec matched
    encoding/json error text that Go 1.27 changed. Both were fixed in other
    PRs.
    
    The Go SDK job now also runs the tests from a copy of go-sdk outside the
    repository, and on the latest stable Go. The stable run does not fail
    the job, so a new Go release does not break CI on its own.
---
 .github/workflows/ci-amd.yml | 23 +++++++++++++++++++++++
 .github/workflows/ci-arm.yml | 23 +++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/.github/workflows/ci-amd.yml b/.github/workflows/ci-amd.yml
index 76a57dc477b..b9c5e37f47d 100644
--- a/.github/workflows/ci-amd.yml
+++ b/.github/workflows/ci-amd.yml
@@ -1462,6 +1462,29 @@ jobs:
         run: |
           go install golang.org/x/vuln/cmd/[email protected]
           govulncheck ./...
+      # The Go SDK source release ships go-sdk alone, and its tests must pass 
there. Running them
+      # from a copy outside the repository fails on any test that reads a file 
outside go-sdk.
+      - name: Run Go tests outside the Airflow repository
+        run: |
+          cp -a go-sdk "${RUNNER_TEMP}/go-sdk"
+          cd "${RUNNER_TEMP}/go-sdk"
+          gotestsum --format github-actions ./...
+      # The steps above use the pinned Go, but users build with newer ones. A 
new Go can change
+      # standard library behaviour that a test depends on, such as the text of 
an encoding/json
+      # error in Go 1.27. These steps come last because setup-go puts the new 
Go first on PATH.
+      # They do not fail the job, so that a new Go release does not break CI 
on its own.
+      - name: Setup the latest stable Go
+        uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e  # 
v7.0.0
+        with:
+          go-version: stable
+          # The pinned Go's setup already restores and saves the module cache.
+          cache: false
+      - name: Run Go tests on the latest stable Go
+        continue-on-error: true
+        working-directory: ./go-sdk
+        run: |
+          go version
+          gotestsum --format github-actions ./...
 
   tests-ts-sdk:
     name: "TypeScript SDK tests"
diff --git a/.github/workflows/ci-arm.yml b/.github/workflows/ci-arm.yml
index 98d8f07c50a..285aac57c35 100644
--- a/.github/workflows/ci-arm.yml
+++ b/.github/workflows/ci-arm.yml
@@ -1338,6 +1338,29 @@ jobs:
         run: |
           go install golang.org/x/vuln/cmd/[email protected]
           govulncheck ./...
+      # The Go SDK source release ships go-sdk alone, and its tests must pass 
there. Running them
+      # from a copy outside the repository fails on any test that reads a file 
outside go-sdk.
+      - name: Run Go tests outside the Airflow repository
+        run: |
+          cp -a go-sdk "${RUNNER_TEMP}/go-sdk"
+          cd "${RUNNER_TEMP}/go-sdk"
+          gotestsum --format github-actions ./...
+      # The steps above use the pinned Go, but users build with newer ones. A 
new Go can change
+      # standard library behaviour that a test depends on, such as the text of 
an encoding/json
+      # error in Go 1.27. These steps come last because setup-go puts the new 
Go first on PATH.
+      # They do not fail the job, so that a new Go release does not break CI 
on its own.
+      - name: Setup the latest stable Go
+        uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e  # 
v7.0.0
+        with:
+          go-version: stable
+          # The pinned Go's setup already restores and saves the module cache.
+          cache: false
+      - name: Run Go tests on the latest stable Go
+        continue-on-error: true
+        working-directory: ./go-sdk
+        run: |
+          go version
+          gotestsum --format github-actions ./...
 
   tests-ts-sdk:
     name: "TypeScript SDK tests"

Reply via email to