-
Notifications
You must be signed in to change notification settings - Fork 161
feat(csharp/src/Drivers/Databricks): Implement CloudFetchUrlManager to handle presigned URL expiration in CloudFetch #2855
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
Merged
CurtHagenlocher
merged 5 commits into
apache:main
from
jadewang-db:handle-expired-cloudfile
May 28, 2025
Merged
feat(csharp/src/Drivers/Databricks): Implement CloudFetchUrlManager to handle presigned URL expiration in CloudFetch #2855
CurtHagenlocher
merged 5 commits into
apache:main
from
jadewang-db:handle-expired-cloudfile
May 28, 2025
Conversation
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
jadewang-db
commented
May 23, 2025
csharp/src/Drivers/Databricks/CloudFetch/CloudFetchDownloader.cs
Outdated
Show resolved
Hide resolved
csharp/src/Drivers/Databricks/CloudFetch/CloudFetchUrlManager.cs
Outdated
Show resolved
Hide resolved
6968fc5 to
667239c
Compare
jadewang-db
commented
May 23, 2025
csharp/src/Drivers/Databricks/CloudFetch/CloudFetchDownloader.cs
Outdated
Show resolved
Hide resolved
csharp/src/Drivers/Databricks/CloudFetch/CloudFetchResultFetcher.cs
Outdated
Show resolved
Hide resolved
csharp/src/Drivers/Databricks/CloudFetch/CloudFetchResultFetcher.cs
Outdated
Show resolved
Hide resolved
csharp/src/Drivers/Databricks/CloudFetch/ICloudFetchInterfaces.cs
Outdated
Show resolved
Hide resolved
csharp/src/Drivers/Databricks/CloudFetch/CloudFetchResultFetcher.cs
Outdated
Show resolved
Hide resolved
Use real CloudFetchUrlManager in tests instead of mock Handle presigned URL expiration in CloudFetch fix lint Address review comments: remove unnecessary URL expiration check and GetFreshClient method fix test Refactor: Move URL management from CloudFetchUrlManager into CloudFetchResultFetcher Update tests to use CloudFetchResultFetcher for URL management Remove CloudFetchUrlManagerTest.cs as it's replaced by CloudFetchResultFetcherTest.cs Remove duplicate clock definitions from CloudFetchUrlManager Make CloudFetchResultFetcher non-sealed to allow extension for testing Fix DateTime.ToUnixTimeMilliseconds conversion in test Remove CloudFetchUrlManager class as its functionality is now in CloudFetchResultFetcher lint fix address comments Update CloudFetchResultFetcher.cs
66d1898 to
a6ba579
Compare
toddmeng-db
reviewed
May 28, 2025
| HttpCompletionOption.ResponseHeadersRead, | ||
| cancellationToken).ConfigureAwait(false); | ||
|
|
||
| // Check if the response indicates an expired URL (typically 403 or 401) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to make this a generic if-fail then retry attempt?
toddmeng-db
reviewed
May 28, 2025
toddmeng-db
reviewed
May 28, 2025
CurtHagenlocher
requested changes
May 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Comments are mostly nitpicking.
CurtHagenlocher
approved these changes
May 28, 2025
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.
Problem
The Databricks driver's CloudFetch functionality was not properly handling expired cloud file URLs, which could lead to failed downloads and errors during query execution. The system needed a way to track, cache, and refresh presigned URLs before they expire.
Solution
CloudFetchResultFetcherclass that:IClockinterface and implementations to facilitate testing with controlled timeIDownloadResultinterface to support URL refreshing and expiration checkingApache.Arrow.Adbc.Drivers.Apache.Databricks.CloudFetchtoApache.Arrow.Adbc.Drivers.Databricks.CloudFetchfor better organization