[dagster-aws] Tag the S3 client user-agent and document S3-compatible storage#33970
Draft
goanpeca wants to merge 1 commit into
Draft
[dagster-aws] Tag the S3 client user-agent and document S3-compatible storage#33970goanpeca wants to merge 1 commit into
goanpeca wants to merge 1 commit into
Conversation
Signed-off-by: Gonzalo Peña-Castellanos <goanpeca@gmail.com>
goanpeca
force-pushed
the
feat-s3resource-user-agent-extra
branch
from
July 1, 2026 14:01
b1f382c to
eb377f8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary & Motivation
S3Resource(and the IO managers, file manager, and compute log manager built on it) already targets Amazon S3 and, because boto3 lets you point at a custom endpoint, any S3-compatible object store. This PR makes that support explicit and observable, in two small, additive pieces:dagster_aws.s3now carries adagster-aws/<version>product token in itsUser-Agent(viabotocore.config.Config(user_agent_extra=...)). This is the standard boto3 mechanism for identifying the calling tool, mirrors what other AWS SDK integrations do, and helps Amazon S3 and any S3-compatible endpoint attribute traffic coming from Dagster.user_agent_extrafield onS3Resource/S3FileManagerResourcelets a caller append their own token after the product token (space separated). The product token is always present and is never replaced.Alongside the code, this adds a short docs page, "Dagster & S3-compatible storage," showing that
S3Resourceworks with Amazon S3 or with any S3-compatible object store (for example, Backblaze B2, Cloudflare R2, or MinIO) by settingendpoint_urlto the provider's S3 endpoint. The existing Amazon S3 page gets a one-line pointer to it. Examples use a placeholder endpoint (https://your-s3-endpoint.example.com) so no provider is singled out.The change is intentionally minimal and fully backward compatible: no public signatures change in an incompatible way (
user_agent_extradefaults toNone), no new dependencies are added (botocoreis already required), and behavior for existing users is unchanged apart from the added product token.Test Plan
New unit tests in
python_modules/libraries/dagster-aws/dagster_aws_tests/s3_tests/test_resources.pycover the client builder and both resources:They assert that:
dagster-aws/<version>inuser_agent_extra, and the base SDK token (Boto3/...) is preserved, not replaced;user_agent_extrais appended after the product token, space separated, and in that order;S3ResourceandS3FileManagerResourcethread the value through to the underlying client, including the endpoint-override shape a user of an S3-compatible store would write.The docs snippet (
examples/docs_snippets/docs_snippets/integrations/aws-s3-compatible.py) is collected by the docs-snippets test suite, andmake ruffwas run over the changed Python.Changelog
S3Resourcenow tags its boto3 clientUser-Agentwithdagster-aws/<version>and accepts an optionaluser_agent_extra; added a docs page for usingS3Resourcewith S3-compatible object storage.