Repository navigation
fix: preserve version in get/head metadata - #807
Merged
Merged
Conversation
`MaybePrefixedStore::strip_meta` rebuilt `ObjectMeta` with `version: None`. Since #745 routed `get_opts` results through it, `get` and `head` on S3, GCS and Azure stores have returned `version=None` even when the store reports one, with or without a prefix. On GCS this breaks conditional updates, which need the object generation in `version`. Keep `meta.version`, matching upstream's fix in apache/arrow-rs-object-store#691, and add MinIO regression tests against a versioned bucket. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kylebarron
commented
Oct 27, 2026
| location: self.strip_prefix(meta.location), | ||
| e_tag: meta.e_tag, | ||
| version: None, | ||
| version: meta.version, |
|
thanks for the quick fix @kylebarron ! |
kylebarron
added a commit
that referenced
this pull request
Oct 27, 2026
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.
Note
This PR was written by Claude (Claude Code), not by @kylebarron.
Closes #806.
MaybePrefixedStore::strip_metarebuiltObjectMetawithversion: None. Since #745 started passingget_optsresults through it,getandhead(and their async variants) onS3Store,GCSStoreandAzureStorereturnversion=Noneeven when the store reports one, with or without a prefix.On GCS,
PutMode::Updaterequiresversion(the object generation), so a conditional update built fromheadfails with "Version required for conditional update". S3 and Azure conditional updates only usee_tag, so they kept working.This keeps
meta.versionin bothstrip_metafunctions, the same fix upstream made in apache/arrow-rs-object-store#691. #745 ported apache/arrow-rs-object-store#686 but not that follow-up.The regression shipped in obstore 0.12.0 and pyo3-object_store 0.13.0.
Tests
minio_versioned_storefixture. It's listed inthread_unsafe_fixturesbecause the tests write and then read the same key.test_head_versionandtest_get_versioncheck thatheadandgetreturn the version thatputcreated. Both fail onmainwithassert None == '<version id>'and pass with this change.🤖 Written by Claude Code