Skip to content

Add Google Artifact Registry credential retrieval - #19611

Draft
zanieb wants to merge 11 commits into
mainfrom
zb/vendor-gauthkeyring-in-rust
Draft

zanieb wants to merge 11 commits into
mainfrom
zb/vendor-gauthkeyring-in-rust

Conversation

@zanieb

@zanieb zanieb commented May 29, 2026

Copy link
Copy Markdown
Member

No description provided.

@zanieb zanieb changed the title Add vendored Google Artifact Registry auth Add Google Artifact Registry credential retrieval May 29, 2026
Comment thread docs/guides/integration/google.md Resolved
@astral-sh-bot

astral-sh-bot Bot commented May 29, 2026 •

Copy link
Copy Markdown

uv test inventory changes

This PR changes the tests when compared with the latest main baseline.

  • Added tests: 14
  • Removed tests: 0
  • Changed suites: 2
uv: +2 / -0

Added:

  • uv::commands::publish::tests::artifact_registry_only_skips_prompt_with_credentials
  • uv::commands::publish::tests::artifact_registry_skips_automatic_trusted_publishing

Removed: none

uv-auth: +12 / -0

Added:

  • uv-auth::middleware::tests::test_artifact_registry_credentials
  • uv-auth::middleware::tests::test_artifact_registry_credentials_preserve_explicit_username
  • uv-auth::middleware::tests::test_artifact_registry_credentials_retry_missing_credentials
  • uv-auth::middleware::tests::test_artifact_registry_credentials_skip_built_in_provider_with_keyring
  • uv-auth::providers::tests::test_artifact_registry_credentials_caches_missing_credentials
  • uv-auth::providers::tests::test_artifact_registry_credentials_fail_closed_for_explicit_adc
  • uv-auth::providers::tests::test_artifact_registry_credentials_from_adc
  • uv-auth::providers::tests::test_artifact_registry_credentials_from_gcloud_output
  • uv-auth::providers::tests::test_artifact_registry_credentials_from_gcloud_unsupported_on_windows
  • uv-auth::providers::tests::test_artifact_registry_credentials_ignores_other_hosts
  • uv-auth::providers::tests::test_artifact_registry_credentials_respect_cloud_sdk_config
  • uv-auth::providers::tests::test_artifact_registry_credentials_supports_username

Removed: none

Comment thread crates/uv-auth/src/middleware.rs Outdated
Comment on lines +721 to +726
// Google Artifact Registry credentials have their own expiry-aware cache. Avoid storing a
// miss for the entire invocation so a transient ADC or `gcloud` failure can be retried.
let memoize_fetch = !ArtifactRegistryProvider::is_artifact_registry(url);
if memoize_fetch
&& let Some(credentials) = self.cache().fetches.register_or_wait(&key).await
{

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Does this mean we'll invoke gcloud on every request?

This branch has not been deployed

No deployments
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.

1 participant