Skip to content
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: use url parsing from object store #1592

Merged
merged 10 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
AWS_ACCESS_KEY_ID: deltalake
AWS_SECRET_ACCESS_KEY: weloverust
AWS_ENDPOINT_URL: http://localhost:4566
AWS_STORAGE_ALLOW_HTTP: "1"
AWS_ALLOW_HTTP: "1"
AZURE_USE_EMULATOR: "1"
AZURE_STORAGE_ALLOW_HTTP: "1"
AZURITE_BLOB_STORAGE_URL: "http://localhost:10000"
Expand Down
2 changes: 1 addition & 1 deletion python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def s3_localstack_creds():

@pytest.fixture()
def s3_localstack(monkeypatch, s3_localstack_creds):
monkeypatch.setenv("AWS_STORAGE_ALLOW_HTTP", "TRUE")
monkeypatch.setenv("AWS_ALLOW_HTTP", "TRUE")
for key, value in s3_localstack_creds.items():
monkeypatch.setenv(key, value)

Expand Down
2 changes: 1 addition & 1 deletion python/tests/test_fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def test_roundtrip_s3_direct(s3_localstack_creds, sample_data: pa.Table):

# Can pass storage_options in directly
storage_opts = {
"AWS_STORAGE_ALLOW_HTTP": "true",
"AWS_ALLOW_HTTP": "true",
"AWS_S3_ALLOW_UNSAFE_RENAME": "true",
}
storage_opts.update(s3_localstack_creds)
Expand Down
2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ dashmap = { version = "5", optional = true }
sqlparser = { version = "0.37", optional = true }

# NOTE dependencies only for integration tests
fs_extra = { version = "1.2.0", optional = true }
fs_extra = { version = "1.3.0", optional = true }
tempdir = { version = "0", optional = true }

dynamodb_lock = { version = "0", default-features = false, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion rust/examples/recordbatch-writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async fn main() -> Result<(), DeltaTableError> {
info!("It doesn't look like our delta table has been created");
create_initialized_table(&table_path).await
}
Err(err) => Err(err).unwrap(),
Err(err) => panic!("{:?}", err),
};

let writer_properties = WriterProperties::builder()
Expand Down
2 changes: 1 addition & 1 deletion rust/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ pub mod s3_storage_options {
/// See also <https://docs.rs/rusoto_sts/0.47.0/rusoto_sts/struct.WebIdentityProvider.html#method.from_k8s_env>.
pub const AWS_ROLE_SESSION_NAME: &str = "AWS_ROLE_SESSION_NAME";
/// Allow http connections - mainly useful for integration tests
pub const AWS_STORAGE_ALLOW_HTTP: &str = "AWS_STORAGE_ALLOW_HTTP";
pub const AWS_ALLOW_HTTP: &str = "AWS_ALLOW_HTTP";

/// If set to "true", allows creating commits without concurrent writer protection.
/// Only safe if there is one writer to a given table.
Expand Down
4 changes: 2 additions & 2 deletions rust/src/data_catalog/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ impl ListingSchemaProvider {
storage_options: Option<HashMap<String, String>>,
) -> DeltaResult<Self> {
let uri = ensure_table_uri(root_uri)?;
let storage_options = storage_options.unwrap_or_default().into();
let mut storage_options = storage_options.unwrap_or_default().into();
// We already parsed the url, so unwrapping is safe.
let store = configure_store(&uri, &storage_options)?;
let store = configure_store(&uri, &mut storage_options)?;
Ok(Self {
authority: uri.to_string(),
store,
Expand Down
Loading