Skip to content

Make the metadata stage work without the network - #230

Draft
chris-thomas-ga wants to merge 2 commits into
GeoscienceAustralia:mainfrom
chris-thomas-ga:fix/offline-metadata-stage
Draft

chris-thomas-ga wants to merge 2 commits into
GeoscienceAustralia:mainfrom
chris-thomas-ga:fix/offline-metadata-stage

Conversation

@chris-thomas-ga

Copy link
Copy Markdown
Contributor

Draft for now as the burst info part overlaps with #225, which reads the stage 3 burst info from the SAFE instead. If that goes in I'll drop the first commit and keep the STAC schema one.

Description

The metadata and upload stage runs after RTC, so any network failure there throws away the whole run.

  • Stage 1 now saves the CDSE burst info to {scene}_burst_info.json in the results folder, and stage 3 reads that instead of querying CDSE again. It falls back to CDSE if the file isn't there.
  • --validate-stac (on by default) fetched about 10 extension schemas from stac-extensions.github.io in every job, with no timeout. These are now vendored under sar_pipeline/data/stac_schemas/ and preloaded into pystac's validator.
  • Added a timeout to the static layer STAC fetch.

Most of the diff is the vendored schema JSON.

Testing

tests/sar_pipeline/test_burst_info_json.py and tests/sar_pipeline/test_offline_stac_validation.py. The latter validates with the network blocked, and checks that an invalid item still fails.

Type of change

  • Bug fix

chris-thomas-ga and others added 2 commits November 24, 2026 07:35
The metadata stage queried the CDSE burst catalogue again after RTC had
finished, so a throttled or stalled request discarded the RTC run. Stage 1
now writes {scene}_burst_info.json to the out folder and the metadata stage
reads it, falling back to the CDSE only if the file is missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… fetch

STAC validation (on by default) fetched about 10 extension schemas from
stac-extensions.github.io after RTC, with no timeout. Vendor the extension
schemas and their remote refs under sar_pipeline/data/stac_schemas and
pre-fill the pystac validator cache before validating. Also add a timeout to
the static-layer STAC request used with --link-static-layers.

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