Xuanwo commented on code in PR #847: URL: https://github.com/apache/iceberg-rust/pull/847#discussion_r1897698605
########## crates/iceberg/src/io/storage_gcs.rs: ########## @@ -41,6 +41,17 @@ pub const GCS_CREDENTIALS_JSON: &str = "gcs.credentials-json"; /// Google Cloud Storage token pub const GCS_TOKEN: &str = "gcs.oauth2.token"; +/// Option to skip signing requests (e.g. for public buckets/folders). +pub const GCS_ALLOW_ANONYMOUS: &str = "gcs.allow-anonymous"; +/// Option to skip loading the credential from GCE metadata server (typically used in conjunction with `GCS_ALLOW_ANONYMOUS`). +pub const GCS_DISABLE_VM_METADATA: &str = "gcs.disable-vm-metadata"; +/// Option to skip loading configuration from config file and the env. +pub const GCS_DISABLE_CONFIG_LOAD: &str = "gcs.disable-config-load"; + +fn is_truthy(value: &str) -> bool { + ["true", "t", "1", "on"].contains(&value) Review Comment: We can check against `value.to_lowercase()`. ########## crates/iceberg/src/io/storage_gcs.rs: ########## @@ -41,6 +41,17 @@ pub const GCS_CREDENTIALS_JSON: &str = "gcs.credentials-json"; /// Google Cloud Storage token pub const GCS_TOKEN: &str = "gcs.oauth2.token"; +/// Option to skip signing requests (e.g. for public buckets/folders). +pub const GCS_ALLOW_ANONYMOUS: &str = "gcs.allow-anonymous"; +/// Option to skip loading the credential from GCE metadata server (typically used in conjunction with `GCS_ALLOW_ANONYMOUS`). +pub const GCS_DISABLE_VM_METADATA: &str = "gcs.disable-vm-metadata"; +/// Option to skip loading configuration from config file and the env. +pub const GCS_DISABLE_CONFIG_LOAD: &str = "gcs.disable-config-load"; + +fn is_truthy(value: &str) -> bool { Review Comment: Maybe we can have such thing in io mod instead of just gcs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org