chore(ci): route Python package installs through AWS CodeArtifact - #708
Closed
huahq wants to merge 1 commit into
Closed
chore(ci): route Python package installs through AWS CodeArtifact#708huahq wants to merge 1 commit into
huahq wants to merge 1 commit into
Conversation
Point uv at the nextdoor CodeArtifact pypi repository (go/migrate-to-ca) and authenticate CI via Nextdoor/actions/aws-login OIDC. Locally, uv reads credentials from ~/.netrc. uv.lock still pins pypi.org URLs and must be regenerated once the kingpin.git CodeArtifact repository is created; until then CI on this branch fails against the not-yet-existing repository. Co-Authored-By: Claude Fable 5 <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
Migrates this repo's Python installs to AWS CodeArtifact per go/migrate-to-ca:
pyproject.toml— adds a[[tool.uv.index]]entry (default = true) pointing uv athttps://nextdoor-364942603424.d.codeartifact.us-west-2.amazonaws.com/pypi/kingpin.git/simple/. Auth comes from~/.netrclocally andUV_INDEX_CODEARTIFACT_*env vars in CI — no tokens in committed config.test.yaml/main-release.yaml/publish-release.yaml— adds OIDC permissions, aNextdoor/actions/aws-loginstep (codeartifactPip: truefor any stray pip usage), and exports the CodeArtifact token asUV_INDEX_CODEARTIFACT_USERNAME/PASSWORDfor all uv steps.codeartifactPipalone is insufficient here because uv does not read pip.conf.docs/development.rst— contributor note on registry auth.kingpin.gitdoes not exist in thenextdoordomain (verified viadescribe-repository/list-repositories-in-domain). Someone with access (or vianextdoor/codeartifact-subsysif repos are provisioned there) must run:uv.lockagainst CodeArtifact (uv lockwith fresh CA auth) and push to this branch. This is not optional: verified empirically thatuv sync --frozendownloads from the URLs baked intouv.lock(currentlyfiles.pythonhosted.org) and ignores the configured index for locked packages — without a re-lock, CI would silently keep hitting PyPI and break the day it's blocked. uv has no index-mirroring mechanism (Request foruv.lockto support different index urls across different developer machines and CI environments astral-sh/uv#6349).uv sync --frozen --no-cachewithpypi.org/files.pythonhosted.orgunreachable must succeed using only the CA URL.Things to be aware of
uv.lockwill contain CodeArtifact URLs that require Nextdoor AWS credentials even for reads — external contributors will not be able touv sync, and fork PRs cannot assume the OIDC role, sotest.yamlwill fail for them. If external contribution matters, that's a decision to make before merging.pyproject.toml/uv.locknatively; after migration it needs CodeArtifact credentials (hostRules) or its lock-file updates will fail..readthedocs.yaml), which ignores[tool.uv]config and keeps using public PyPI.pypa/gh-action-pypi-publishstill publishes to public PyPI.🤖 Generated with Claude Code