-
Notifications
You must be signed in to change notification settings - Fork 421
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
feat: harmonize and simplify storage configuration #1052
Merged
+469
−799
Merged
Changes from 24 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
eb36d65
refactor: use new object_store config system
roeap 338f459
build: try patching object store to see CI results
roeap 6fa735f
fix: variant name
roeap 9311eae
fix: clippy
roeap 56d550c
chore: handle uncovered variants
roeap 728863e
fix: update allow http config
roeap d07cb95
fix: try different test config
roeap 35055ab
fix: add allow http opt
roeap 045fa54
refactor: remove DeltaObjectStoreConfig
roeap 823f9f8
refactor: move storage location to separate module
roeap b971efd
revert renaming env vars
roeap f076214
chore: format
roeap 9f1484f
feat: handle some env vars
roeap 1102adf
chore: clippy
roeap 3def261
fix: cinfig with no features
roeap 2ab7e55
fix: handle allow http
roeap 31fe05b
fix: missing docs
roeap c3ef346
fix: detect allowed http when passed in config
roeap 3646f2c
fix: set a default region in aws
roeap ae3e193
chore: clippy
roeap f706b92
chore: use released object_store
roeap 60ac277
fix: set default region in test
roeap 260ec27
fix: remove azure anon test
roeap 9660e15
chore: use map reference
roeap 04eaac1
fix: clippy
roeap 780b04a
docs: add links to options / keys for storage backends
roeap c625240
Update rust/src/builder.rs
roeap 4aeb972
Update python/docs/source/usage.rst
roeap 95dc31b
Update rust/src/storage/config.rs
roeap File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,8 @@ def test_read_files(s3_localstack): | |
@pytest.mark.s3 | ||
@pytest.mark.integration | ||
@pytest.mark.timeout(timeout=15, method="thread") | ||
def test_s3_authenticated_read_write(s3_localstack_creds): | ||
def test_s3_authenticated_read_write(s3_localstack_creds, monkeypatch): | ||
monkeypatch.setenv("AWS_DEFAULT_REGION", "us-east-1") | ||
# Create unauthenticated handler | ||
storage_handler = DeltaStorageHandler( | ||
"s3://deltars/", | ||
|
@@ -184,13 +185,6 @@ def test_roundtrip_azure_env(azurite_env_vars, sample_data: pa.Table): | |
def test_roundtrip_azure_direct(azurite_creds, sample_data: pa.Table): | ||
table_path = "az://deltars/roundtrip2" | ||
|
||
# Fails without any creds | ||
with pytest.raises(PyDeltaTableError): | ||
anon_storage_options = { | ||
key: value for key, value in azurite_creds.items() if "ACCOUNT" not in key | ||
} | ||
write_deltalake(table_path, sample_data, storage_options=anon_storage_options) | ||
Comment on lines
-187
to
-192
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not entirely sure what we did before, but now |
||
|
||
# Can pass storage_options in directly | ||
write_deltalake(table_path, sample_data, storage_options=azurite_creds) | ||
dt = DeltaTable(table_path, storage_options=azurite_creds) | ||
|
This file contains 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
Oops, something went wrong.
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.
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.
Previously we were using the rusoto logic from our S3 storage options, which look in the envornment, then a profile file, and finally just defaults to us-east-1 as a region.
While slightly convenient, i felt this is a bit too much logic for us, and hoping, that the dynamo_lock crate will eventually also move to the official aws sdk, I also did not want to use the rusoto helper.
If this goes too much against the expectations of users, we can of course add some login for this.
The setting could of course also be passed with the storage options :)