Skip to content

refactor(glue): derive catalog configuration from properties - #3102

Merged
blackmwk merged 3 commits into
apache:mainfrom
blackmwk:ir-3096-glue-properties
Oct 15, 2026
Merged

blackmwk merged 3 commits into
apache:mainfrom
blackmwk:ir-3096-glue-properties

Conversation

@blackmwk

@blackmwk blackmwk commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

What changes are included in this PR?

Use the shared Properties derive for crate-private Glue catalog settings, following the Memory catalog pattern. Warehouse validation remains fail-fast, and the complete input property map is passed to AWS configuration, FileIO, and KMS.

Are these changes tested?

Validated after merging upstream/main, using the repository's pinned nightly-2026-04-16 toolchain:

  • cargo test --locked -p iceberg-catalog-glue --lib — 19 passed, including property parsing, defaults, and missing/empty warehouse validation.
  • cargo clippy --locked -p iceberg-catalog-glue --all-targets -- -D warnings.
  • cargo public-api -p iceberg-catalog-glue --all-features -ss matches the committed public API.
  • cargo fmt --all -- --check and git diff --check.

AI Disclosure

Developed with assistance from OpenAI Codex. Review focus: forwarding modeled catalog properties alongside custom AWS, storage, and KMS properties, matching the Memory catalog's behavior.

@blackmwk
blackmwk force-pushed the ir-3096-glue-properties branch from 196a1a1 to 29a45cf Compare September 4, 2026 03:03
Use the shared property derive for Glue catalog settings while preserving warehouse validation and forwarding AWS and storage properties.

Tracks [apache#3096](apache#3096).

Generated-by: Codex
@blackmwk
blackmwk force-pushed the ir-3096-glue-properties branch from 29a45cf to 9612813 Compare September 4, 2026 03:24
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions Bot closed this Oct 12, 2026
@blackmwk blackmwk reopened this Oct 14, 2026
@blackmwk blackmwk removed the stale label Oct 14, 2026
Comment thread crates/catalog/glue/src/catalog.rs Outdated
Comment thread crates/catalog/glue/src/catalog.rs Outdated
Comment thread crates/catalog/glue/src/catalog.rs Outdated
Derive Default for GlueCatalogBuilder, use the conventional tests module name, and remove the FileIO forwarding test requested in review.

Generated-by: Codex
@blackmwk
blackmwk marked this pull request as ready for review October 14, 2026 08:38

@mbutrovich mbutrovich left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @blackmwk, this lines up with the Memory (#3101) and SQL (#3105) refactors.

@blackmwk
blackmwk enabled auto-merge October 15, 2026 08:09

@laskoviymishka laskoviymishka left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

load now hands the full map to the KMS factory and FileIO, uri/catalog_id/warehouse included. That's fine with me since it's the stated intent, but I'd like a test that pins it (left a note inline). Also worth a line in the description: Debug for GlueCatalog no longer prints the raw props, so the AWS secret key and session token stop showing up in debug output. (this could be a follow up, not a blocking things)

};
let kms_client = match self.kms_client_factory {
Some(factory) => Some(factory.create_kms_client(&self.config.props).await?),
Some(factory) => Some(factory.create_kms_client(&props).await?),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This now passes uri/catalog_id/warehouse to create_kms_client (and to FileIO via file_io_props), where the old code stripped them first. Fine since it's the intent, but nothing pins it. I'd add a small test with a stub KmsClientFactory that records the map it receives and returns an error, so load stops before GlueCatalog::new, then assert the recorded map equals the full input. That way nobody quietly brings the filter back later.

/// Glue Catalog configuration
pub(crate) struct GlueCatalogConfig {
name: Option<String>,
#[derive(Debug, Properties)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The rename dropped the old doc line, I'd keep a one-liner:

Suggested change
#[derive(Debug, Properties)]
/// Glue catalog properties parsed from the `load` property map.
#[derive(Debug, Properties)]


#[tokio::test]
async fn test_load_rejects_missing_or_empty_warehouse() {
for props in [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If this fails, the output won't say which of the two cases tripped. I'd label them (or split into two tests):

for (case, props) in [
    ("missing", HashMap::new()),
    ("empty", HashMap::from([(GLUE_CATALOG_PROP_WAREHOUSE.to_string(), String::new())])),
] {
    // ...
    assert_eq!(error.kind(), ErrorKind::DataInvalid, "{case}");
    assert_eq!(error.message(), "Catalog warehouse is required", "{case}");
}

@blackmwk
blackmwk added this pull request to the merge queue Oct 15, 2026
Merged via the queue into apache:main with commit b3470c8 Oct 15, 2026
25 checks passed
@blackmwk
blackmwk deleted the ir-3096-glue-properties branch October 15, 2026 19:44
@blackmwk

Copy link
Copy Markdown
Contributor Author

Hi, @laskoviymishka THanks for review, I created a pr for following up you mentioned: #3478 PTAL

mbutrovich pushed a commit to mbutrovich/iceberg-rust that referenced this pull request Oct 16, 2026
Record the full map received by the KMS factory and check initialization error propagation. Label missing and empty warehouse cases and document the crate-private Glue properties.

Follow-up to apache#3102.

Generated-by: Codex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(glue): derive catalog configuration from properties

3 participants