Skip to content

[core] stub url path is empty if query url#45044

Draft
l0lawrence wants to merge 2 commits intoAzure:mainfrom
l0lawrence:parsedurl
Draft

[core] stub url path is empty if query url#45044
l0lawrence wants to merge 2 commits intoAzure:mainfrom
l0lawrence:parsedurl

Conversation

@l0lawrence
Copy link
Member

@l0lawrence l0lawrence commented Feb 5, 2026

If the stub_url is a starts with a query "?restype", stub_url_path is then empty and we do not need to append a "/" to the end of parsed_base_url

i.e. https://github.com/l0lawrence/azure-sdk-for-python/blob/9fe8f5081384380ba5f0cfa4803918f5bfcec6ae/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/azure/storage/blobs/_operations/_operations.py#L58C1-L58C46

Copy link
Member

@pvaneck pvaneck left a comment

Choose a reason for hiding this comment

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

Change LGTM. Let's update the failing test, and also add an assertion where the stub_url is just a query string

Copy link
Member

@pvaneck pvaneck left a comment

Choose a reason for hiding this comment

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

I think we also need a changelog entry since this affects behavior of the public format_url method.

Something like:

  • Fixed PipelineClient.format_url to avoid adding trailing slashes when the URL template contains only query parameters.

Also, looks like we have some recording mismatches in a few of the azure-data-tables tests.

request https://Sanitized.table.core.windows.net/mytable3f8138ee?restype=service&comp=properties
record  https://Sanitized.table.core.windows.net/mytable3f8138ee/?restype=service&comp=properties

@l0lawrence Did the storage recordings not have slashes before the query strings?

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