Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azure sdk_moniker kwarg bug (downstream from azure-storage-blob) #425

Closed
wants to merge 2 commits into from
Closed

Conversation

benrutter
Copy link
Contributor

Not sure if this is the appropriate fix or not? This PR would introduce compatibilty with azure-storage-blob version 12.18.0 which now requires sdk_moniker as a keyword argument.

For further details, see issue 424

@benrutter benrutter changed the title azure skd_moniker kwarg bug (downstream from azure-storage-blob) azure sdk_moniker kwarg bug (downstream from azure-storage-blob) Sep 13, 2023
@benrutter
Copy link
Contributor Author

Ah, this won't actually work, sorry!

azure-storage-blob pre 12.18.0 looks like this:

config.user_agent_policy = UserAgentPolicy(
    sdk_moniker=(f"storage-{kwargs.pop('storage_skd')}/{VERSION}", **kwargs)
)

and, it now look like this:

config.user_agent_policy = UserAgentPolicy(sdk_moniker=kwargs.pop('sdk_moniker'), **kwargs)

Effectively, if you pass in sdk_moniker in a version before 12.18.0 you'll get both a dynamically generated skd_moniker, and the one you've specified.

If you don't pass it in, for version 12.18.0, you'll get an error.

So aside from doing something like figuring out which version of azure-store-blob is installed and then acting conditionally on that, I don't think it's possible to use create_configuration in a way that's consistent across versions.

If they haven't already spotted this, I'll let the azure-blob-storage project know this - I'm assuming its an accident.

@benrutter benrutter closed this Sep 13, 2023
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.

1 participant