Skip to content

fix(manifest): make empty writer close terminal - #1610

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/manifest-empty-close-terminal
Open

fix(manifest): make empty writer close terminal#1610
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/manifest-empty-close-terminal

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What changed

Make the first ManifestWriter.Close call terminal even when the manifest is empty. The writer now closes its OCF writer, stores the combined close result, and returns that same result from later close attempts.

Why

An empty-manifest error previously left the writer open. Entries could be added afterward, and a later Close or ToManifestFile call could turn the original failure into success.

Testing

  • Added coverage for repeated close, adding after close, and ToManifestFile after the failed close
  • go test ./...

Signed-off-by: Minh Vu <vuhoangminh97@gmail.com>
@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 30, 2026 19:39
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.

1 participant