Fix prefix match for ADLS_SAS_TOKEN#2461
Merged
kevinjqliu merged 5 commits intoapache:mainfrom Sep 16, 2025
Merged
Conversation
|
|
||
| for key, sas_token in { | ||
| key.replace(f"{ADLS_SAS_TOKEN}.", ""): value for key, value in properties.items() if key.startswith(ADLS_SAS_TOKEN) | ||
| key.replace(f"{ADLS_SAS_TOKEN}.", ""): value for key, value in properties.items() if key.startswith(f"{ADLS_SAS_TOKEN}.") |
Contributor
There was a problem hiding this comment.
This looks like the fix for the bug 👍, the Java side gets the props like this with the ADLS_SAS_TOKEN_PREFIX including the ..
Contributor
|
@kevinjqliu @Fokko, please may you take a look, so the client still works if Catalogs set the refresh property? (I see that the 0.10 vote just passed so suppose this'd have to be for the next release 😄) |
Fokko
approved these changes
Sep 11, 2025
Contributor
Fokko
left a comment
There was a problem hiding this comment.
Oof, this is a good catch, @tom-s-powell. Would it be wise to throw in a test to prevent us from breaking this in the future?
Contributor
Author
|
Added a test @Fokko if this gets at what you were thinking? |
Contributor
|
@tom-s-powell Yes, that looks great. Thanks! |
Contributor
|
Thanks for the PR @tom-s-powell and @smaheshwar-pltr @Fokko for the review :) |
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.
The current logic when constructing an ADLS file system incorrectly matches
adls.sas-token-expires-at-ms.prefixed keys. If this is provided and encountered prior toadls.sas-token.prefixed keys, it will incorrectly determine theADLS_ACCOUNT_NAMEandADLS_SAS_TOKEN.For example with the following properties:
Before
After