Skip to content

Disable attestations for prod PyPI publish (#5230)#5230

Closed
alibeklfc wants to merge 1 commit into
facebookresearch:mainfrom
alibeklfc:export-D106110673
Closed

Disable attestations for prod PyPI publish (#5230)#5230
alibeklfc wants to merge 1 commit into
facebookresearch:mainfrom
alibeklfc:export-D106110673

Conversation

@alibeklfc
Copy link
Copy Markdown
Contributor

@alibeklfc alibeklfc commented May 22, 2026

Summary:

Disables Sigstore attestations (attestations: false) in the prod PyPI publish step. The pypa/gh-action-pypi-publish action generates attestation certificates that carry the top-level workflow (build.yml) as the Build Config URI, but PyPI verifies attestations against the trusted publisher which is configured as build-pip.yml (the reusable workflow where the publish job is defined). This mismatch causes a 400 Invalid attestations rejection when build.yml calls build-pip.yml via workflow_call.

TestPyPI is unaffected because workflow_dispatch triggers build-pip.yml directly, so the certificate and publisher both say build-pip.yml.

This is a known limitation of pypa/gh-action-pypi-publish with reusable workflows. Attestations can be re-enabled once PyPI supports matching against workflow_ref in addition to job_workflow_ref for attestation verification, or once the publish job is moved out of the reusable workflow.

Reviewed By: mnorris11

Differential Revision: D106110673

@meta-cla meta-cla Bot added the CLA Signed label May 22, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented May 22, 2026

@alibeklfc has exported this pull request. If you are a Meta employee, you can view the originating Diff in D106110673.

alibeklfc added a commit to alibeklfc/faiss that referenced this pull request May 22, 2026
Summary:
Pull Request resolved: facebookresearch#5230

Disables Sigstore attestations (`attestations: false`) in the prod PyPI publish step. The `pypa/gh-action-pypi-publish` action generates attestation certificates that carry the top-level workflow (`build.yml`) as the Build Config URI, but PyPI verifies attestations against the trusted publisher which is configured as `build-pip.yml` (the reusable workflow where the publish job is defined). This mismatch causes a `400 Invalid attestations` rejection when `build.yml` calls `build-pip.yml` via `workflow_call`.

TestPyPI is unaffected because `workflow_dispatch` triggers `build-pip.yml` directly, so the certificate and publisher both say `build-pip.yml`.

This is a known limitation of `pypa/gh-action-pypi-publish` with reusable workflows. Attestations can be re-enabled once PyPI supports matching against `workflow_ref` in addition to `job_workflow_ref` for attestation verification, or once the publish job is moved out of the reusable workflow.

Reviewed By: mnorris11

Differential Revision: D106110673
@meta-codesync meta-codesync Bot changed the title Disable attestations for prod PyPI publish Disable attestations for prod PyPI publish (#5230) May 22, 2026
@alibeklfc alibeklfc force-pushed the export-D106110673 branch from 1301162 to bc1e13c Compare May 22, 2026 18:36
Summary:
Pull Request resolved: facebookresearch#5230

Disables Sigstore attestations (`attestations: false`) in the prod PyPI publish step. The `pypa/gh-action-pypi-publish` action generates attestation certificates that carry the top-level workflow (`build.yml`) as the Build Config URI, but PyPI verifies attestations against the trusted publisher which is configured as `build-pip.yml` (the reusable workflow where the publish job is defined). This mismatch causes a `400 Invalid attestations` rejection when `build.yml` calls `build-pip.yml` via `workflow_call`.

TestPyPI is unaffected because `workflow_dispatch` triggers `build-pip.yml` directly, so the certificate and publisher both say `build-pip.yml`.

This is a known limitation of `pypa/gh-action-pypi-publish` with reusable workflows. Attestations can be re-enabled once PyPI supports matching against `workflow_ref` in addition to `job_workflow_ref` for attestation verification, or once the publish job is moved out of the reusable workflow.

Reviewed By: mnorris11

Differential Revision: D106110673
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented May 22, 2026

This pull request has been merged in 8f03848.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant