Skip to content

Initialize store in local temporary directory in ZarrWriter#855

Open
spencerkclark wants to merge 4 commits intomainfrom
fix/avoid-need-for-delete-access-in-zarr-writer
Open

Initialize store in local temporary directory in ZarrWriter#855
spencerkclark wants to merge 4 commits intomainfrom
fix/avoid-need-for-delete-access-in-zarr-writer

Conversation

@spencerkclark
Copy link
Member

This PR illustrates the fix proposed for #854.

This Beaker job shows that the changes in this PR enable writing zarr stores to GCS without any changes in permissions. The remote experiment_dir in this case was: gs://vcm-ml-scratch/spencerc/2026-02-19-ace-2pctCO2-evaluator-test-remote-zarr-write.

Changes:

  • Initializes the zarr store locally in a temporary directory before copying it to the final location within ZarrWriter.initialize_store.

  • Ensures that a FileExistsError is raised if the mode is "w-" and the specified path already exists—with this change we need to check this ourselves instead of relying on the zarr API.

  • Tests added

Resolves #854

@spencerkclark spencerkclark force-pushed the fix/avoid-need-for-delete-access-in-zarr-writer branch from 91d83ba to 9915e05 Compare February 19, 2026 17:34
@spencerkclark spencerkclark marked this pull request as ready for review February 19, 2026 19:14
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.

ZarrWriter.initialize_store requires delete access to object storage

1 participant

Comments