Download Raw Seismic Data Without Availability Confirmation - #2934
Conversation
collaborative-learning
|
||||||||||||||||||||||||||||
| Project |
collaborative-learning
|
| Branch Review |
raw-data-direct-download
|
| Run status |
|
| Run duration | 03m 07s |
| Commit |
|
| Committer | Teale Fristoe |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
4
|
| View all changes introduced in this branch ↗︎ | |
There was a problem hiding this comment.
Pull request overview
This PR updates the seismic download pipeline to remain functional even when the EarthScope availability endpoint is retired/unreachable, by falling back to “assume full range available” behavior and by treating 0-byte waveform responses as empty days rather than cached data.
Changes:
- Treats 0-byte
fetchRaw()responses asdayEmptyand avoids caching them. - Makes
fetchAvailability()resilient to proxy failures (e.g., HTTP 410 or network errors) by falling back to the full requested range (while still propagating aborts). - Adds tests covering the new fallback and 0-byte-day behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| shared/seismic/seismic-downloader.ts | Skips caching 0-byte day chunks and emits dayEmpty for them. |
| shared/seismic/seismic-downloader.test.ts | Adds coverage ensuring 0-byte fetches emit dayEmpty and don’t write to cache. |
| shared/seismic/earthscope-client.ts | Wraps availability fetch/parse in a try/catch and falls back to full-range on failures (except abort). |
| shared/seismic/earthscope-client.test.ts | Adds tests for 410/network fallback and abort propagation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #2934 +/- ##
===========================================
- Coverage 85.86% 69.41% -16.46%
===========================================
Files 957 952 -5
Lines 54527 54513 -14
Branches 14357 14357
===========================================
- Hits 46822 37840 -8982
- Misses 7687 16638 +8951
- Partials 18 35 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This PR is a quick fix to accommodate the earthscope availability service being pulled without warning.