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

chore: upgrade aws-config for aarch64-pc-windows support #2510

Merged
merged 6 commits into from
Jun 25, 2024
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
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ arrow-schema = "51.0"
arrow-select = "51.0"
async-recursion = "1.0"
async-trait = "0.1"
aws-config = "0.56"
aws-credential-types = "0.56"
aws-sdk-dynamodb = "0.34"
aws-config = "0.57"
aws-credential-types = "0.57"
aws-sdk-dynamodb = "0.35"
half = { "version" = "2.4.1", default-features = false, features = [
"num-traits",
"std",
Expand Down
8 changes: 5 additions & 3 deletions rust/lance-table/src/io/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ use lance_io::object_store::{ObjectStore, ObjectStoreExt, ObjectStoreParams};
#[cfg(feature = "dynamodb")]
use {
self::external_manifest::{ExternalManifestCommitHandler, ExternalManifestStore},
aws_credential_types::cache::CredentialsCache,
aws_credential_types::provider::error::CredentialsError,
aws_credential_types::provider::ProvideCredentials,
lance_io::object_store::{build_aws_credential, StorageOptions},
Expand Down Expand Up @@ -362,13 +361,16 @@ async fn build_dynamodb_external_store(
app_name: &str,
) -> Result<Arc<dyn ExternalManifestStore>> {
use super::commit::dynamodb::DynamoDBExternalManifestStore;
use aws_sdk_dynamodb::{config::Region, Client};
use aws_sdk_dynamodb::{
config::{IdentityCache, Region},
Client,
};

let mut dynamodb_config = aws_sdk_dynamodb::config::Builder::new()
.region(Some(Region::new(region.to_string())))
.credentials_provider(OSObjectStoreToAwsCredAdaptor(creds))
// caching should be handled by passed AwsCredentialProvider
.credentials_cache(CredentialsCache::no_caching());
.identity_cache(IdentityCache::no_cache());

if let Some(endpoint) = endpoint {
dynamodb_config = dynamodb_config.endpoint_url(endpoint);
Expand Down
17 changes: 3 additions & 14 deletions rust/lance-table/src/io/commit/dynamodb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,19 +173,7 @@ impl DynamoDBExternalManifestStore {
location!(),
)
})?;
let key_type = key.key_type.ok_or_else(|| {
Error::io(
format!("dynamodb table: {table_name} key types must be defined"),
location!(),
)
})?;
let name = key.attribute_name.ok_or_else(|| {
Error::io(
format!("dynamodb table: {table_name} key must have an attribute name"),
location!(),
)
})?;
match (key_type, name.as_str()) {
match (key.key_type, key.attribute_name.as_str()) {
(KeyType::Hash, base_uri!()) => {
has_hask_key = true;
}
Expand All @@ -195,7 +183,8 @@ impl DynamoDBExternalManifestStore {
_ => {
return Err(Error::io(
format!(
"dynamodb table: {table_name} unknown key type encountered name:{name}",
"dynamodb table: {} unknown key type encountered name:{}",
table_name, key.attribute_name
),
location!(),
));
Expand Down
Loading