Conversation
7c7022c to
8d7ad79
Compare
uv pip invocations in linehaul data
| Self { | ||
| installer: Option::from(Installer { | ||
| name: Some("uv".to_string()), | ||
| name: Some(installer_name.unwrap_or("uv").to_string()), |
There was a problem hiding this comment.
Slightly surprised but linehaul doesn't seem to check this field at all, which is good for us.
There was a problem hiding this comment.
As part of Google BigQuery? I feel I've queried based on installer name in the past 😅 e.g. details.installer.name
Ah, you meant the cloud function doesn't validate the field contents. Ignore my initial reaction.
There was a problem hiding this comment.
I'd expect changing details.installer.name could have some consequences / churn in terms of how statistics are reported for uv in cases where someone using Big Query doesn't group by details.installer.name and does a select on details.installer.name = 'uv' directly for popular clients. I'd expect this to be a common scenario to avoid associated costs.
There was a problem hiding this comment.
Ideally we had an additional field so that querying for uv can be done in a single condition instead of splitting this into two names.
There was a problem hiding this comment.
Maybe @pradyunsg, @di or @ewdurbin may have better ideas on how to avoid splitting details.installer.name between uv and uv-pip or this use case in general?
I think that'd be great if adding a new field could be a supported option to avoid the confusion of having two potential installer names, but I'm not sure what type of coordination or process would be needed in linehaul's side first. There may be better options I'm missing.
There was a problem hiding this comment.
There was a problem hiding this comment.
I think we won't merge this as-is.
There was a problem hiding this comment.
Seems entirely reasonable to add additional values under the details key, though that can take some time since we no longer get to run our own schema migrations now that our dataset is part of the google public datasets. file an issue at https://github.com/pypi/linehaul-cloud-function/issues and tag me
There was a problem hiding this comment.
| /// Spawns a dummy HTTP server that echoes back the User-Agent header. | ||
| /// Returns the server URL and the server task handle. | ||
| async fn spawn_user_agent_echo_server() -> Result<(DisplaySafeUrl, JoinHandle<()>)> { |
There was a problem hiding this comment.
Note, a new abstraction to spawing this server will be in #16473
Summary
This PR makes uv set the
installer.namefield in the linehaul metadata touv-pipfor all registry requests made fromuv pipcommands.Test Plan
installer_nameon aClientBuilderresults in the user agent header changed accordingly.