Skip to content

Conversation

@cgwalters
Copy link
Collaborator

This allows registries to distinguish "image pulls for bootc client runs" from other skopeo/containers-image users. The user agent will be in the format "bootc/ skopeo/".

All places in bootc that create ImageProxyConfig now use a new helper function that sets the user_agent_prefix field.

Closes: #1686
Assisted-by: OpenCode (Sonnet 4)

@github-actions github-actions bot added area/install Issues related to `bootc install` area/ostree Issues related to ostree labels Jan 22, 2026
@bootc-bot bootc-bot bot requested a review from jeckersb January 22, 2026 23:17
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a change to set a custom User-Agent header for all container image pulls made by bootc. This is achieved by adding a new helper function new_proxy_config that creates an ImageProxyConfig with the user_agent_prefix set to bootc/<version>. This function is now used consistently across the codebase wherever an ImageProxyConfig is needed. The containers-image-proxy dependency has been updated to 0.9.1 to support this feature.

The changes are well-implemented and include a new integration test to verify the User-Agent header. My only suggestion is to improve the new test script by using a dynamically allocated port instead of a hardcoded one to prevent potential flakiness in test environments.

This allows registries to distinguish "image pulls for bootc client
runs" from other skopeo/containers-image users. The user agent will
be in the format "bootc/<version> skopeo/<version>".

All places in bootc that create ImageProxyConfig now use a new helper
function that sets the user_agent_prefix field.

Closes: bootc-dev#1686
Assisted-by: OpenCode (Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install Issues related to `bootc install` area/ostree Issues related to ostree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

set user agent header

1 participant