From 2ed27b2ea492731e8b284c7b124936e078cead15 Mon Sep 17 00:00:00 2001 From: aIbrahiim Date: Tue, 4 Nov 2025 15:12:13 +0200 Subject: [PATCH 1/3] Added Docker authentication --- ...it_Python_ValidatesContainer_Dataflow_With_RC.yml | 12 ++++++++++++ sdks/python/container/run_validatescontainer.sh | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/.github/workflows/beam_PostCommit_Python_ValidatesContainer_Dataflow_With_RC.yml b/.github/workflows/beam_PostCommit_Python_ValidatesContainer_Dataflow_With_RC.yml index 482a4d509106..599b4e8326e0 100644 --- a/.github/workflows/beam_PostCommit_Python_ValidatesContainer_Dataflow_With_RC.yml +++ b/.github/workflows/beam_PostCommit_Python_ValidatesContainer_Dataflow_With_RC.yml @@ -81,6 +81,18 @@ jobs: with: java-version: default python-version: ${{ matrix.python_version }} + - name: Authenticate to GCP + uses: google-github-actions/auth@v3 + with: + service_account: ${{ secrets.GCP_SA_EMAIL }} + credentials_json: ${{ secrets.GCP_SA_KEY }} + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@v3 + - name: Configure Docker auth for GCR + run: | + gcloud --quiet auth configure-docker us.gcr.io + gcloud --quiet auth configure-docker gcr.io + gcloud auth list - name: Set PY_VER_CLEAN id: set_py_ver_clean run: | diff --git a/sdks/python/container/run_validatescontainer.sh b/sdks/python/container/run_validatescontainer.sh index 1377b66a6abe..875fd1a138c7 100755 --- a/sdks/python/container/run_validatescontainer.sh +++ b/sdks/python/container/run_validatescontainer.sh @@ -134,6 +134,11 @@ echo ">>> Successfully built and push container $CONTAINER" cd sdks/python SDK_LOCATION=$2 +echo ">>> Configuring Docker authentication for GCR" +gcloud --quiet auth configure-docker us.gcr.io +gcloud --quiet auth configure-docker gcr.io +gcloud auth print-access-token | docker login -u oauth2accesstoken --password-stdin https://us.gcr.io + echo ">>> RUNNING DATAFLOW RUNNER VALIDATESCONTAINER TEST" pytest -o log_cli=True -o log_level=Info -o junit_suite_name=$IMAGE_NAME \ -m=it_validatescontainer \ From b75ac2ca5da517b43f979859e1c7e1c6c7ded686 Mon Sep 17 00:00:00 2001 From: aIbrahiim Date: Tue, 4 Nov 2025 17:26:57 +0200 Subject: [PATCH 2/3] removed the Docker auth step from the workflow --- ...PostCommit_Python_ValidatesContainer_Dataflow_With_RC.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/beam_PostCommit_Python_ValidatesContainer_Dataflow_With_RC.yml b/.github/workflows/beam_PostCommit_Python_ValidatesContainer_Dataflow_With_RC.yml index 599b4e8326e0..e3e769fa60bb 100644 --- a/.github/workflows/beam_PostCommit_Python_ValidatesContainer_Dataflow_With_RC.yml +++ b/.github/workflows/beam_PostCommit_Python_ValidatesContainer_Dataflow_With_RC.yml @@ -88,11 +88,6 @@ jobs: credentials_json: ${{ secrets.GCP_SA_KEY }} - name: Set up Cloud SDK uses: google-github-actions/setup-gcloud@v3 - - name: Configure Docker auth for GCR - run: | - gcloud --quiet auth configure-docker us.gcr.io - gcloud --quiet auth configure-docker gcr.io - gcloud auth list - name: Set PY_VER_CLEAN id: set_py_ver_clean run: | From 4ebea56a8bd24506317f90b02f6b64ccf89f69ec Mon Sep 17 00:00:00 2001 From: aIbrahiim Date: Tue, 4 Nov 2025 19:23:43 +0200 Subject: [PATCH 3/3] Fix Docker auth and update google cloud storage in ValidatesContainer workflow --- ...mmit_Python_ValidatesContainer_Dataflow_With_RC.yml | 10 +++++++++- sdks/python/setup.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/beam_PostCommit_Python_ValidatesContainer_Dataflow_With_RC.yml b/.github/workflows/beam_PostCommit_Python_ValidatesContainer_Dataflow_With_RC.yml index e3e769fa60bb..5297e7365e48 100644 --- a/.github/workflows/beam_PostCommit_Python_ValidatesContainer_Dataflow_With_RC.yml +++ b/.github/workflows/beam_PostCommit_Python_ValidatesContainer_Dataflow_With_RC.yml @@ -88,6 +88,14 @@ jobs: credentials_json: ${{ secrets.GCP_SA_KEY }} - name: Set up Cloud SDK uses: google-github-actions/setup-gcloud@v3 + - name: Configure Docker auth for GCR + run: | + gcloud --quiet auth configure-docker us.gcr.io + gcloud --quiet auth configure-docker gcr.io + gcloud auth list + - name: Docker login to GCR + run: | + gcloud auth print-access-token | docker login -u oauth2accesstoken --password-stdin https://us.gcr.io - name: Set PY_VER_CLEAN id: set_py_ver_clean run: | @@ -125,4 +133,4 @@ jobs: commit: '${{ env.prsha || env.GITHUB_SHA }}' comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }} files: '**/pytest*.xml' - large_files: true \ No newline at end of file + large_files: true diff --git a/sdks/python/setup.py b/sdks/python/setup.py index 534324b83c18..d53d5c87dd10 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -482,7 +482,7 @@ def get_portability_package_data(): 'google-cloud-datastore>=2.0.0,<3', 'google-cloud-pubsub>=2.1.0,<3', 'google-cloud-pubsublite>=1.2.0,<2', - 'google-cloud-storage>=2.18.2,<3', + 'google-cloud-storage>=3.0.0,<4', # GCP packages required by tests 'google-cloud-bigquery>=2.0.0,<4', 'google-cloud-bigquery-storage>=2.6.3,<3',