Skip to content

Upload stac-item.json last and use it as the product marker - #226

Open
chris-thomas-ga wants to merge 2 commits into
GeoscienceAustralia:mainfrom
chris-thomas-ga:fix/s3-upload-commit-marker
Open

chris-thomas-ga wants to merge 2 commits into
GeoscienceAustralia:mainfrom
chris-thomas-ga:fix/s3-upload-commit-marker

Conversation

@chris-thomas-ga

Copy link
Copy Markdown
Contributor

Description

Burst files are uploaded in whatever order os.walk gives us, and a product counts as existing if any .h5 is in its folder. If a job dies part way through an upload (OOM, node reclaim, an S3 error) after the .h5 has landed, every later run skips that burst and it stays incomplete for good. The STAC item can also land before the files it points at.

This uploads _metadata.h5 second last and _stac-item.json last. Both existence checks (before processing and before upload) now look for the STAC item instead of the .h5, so a folder left with only an .h5 from an old partial upload gets reprocessed.

Testing

New offline tests in tests/sar_pipeline/test_s3_upload_commit_marker.py covering upload order, the existence check and a legacy partial folder. I haven't run the live isce3_rtc tests.

Type of change

  • Bug fix

Burst products were uploaded in os.walk order and "exists" meant "any .h5
in the prefix", so a job killed mid-upload could leave a partial product
that every later run skipped. Upload the .h5 and then the stac-item.json
last, and make the existence checks (before processing and before upload)
look for the stac-item.json, so a partial upload is re-made.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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