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

pabloem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new f9feffcaec7 GHA fix: GCP User Roles (#36429)
f9feffcaec7 is described below

commit f9feffcaec7b7eca45f29a88b7c371a192079730
Author: Enrique Calderon <[email protected]>
AuthorDate: Tue Oct 7 15:50:41 2025 -0600

    GHA fix: GCP User Roles (#36429)
    
    * Change user roles for testing
    
    * Add size check for Terraform plan in PR comments
---
 .github/workflows/beam_Infrastructure_UsersPermissions.yml | 14 ++++++++++----
 infra/iam/users.yml                                        |  2 +-
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/beam_Infrastructure_UsersPermissions.yml 
b/.github/workflows/beam_Infrastructure_UsersPermissions.yml
index 1a73045a492..540201d7e2d 100644
--- a/.github/workflows/beam_Infrastructure_UsersPermissions.yml
+++ b/.github/workflows/beam_Infrastructure_UsersPermissions.yml
@@ -73,10 +73,16 @@ jobs:
       - name: Create comment body
         if: github.event_name == 'pull_request_target'
         run: |
-          echo "### Terraform Plan for User Roles Changes" > comment_body.txt
-          echo '```' >> comment_body.txt
-          cat ./infra/iam/tfplan.txt >> comment_body.txt
-          echo '```' >> comment_body.txt
+          PLAN_SIZE=$(wc -c < ./infra/iam/tfplan.txt)
+          if [ "$PLAN_SIZE" -gt 60000 ]; then
+            echo "### Terraform Plan for User Roles Changes" > comment_body.txt
+            echo "Plan is too big, review in Github Action Logs" >> 
comment_body.txt
+          else
+            echo "### Terraform Plan for User Roles Changes" > comment_body.txt
+            echo '```' >> comment_body.txt
+            cat ./infra/iam/tfplan.txt >> comment_body.txt
+            echo '```' >> comment_body.txt
+          fi
 
       - name: Upload plan as a comment to PR
         if: github.event_name == 'pull_request_target'
diff --git a/infra/iam/users.yml b/infra/iam/users.yml
index bffdbebb7e7..aaa262c1c95 100644
--- a/infra/iam/users.yml
+++ b/infra/iam/users.yml
@@ -367,7 +367,7 @@
 - username: enriquecaol04
   email: [email protected]
   permissions:
-  - role: projects/apache-beam-testing/roles/beam_viewer
+  - role: roles/viewer
 - username: eventarc-workflow-sa
   email: [email protected]
   permissions:

Reply via email to