refactor(encryption) use StandardKeyMetadata from EncryptedOutputFile in ManifestWriterBuilder#2628
Open
xanderbailey wants to merge 3 commits into
Open
Conversation
xanderbailey
commented
Jun 12, 2026
| pub fn iceberg::spec::ManifestWriterBuilder::build_v3_deletes(self) -> iceberg::spec::ManifestWriter | ||
| pub fn iceberg::spec::ManifestWriterBuilder::new(output: iceberg::io::OutputFile, snapshot_id: core::option::Option<i64>, key_metadata: core::option::Option<alloc::vec::Vec<u8>>, schema: iceberg::spec::SchemaRef, partition_spec: iceberg::spec::PartitionSpec) -> Self | ||
| pub fn iceberg::spec::ManifestWriterBuilder::new_from_encrypted(encrypted_output: iceberg::encryption::EncryptedOutputFile, snapshot_id: core::option::Option<i64>, key_metadata: core::option::Option<alloc::vec::Vec<u8>>, schema: iceberg::spec::SchemaRef, partition_spec: iceberg::spec::PartitionSpec) -> Self | ||
| pub fn iceberg::spec::ManifestWriterBuilder::new_from_encrypted(encrypted_output: iceberg::encryption::EncryptedOutputFile, snapshot_id: core::option::Option<i64>, schema: iceberg::spec::SchemaRef, partition_spec: iceberg::spec::PartitionSpec) -> iceberg::Result<Self> |
Contributor
Author
There was a problem hiding this comment.
This isn't a break to users since this hasn't been released or used within the crate
xanderbailey
commented
Jun 12, 2026
| pub fn new( | ||
| output: OutputFile, | ||
| snapshot_id: Option<i64>, | ||
| key_metadata: Option<Vec<u8>>, |
Contributor
Author
There was a problem hiding this comment.
I didn't realise this at the time but it's likely incorrect that we have key_metadata in this constructor at all. This should never be present with a plaintext OutputFile. But in #2568 we discussed a desire to not break this API but on closer look, I think the current API here is error-prone.
Contributor
Author
There was a problem hiding this comment.
@blackmwk very interested to know your thoughts here.
Contributor
Author
|
failing CI is fixed in #2627 |
584f31f to
da189b6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
In #2568 we introduced
new_from_encryptedbut the api isn't very ergonomic becauseEncryptedOutputFilehasStandardKeyMetadataon it already so we don't need to pass inkey_metadataalso.working towards #2034
What changes are included in this PR?
Are these changes tested?