Repository navigation
Archives - #189
Merged
Merged
Archives#189
Conversation
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.
Description
Summary
Make archive extraction safe for shared-cache and multiprocessing workflows by centralizing archive materialization in Fetchez and migrating Transformez's archive consumers to the new extraction utilities.
The previous implementation extracted VDatum grids directly into the shared cache with
zipfile.extract(), and other compressed resources used independent extraction paths. When multiple Transformez/Globato processes shared a cache, one process could truncate and rewrite a resource while another was reading it, causing GDAL/NetCDF read failures and repeated cache repair.Fetchez now provides
p_f_extract()as the common archive materialization primitive. It uses inter-process locking, validates reusable extracted resources, stages archive contents outside the final destination, and atomically publishes completed files. The existingp_f_unzip(),p_f_untar(), andp_f_gunzip()helpers delegate to this implementation.Transformez now uses the shared extraction path for all of its archive-derived resources:
fetchez.utils.p_f_extract().ReferenceFetcherusep_f_extract().p_f_extract()for archive extraction.p_f_extract()for archive extraction.Pathobjects throughout the filesystem-facing code.Regression coverage verifies the Transformez/Fetchez integration and preserves the intended shared-cache behavior, while the multi-process extraction tests in Fetchez verify the locking and atomic-publication guarantees themselves.
This removes the in-place archive extraction that caused the reported VDatum/shared-cache race and establishes Fetchez as the single safe archive-materialization layer for Transformez.
Closes #183 .
Checklist
closes #1)CHANGELOG.mdupdatedREADME.mdupdated🔍 Docs preview: https://transformez--189.org.readthedocs.build/en/189/