Skip to content

Run numpy preview upload in pytorchbot-env environment - #8369

Closed
atalman wants to merge 1 commit into
pytorch:mainfrom
atalman:atalman/numpy-preview-pytorchbot-env
Closed

Run numpy preview upload in pytorchbot-env environment#8369
atalman wants to merge 1 commit into
pytorch:mainfrom
atalman:atalman/numpy-preview-pytorchbot-env

Conversation

@atalman

@atalman atalman commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

The Build numpy for preview Python workflow (#8362) failed on a real (non-dry) workflow_dispatch upload run at the Configure AWS credentials step:

Could not assume role with OIDC: Not authorized to perform sts:AssumeRoleWithWebIdentity

The gha_workflow_nightly_build_wheels / gha_workflow_test_build_wheels OIDC roles (and the R2_* upload secrets) are only assumable from the pytorchbot-env environment — the same environment _binary_upload.yml and update-s3-html.yml use. The workflow didn't declare it, so the OIDC claim was rejected.

Fix

Enter pytorchbot-env for real upload runs only:

environment: ${{ (github.event_name == 'workflow_dispatch' && !inputs.dry_run) && 'pytorchbot-env' || '' }}

Dry runs and pull_request builds stay outside the environment so they aren't gated on environment approval (they don't touch AWS/R2 anyway).

The gha_workflow_nightly_build_wheels / gha_workflow_test_build_wheels OIDC
roles and the R2 upload secrets are only assumable from the pytorchbot-env
environment, so the upload run failed with 'Not authorized to perform
sts:AssumeRoleWithWebIdentity'. Enter that environment for real upload runs
(workflow_dispatch with dry_run disabled); dry runs and PR builds stay
outside it so they are not gated on environment approval.
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

@atalman is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 24, 2026
@atalman atalman closed this Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant