Skip to content

Conversation

@austindonnelly
Copy link

@austindonnelly austindonnelly commented Sep 30, 2025

This PR implements suggestion #579

  • Add new env var ARTIFACTS_CREDENTIALPROVIDER_VERBOSITY_DEFAULT
  • If present, it sets the default for the -Verbosity command line option.
  • If absent, default is LogLevel.Information - no change to previous behaviour.
  • Command line flag dominates environment variable - no change to previous behaviour.

These changes make it much easier to debug uses of the Credential Provider from (eg) pip where it is almost impossible to control the -V option on the command line.

@austindonnelly austindonnelly changed the title Feat: use environment variable to control default verbosity Use environment variable to control default verbosity Sep 30, 2025
@embetten
Copy link
Contributor

embetten commented Oct 7, 2025

@cobya / @austindonnelly -

Can we think about moving the environment variable to the artifacts-keyring layer instead? My main concern is avoiding multiple places where verbosity can be set and all other protocols use cli inputs to specify it. Also, since PowerArgs is quite slow and we're aiming to remove it in the future, we'd like to reduce our dependency on it wherever possible.

@austindonnelly
Copy link
Author

@cobya / @austindonnelly -

Can we think about moving the environment variable to the artifacts-keyring layer instead? My main concern is avoiding multiple places where verbosity can be set and all other protocols use cli inputs to specify it. Also, since PowerArgs is quite slow and we're aiming to remove it in the future, we'd like to reduce our dependency on it wherever possible.

I did originally think this (that the verbosity control should be in artifacts-keyring). The problem is that although this would work for pip, not all python package managers use artifacts-keyring. For example, uv is written in Rust, and directly invokes the credential provider binary.

So that's what led me to putting this control in at the bottom of the stack. Regardless of how the credential provider is invoked, this provides debug capability.

@embetten
Copy link
Contributor

embetten commented Oct 8, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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