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

fix: check lowercase config keys with/without aws prefix in s3logstorefactory #2896

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

ion-elgreco
Copy link
Collaborator

@ion-elgreco ion-elgreco commented Sep 22, 2024

Description

We were only checking if the lowercase aws_copy_if_not_exists or aws_conditional_put are set to return the stores. But we should ignore the case and check for with and without aws prefix, since ObjectStore does this as well.

This pull request also short-circuits the loading of AWS configuration when using AWS_ENDPOINT_URL or scenarios where the client is not directly interacting with AWS S3 (e.g. Minio, Cloudflare, etc)

Copy link

codecov bot commented Sep 22, 2024

Codecov Report

Attention: Patch coverage is 63.73626% with 33 lines in your changes missing coverage. Please review.

Project coverage is 72.49%. Comparing base (68f6d74) to head (7055b09).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/aws/src/lib.rs 5.88% 12 Missing and 4 partials ⚠️
crates/aws/src/storage.rs 75.00% 14 Missing and 2 partials ⚠️
crates/aws/src/logstore/dynamodb_logstore.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2896      +/-   ##
==========================================
- Coverage   72.50%   72.49%   -0.02%     
==========================================
  Files         131      131              
  Lines       40362    40421      +59     
  Branches    40362    40421      +59     
==========================================
+ Hits        29266    29304      +38     
- Misses       9216     9238      +22     
+ Partials     1880     1879       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rtyler rtyler force-pushed the fix/aws_logstorefactory branch 3 times, most recently from abb01c8 to 8041814 Compare September 22, 2024 20:10
ion-elgreco and others added 2 commits September 22, 2024 21:03
…narios

This should reduce bugs, reduce warnings, and improve performance when
somebody is using this crate against an S3-alike service rather than AWS
S3 directly.

Currently I cannot think of a valid scenarijo where one would use
AWS_ENDPOINT_URL against actual S3 buckets, so using that as the
heuristic
@rwhaling
Copy link
Contributor

keeping up with this branch, and my local dev environment is kind of a mess, but looks like this resolves my issue - "conditional_put", "CONDITIONAL_PUT", "aws_condititional_put", and "AWS_CONDITIONAL_PUT" all seem to work 👍

Copy link
Collaborator

@hntd187 hntd187 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT I had one nit, but not necessary.

@@ -19,7 +19,7 @@ use deltalake_core::storage::StorageOptions;
use deltalake_core::DeltaResult;
use tracing::log::*;

use crate::constants;
use crate::constants::{self, AWS_ENDPOINT_URL};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prolly want to revert this and use consistent references here

@ion-elgreco ion-elgreco added this pull request to the merge queue Sep 23, 2024
Merged via the queue into delta-io:main with commit 66441d1 Sep 23, 2024
23 checks passed
@ion-elgreco ion-elgreco deleted the fix/aws_logstorefactory branch September 23, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding/rust Issues for the Rust crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants