From c87683f5fc71e5a1248c7dce2c0d00f3b4e8631b Mon Sep 17 00:00:00 2001 From: aibrahiim Date: Fri, 25 Sep 2026 01:29:27 +0300 Subject: [PATCH 1/2] fix PostCommit GCP auth and reducing LeaderBoardIT flakiness --- .github/workflows/beam_PostCommit_Python.yml | 19 +++++++++++++++++++ .../complete/game/leader_board_it_test.py | 10 ++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.github/workflows/beam_PostCommit_Python.yml b/.github/workflows/beam_PostCommit_Python.yml index f9df7e2583ea..cc366d06724c 100644 --- a/.github/workflows/beam_PostCommit_Python.yml +++ b/.github/workflows/beam_PostCommit_Python.yml @@ -95,6 +95,25 @@ jobs: PY_VER=${{ matrix.python_version }} PY_VER_CLEAN=${PY_VER//.} echo "py_ver_clean=$PY_VER_CLEAN" >> $GITHUB_OUTPUT + - name: Authenticate on GCP + id: auth + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 + with: + service_account: ${{ secrets.GCP_SA_EMAIL }} + credentials_json: ${{ secrets.GCP_SA_KEY }} + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db + - name: Activate service account in runner gcloud config + env: + CLOUDSDK_CONFIG: ${{ env.KUBELET_GCLOUD_CONFIG_PATH}} + run: | + mkdir -p "$CLOUDSDK_CONFIG" + cp "${{ steps.auth.outputs.credentials_file_path }}" \ + "$CLOUDSDK_CONFIG/application_default_credentials.json" + gcloud auth activate-service-account \ + "${{ secrets.GCP_SA_EMAIL }}" \ + --key-file="${{ steps.auth.outputs.credentials_file_path }}" + gcloud config set project apache-beam-testing - name: run PostCommit Python ${{ matrix.python_version }} script uses: ./.github/actions/gradle-command-self-hosted-action with: diff --git a/sdks/python/apache_beam/examples/complete/game/leader_board_it_test.py b/sdks/python/apache_beam/examples/complete/game/leader_board_it_test.py index 4cc13171fe92..8c1292af3db0 100644 --- a/sdks/python/apache_beam/examples/complete/game/leader_board_it_test.py +++ b/sdks/python/apache_beam/examples/complete/game/leader_board_it_test.py @@ -124,7 +124,10 @@ def test_leader_board_it(self): self.OUTPUT_TABLE_USERS, success_condition)) bq_users_verifier = BigqueryMatcher( - self.project, users_query, self.DEFAULT_EXPECTED_CHECKSUM) + self.project, + users_query, + self.DEFAULT_EXPECTED_CHECKSUM, + timeout_secs=300) teams_query = ( 'SELECT total_score FROM `%s.%s.%s` ' @@ -134,7 +137,10 @@ def test_leader_board_it(self): self.OUTPUT_TABLE_TEAMS, success_condition)) bq_teams_verifier = BigqueryMatcher( - self.project, teams_query, self.DEFAULT_EXPECTED_CHECKSUM) + self.project, + teams_query, + self.DEFAULT_EXPECTED_CHECKSUM, + timeout_secs=300) extra_opts = { 'allow_unsafe_triggers': True, From f446cd58974e8d3b2cd07932d02c4aafd3061088 Mon Sep 17 00:00:00 2001 From: aibrahiim Date: Fri, 25 Sep 2026 03:35:39 +0300 Subject: [PATCH 2/2] trigger workflow --- .github/trigger_files/beam_PostCommit_Python.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/trigger_files/beam_PostCommit_Python.json b/.github/trigger_files/beam_PostCommit_Python.json index 9bfa92ff5106..9f1daca01a0f 100644 --- a/.github/trigger_files/beam_PostCommit_Python.json +++ b/.github/trigger_files/beam_PostCommit_Python.json @@ -1,5 +1,5 @@ { "comment": "Modify this file in a trivial way to cause this test suite to run.", "pr": "40139", - "modification": 59 + "modification": 60 }