Skip to content

[ENHANCEMENT] Add pypi format support to setup-codeartifact - #80

Open
John McCall (lowlydba) wants to merge 2 commits into
mainfrom
lowlydba-codeartifact-pypi-format
Open

[ENHANCEMENT] Add pypi format support to setup-codeartifact#80
John McCall (lowlydba) wants to merge 2 commits into
mainfrom
lowlydba-codeartifact-pypi-format

Conversation

@lowlydba

@lowlydba John McCall (lowlydba) commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Context

Part of migrating off the Legacy Airflow account's CodeArtifact (OvertureMaps/ops-team#299). Phase 1 for pypi (OvertureMaps/ops-team#455) replicates the legacy overture-pypi domain into MCD and dual-publishes to both accounts. The publish workflows for that (OvertureMaps/ops-team#466) need pypi auth from this shared action, which is Maven-only today.

Today each repo carries its own variant of this auth logic (schema's local code-artifact action, bespoke steps elsewhere). Extending the shared action instead of forking another copy keeps it DRY: one auth path to audit and update, and the local variants can be deleted as workflows migrate.

Adds a format input (maven default, or pypi) to setup-codeartifact so python packages can auth through the same OIDC + token path as Maven.

Fixes OvertureMaps/ops-team#466.

  • maven behavior is unchanged for existing callers: same repository-url value, settings.xml still written, no input changes needed.
  • pypi skips settings.xml and adds two outputs: pypi-index-url (token embedded, masked, for pip/uv --index-url) and pypi-publish-url (no credentials, for uv publish --publish-url with the token passed separately). Modeled on schema's local code-artifact action, which this eventually replaces.

For dual-publishing, workflows call the action twice per job (legacy + MCD account) and run the publish step once per instance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Signed-off-by: John McCall <john@overturemaps.org>
@lowlydba
John McCall (lowlydba) marked this pull request as ready for review August 14, 2026 15:05
@lowlydba
John McCall (lowlydba) requested a review from a team as a code owner August 14, 2026 15:05
Copilot AI lite review requested due to automatic review settings August 14, 2026 15:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the .github/actions/setup-codeartifact composite action to support authenticating against AWS CodeArtifact for both Maven and Python (PyPI), using the same OIDC role-assumption and token acquisition flow.

Changes:

  • Adds a format input (maven default, pypi optional) and validates allowed values.
  • Introduces PyPI-specific outputs for pip/uv usage (pypi-index-url, pypi-publish-url) and documents the new mode in the README.
  • Keeps Maven behavior unchanged by gating settings.xml generation behind format: maven.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/actions/setup-codeartifact/README.md Documents the new format: pypi mode and its outputs/usage patterns.
.github/actions/setup-codeartifact/action.yml Implements format validation, gates Maven settings generation, and adds PyPI URL outputs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/actions/setup-codeartifact/action.yml
Comment thread .github/actions/setup-codeartifact/action.yml Outdated
Comment thread .github/actions/setup-codeartifact/README.md
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Signed-off-by: John McCall <john@overturemaps.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants