Skip to content

Conversation

@J-Meyers
Copy link

This is very difficult to test since you must wait for the credentials to timeout, however there were a variety of locations and scenarios that previously did not automatically refresh the credentials.

After the first S3FileHandle was Initialized then many operations like GLOBs would never have an opportunity to refresh the handle.

This adds in autorefresh around all calls, the core of this is the ExecuteWithRefresh and keeping around the FileOpener. ExecuteWithRefresh is used to just wrap the old code exactly as it was with a mechanism to automatically refresh the credentials and then run it again.

The previous refreshing in S3FileHandle::Initialize is now removed since it is now managed at each of the lower level function calls.

Should close:
duckdb/duckdb-aws#26
duckdb/duckdb-aws#64
duckdb/duckdb-aws#97

If you have any advice on how to create an automated test for this I'd appreciate it

@J-Meyers J-Meyers changed the base branch from main to v1.4-andium November 14, 2025 19:06
@carlopi
Copy link
Collaborator

carlopi commented Nov 15, 2025

@J-Meyers: Thanks for the PR, just an heads up that it might take a bit for this to get properly through review process, but we'll get to it.

Testing is indeed not trivial, unsure what's the way forward, but I'll think of something

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