mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Improve tracing for keyring provider (#3207)
This commit is contained in:
parent
598a67cf31
commit
b8302d44de
1 changed files with 2 additions and 1 deletions
|
@ -38,6 +38,7 @@ impl KeyringProvider {
|
||||||
///
|
///
|
||||||
/// Returns [`None`] if no password was found for the username or if any errors
|
/// Returns [`None`] if no password was found for the username or if any errors
|
||||||
/// are encountered in the keyring backend.
|
/// are encountered in the keyring backend.
|
||||||
|
#[instrument(skip_all, fields(url = % url.to_string(), username))]
|
||||||
pub(crate) async fn fetch(&self, url: &Url, username: &str) -> Option<Credentials> {
|
pub(crate) async fn fetch(&self, url: &Url, username: &str) -> Option<Credentials> {
|
||||||
// Validate the request
|
// Validate the request
|
||||||
debug_assert!(
|
debug_assert!(
|
||||||
|
@ -104,7 +105,7 @@ impl KeyringProvider {
|
||||||
password.map(|password| Credentials::new(Some(username.to_string()), Some(password)))
|
password.map(|password| Credentials::new(Some(username.to_string()), Some(password)))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[instrument]
|
#[instrument(skip(self))]
|
||||||
async fn fetch_subprocess(&self, service_name: &str, username: &str) -> Option<String> {
|
async fn fetch_subprocess(&self, service_name: &str, username: &str) -> Option<String> {
|
||||||
let output = Command::new("keyring")
|
let output = Command::new("keyring")
|
||||||
.arg("get")
|
.arg("get")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue