Skip to content

[feat] Set Aim user-agent on the S3 artifacts storage client - #3416

Draft
goanpeca wants to merge 2 commits into
aimhubio:mainfrom
goanpeca:feat/s3-endpoint-user-agent
Draft

[feat] Set Aim user-agent on the S3 artifacts storage client#3416
goanpeca wants to merge 2 commits into
aimhubio:mainfrom
goanpeca:feat/s3-endpoint-user-agent

Conversation

@goanpeca

Copy link
Copy Markdown

S3ArtifactStorage._get_s3_client() creates its boto3 client without any botocore config, so artifact traffic coming from Aim is indistinguishable from any other boto3 request on the storage side. This appends an aim/<version> token to the client's user_agent_extra, which makes Aim requests identifiable in server-side access logs. Nothing about request semantics changes.

The S3ArtifactStorage_factory path keeps its current behavior: a caller-supplied endpoint_url is still forwarded straight to boto3, a config passed as a dict is still turned into botocore.config.Config, and an existing user_agent_extra is preserved with the Aim token appended instead of overwritten. The kwargs dict is now copied before being modified, so repeated client creation no longer mutates the factory closure.

The second commit adds one line to docs/source/using/artifacts.md noting that, because endpoint_url is forwarded to boto3, the same backend works against any S3-compatible object store (Amazon S3, Backblaze B2, Cloudflare R2, MinIO). The example uses a placeholder endpoint.

There are no existing unit tests around the artifacts storage clients, so none are added here. Happy to add one asserting the resulting user_agent_extra if you would like coverage, and happy to open an issue first if you prefer to discuss the approach before review.

goanpeca added 2 commits July 30, 2026 08:42
Signed-off-by: Gonzalo Peña-Castellanos <goanpeca@gmail.com>
Signed-off-by: Gonzalo Peña-Castellanos <goanpeca@gmail.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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