From d402ddccf1467f260a1541e17c6525e8a055a862 Mon Sep 17 00:00:00 2001 From: Eugene Yakhnenko Date: Wed, 17 Jun 2026 11:13:45 -0700 Subject: [PATCH 1/6] fix(ci): replace GitHub Contents API with git push in update-protos workflow The file-by-file upload via gh api PUT broke on large generated files (validate_pb.ts) with "Argument list too long", blocking proto updates for 5+ days. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/update-protos.yaml | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/.github/workflows/update-protos.yaml b/.github/workflows/update-protos.yaml index 8085832c0..b64cd7c62 100644 --- a/.github/workflows/update-protos.yaml +++ b/.github/workflows/update-protos.yaml @@ -128,36 +128,16 @@ jobs: if: steps.check-pr.outputs.EXISTING_PR == '' && steps.update-platform-protos.outputs.changes == 'true' run: | git checkout -b $BRANCH_NAME - git push origin $BRANCH_NAME env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH_NAME: update-platform-protos - - name: Update files + - name: Commit and push changes working-directory: ./web-sdk if: steps.update-platform-protos.outputs.changes == 'true' run: | - echo "Committing changes..." - FILES_CHANGED=$(git status --porcelain | awk '{print $2}') - for file in $FILES_CHANGED; do - echo "Committing file: $file" - - CONTENT=$(base64 -i $file) - FILENAME=$(basename $file) - MESSAGE="Update $FILENAME to match platform tag $LATEST_TAG" - - SHA=$( git rev-parse $BRANCH_NAME:$file 2>/dev/null | grep -E '^[0-9a-f]{40}$' || echo "" ) - if [ -z "$SHA" ]; then - SHA="" - fi - - gh api --method PUT /repos/opentdf/web-sdk/contents/$file \ - --field message="$MESSAGE" \ - --field content="$CONTENT" \ - --field encoding="base64" \ - --field branch="$BRANCH_NAME" \ - --field sha="$SHA" - done + git add -A + git commit -m "fix(sdk): update proto bindings to $LATEST_TAG" + git push origin $BRANCH_NAME env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH_NAME: update-platform-protos From 12ad9e241616dff8fc1dffcd835b2cecf9711458 Mon Sep 17 00:00:00 2001 From: Eugene Yakhnenko Date: Wed, 17 Jun 2026 11:17:21 -0700 Subject: [PATCH 2/6] fix(ci): avoid "Argument list too long" in update-protos workflow Write base64 content to a temp file and use gh api's @file syntax instead of passing it as a CLI argument, which fails on large generated files like validate_pb.ts. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/update-protos.yaml | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-protos.yaml b/.github/workflows/update-protos.yaml index b64cd7c62..d799323c5 100644 --- a/.github/workflows/update-protos.yaml +++ b/.github/workflows/update-protos.yaml @@ -128,16 +128,36 @@ jobs: if: steps.check-pr.outputs.EXISTING_PR == '' && steps.update-platform-protos.outputs.changes == 'true' run: | git checkout -b $BRANCH_NAME + git push origin $BRANCH_NAME env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH_NAME: update-platform-protos - - name: Commit and push changes + - name: Update files working-directory: ./web-sdk if: steps.update-platform-protos.outputs.changes == 'true' run: | - git add -A - git commit -m "fix(sdk): update proto bindings to $LATEST_TAG" - git push origin $BRANCH_NAME + echo "Committing changes..." + FILES_CHANGED=$(git status --porcelain | awk '{print $2}') + for file in $FILES_CHANGED; do + echo "Committing file: $file" + + # Write base64 to a temp file to avoid "Argument list too long" on large generated files + base64 -i $file > /tmp/b64content + FILENAME=$(basename $file) + MESSAGE="Update $FILENAME to match platform tag $LATEST_TAG" + + SHA=$( git rev-parse $BRANCH_NAME:$file 2>/dev/null | grep -E '^[0-9a-f]{40}$' || echo "" ) + if [ -z "$SHA" ]; then + SHA="" + fi + + gh api --method PUT /repos/opentdf/web-sdk/contents/$file \ + --field message="$MESSAGE" \ + --raw-field content=@/tmp/b64content \ + --field branch="$BRANCH_NAME" \ + --field sha="$SHA" + done env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH_NAME: update-platform-protos From 1ef1894899b6293d920236856d7cee127169e9d2 Mon Sep 17 00:00:00 2001 From: Eugene Yakhnenko Date: Wed, 17 Jun 2026 11:19:20 -0700 Subject: [PATCH 3/6] fix(ci): use base64 -w 0 to produce single-line output GitHub Contents API rejects base64 with newlines. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/update-protos.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-protos.yaml b/.github/workflows/update-protos.yaml index d799323c5..49f02dabc 100644 --- a/.github/workflows/update-protos.yaml +++ b/.github/workflows/update-protos.yaml @@ -143,7 +143,7 @@ jobs: echo "Committing file: $file" # Write base64 to a temp file to avoid "Argument list too long" on large generated files - base64 -i $file > /tmp/b64content + base64 -w 0 $file > /tmp/b64content FILENAME=$(basename $file) MESSAGE="Update $FILENAME to match platform tag $LATEST_TAG" From 9e7ac61f67b543e4e14284fdb6f8b56455e43495 Mon Sep 17 00:00:00 2001 From: Eugene Yakhnenko Date: Wed, 17 Jun 2026 11:20:04 -0700 Subject: [PATCH 4/6] fix(ci): replace Contents API with git push in update-protos workflow The file-by-file upload via gh api PUT fails on large generated files. Use git add/commit/push instead, scoped to the known proto outputs. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/update-protos.yaml | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/.github/workflows/update-protos.yaml b/.github/workflows/update-protos.yaml index 49f02dabc..49ad54374 100644 --- a/.github/workflows/update-protos.yaml +++ b/.github/workflows/update-protos.yaml @@ -128,36 +128,16 @@ jobs: if: steps.check-pr.outputs.EXISTING_PR == '' && steps.update-platform-protos.outputs.changes == 'true' run: | git checkout -b $BRANCH_NAME - git push origin $BRANCH_NAME env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH_NAME: update-platform-protos - - name: Update files + - name: Commit and push changes working-directory: ./web-sdk if: steps.update-platform-protos.outputs.changes == 'true' run: | - echo "Committing changes..." - FILES_CHANGED=$(git status --porcelain | awk '{print $2}') - for file in $FILES_CHANGED; do - echo "Committing file: $file" - - # Write base64 to a temp file to avoid "Argument list too long" on large generated files - base64 -w 0 $file > /tmp/b64content - FILENAME=$(basename $file) - MESSAGE="Update $FILENAME to match platform tag $LATEST_TAG" - - SHA=$( git rev-parse $BRANCH_NAME:$file 2>/dev/null | grep -E '^[0-9a-f]{40}$' || echo "" ) - if [ -z "$SHA" ]; then - SHA="" - fi - - gh api --method PUT /repos/opentdf/web-sdk/contents/$file \ - --field message="$MESSAGE" \ - --raw-field content=@/tmp/b64content \ - --field branch="$BRANCH_NAME" \ - --field sha="$SHA" - done + git add lib/src/platform/ lib/platform-proto-version.json + git commit -m "fix(sdk): update proto bindings to $LATEST_TAG" + git push origin $BRANCH_NAME env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH_NAME: update-platform-protos From ded00e072f91edb946675aa76d948a4c48aa09e6 Mon Sep 17 00:00:00 2001 From: Eugene Yakhnenko Date: Wed, 17 Jun 2026 11:20:19 -0700 Subject: [PATCH 5/6] fix(ci): use git add -A instead of scoped paths Co-Authored-By: Claude Opus 4.6 --- .github/workflows/update-protos.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-protos.yaml b/.github/workflows/update-protos.yaml index 49ad54374..b64cd7c62 100644 --- a/.github/workflows/update-protos.yaml +++ b/.github/workflows/update-protos.yaml @@ -135,7 +135,7 @@ jobs: working-directory: ./web-sdk if: steps.update-platform-protos.outputs.changes == 'true' run: | - git add lib/src/platform/ lib/platform-proto-version.json + git add -A git commit -m "fix(sdk): update proto bindings to $LATEST_TAG" git push origin $BRANCH_NAME env: From 98721ecb787dee30a6336d298df7bb302d97badb Mon Sep 17 00:00:00 2001 From: Eugene Yakhnenko Date: Wed, 17 Jun 2026 11:25:06 -0700 Subject: [PATCH 6/6] fix(ci): scope git add to known proto outputs Co-Authored-By: Claude Opus 4.6 --- .github/workflows/update-protos.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-protos.yaml b/.github/workflows/update-protos.yaml index b64cd7c62..49ad54374 100644 --- a/.github/workflows/update-protos.yaml +++ b/.github/workflows/update-protos.yaml @@ -135,7 +135,7 @@ jobs: working-directory: ./web-sdk if: steps.update-platform-protos.outputs.changes == 'true' run: | - git add -A + git add lib/src/platform/ lib/platform-proto-version.json git commit -m "fix(sdk): update proto bindings to $LATEST_TAG" git push origin $BRANCH_NAME env: