Skip to content

refactor(encryption) remove key_metadata from the constructor of an unencrypted manifest writer#2666

Open
xanderbailey wants to merge 3 commits into
apache:mainfrom
xanderbailey:xb/remove_metadata_from_writer_constructor
Open

refactor(encryption) remove key_metadata from the constructor of an unencrypted manifest writer#2666
xanderbailey wants to merge 3 commits into
apache:mainfrom
xanderbailey:xb/remove_metadata_from_writer_constructor

Conversation

@xanderbailey

@xanderbailey xanderbailey commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Follow up for #2628

What changes are included in this PR?

Now that we have two constructors for ManifestWriterBuilder, new and new_from_encrypted, it should never be the case that you want to present key_metadata to an unencrypted output.

Are these changes tested?

let builder = ManifestWriterBuilder::new(
output_file,
Some(self.snapshot_id),
self.key_metadata.clone(),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The metadata here comes from the fast append action which I think is also wrong but I'll remove that in a further follow up PR to keep these refactors targeted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ahh metadata becomes dead code on snapshot producer so maybe I will remove here.

@blackmwk blackmwk 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.

Thanks @xanderbailey for this pr, just one minor comment.

@@ -60,7 +60,6 @@ impl ManifestWriterBuilder {
pub fn new(

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.

We should add comments to explain that this is for creating an unencrypted manifest.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@xanderbailey

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review @blackmwk, can you take another quick look because I've also removed this from FastAppendAction fb5df7e since it was now "dead code"

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.

2 participants