workflows: fix node-gyp S3 path, swap softprops for gh CLI, add CloudFront check#18
Draft
harshita-gupta wants to merge 1 commit intomainfrom
Draft
workflows: fix node-gyp S3 path, swap softprops for gh CLI, add CloudFront check#18harshita-gupta wants to merge 1 commit intomainfrom
harshita-gupta wants to merge 1 commit intomainfrom
Conversation
…ability check Several follow-up corrections to PR #17: 1. Move S3 upload from `node-gyp/*` to `node/gyp/*`. The `asana-oss-cache` bucket is BlockPublicAccess-enabled, so Mac dev laptops read via CloudFront (asana-oss-cache.asana.biz, per the Bazel URL rewriter in tools/bzl/config/external_bazel_downloader.cfg). CloudFront only serves paths listed in `path_patterns` (terraform/general/buildinfra/system_packages.tf), which includes `node/*` but NOT `node-gyp/*`. The previous path would have 403'd on every Mac Bazel build. Nesting under `node/*` reuses the existing allowlisted prefix. 2. Remove `--acl public-read` from `aws s3 cp`. The bucket has `BlockPublicAcls: true` AND `IgnorePublicAcls: true` — the ACL is silently dropped. The IAM role (S3_ACCESS_MODE.PUT) doesn't grant PutObjectAcl either. Reads go via CloudFront anyway, so the flag is misleading dead code. 3. Replace `softprops/action-gh-release` with GitHub's first-party `gh` CLI. `gh release upload` is pre-installed on GitHub-hosted runners, removes a third-party supply-chain dependency, and behaves equivalently (with --clobber). 4. Add a post-upload CloudFront reachability check (`curl -fI`). If the S3 key prefix ever falls outside CloudFront's path_patterns, Mac builds will silently 403. Failing the workflow here surfaces the issue before consumers hit it. 5. Update stage_for_s3.bash's echo text to match the new S3 path and clarify that workflow_dispatch from main is required. Action pinning: tag-pinned per codez convention (100% of codez workflows use tags, not SHAs). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Five follow-up corrections to #17 based on post-merge audit findings:
Move S3 upload from
node-gyp/*tonode/gyp/*.The
asana-oss-cachebucket is BlockPublicAccess-enabled; Mac dev laptops read via CloudFront (asana-oss-cache.asana.biz, per the Bazel URL rewriter intools/bzl/config/external_bazel_downloader.cfg). CloudFront only serves paths listed inpath_patterns(codez'sasana2/asana/tools/terraform/general/buildinfra/system_packages.tf), which includesnode/*but NOTnode-gyp/*. The previous path would have 403'd on every Mac Bazel build. Nesting undernode/*reuses the existing allowlisted prefix — no Terraform change needed.Remove
--acl public-readfromaws s3 cp.The bucket has
BlockPublicAcls: trueANDIgnorePublicAcls: true— the ACL is silently dropped. The IAM role (S3_ACCESS_MODE.PUT) also doesn't grantPutObjectAcl. Reads go via CloudFront anyway, so the flag is misleading dead code.Replace
softprops/action-gh-releasewithgh release upload(first-party GitHub CLI).ghis pre-installed on GitHub-hosted runners. Removes a third-party supply-chain dependency (softpropsis a single-maintainer action).--clobbermatches softprops's default overwrite behavior.Add a post-upload CloudFront reachability check.
If the S3 key prefix ever falls outside CloudFront's
path_patterns, Mac builds will silently 403.curl -fsSIagainst the CloudFront URL fails the workflow at upload time rather than at consumer-build time.Update
stage_for_s3.bashecho text to match the new S3 path and clarify thatworkflow_dispatchfrom main is required.Action pinning
Tag-pinned per codez convention (100% of codez workflows use tags, not SHAs).
Merge prerequisites
z permissions iam pushcompleted, so the IAM role's ARN scope allowsnode/gyp/*uploads. Without this,aws s3 cpfails with AccessDenied.Test plan
build-node-packages.ymlfrommain(not from a version branch)asana-oss-cache.asana.biztools_repositories.bzlRisks
🤖 Generated with Claude Code