Skip to content

Download Raw Seismic Data Without Availability Confirmation - #2934

Merged
tealefristoe merged 3 commits into
masterfrom
raw-data-direct-download
Jul 27, 2026
Merged

Download Raw Seismic Data Without Availability Confirmation#2934
tealefristoe merged 3 commits into
masterfrom
raw-data-direct-download

Conversation

@tealefristoe

@tealefristoe tealefristoe commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

This PR is a quick fix to accommodate the earthscope availability service being pulled without warning.

  • When the availability check returns 410, we just assume all of the time range is available.
  • We now report days with 0 bytes as empty days. Previously, the availability service would have told us a day like that was not available and we wouldn't have even tried downloading it.

@cypress

cypress Bot commented Jul 27, 2026

Copy link
Copy Markdown

collaborative-learning    Run #19562

Run Properties:  status check passed Passed #19562  •  git commit 673b9fe467: Emit progress for empty days.
Project collaborative-learning
Branch Review raw-data-direct-download
Run status status check passed Passed #19562
Run duration 03m 07s
Commit git commit 673b9fe467: Emit progress for empty days.
Committer Teale Fristoe
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
View all changes introduced in this branch ↗︎

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 as dayEmpty and 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.

Comment thread shared/seismic/seismic-downloader.ts
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.41%. Comparing base (4fc50e8) to head (673b9fe).

❗ There is a different number of reports uploaded between BASE (4fc50e8) and HEAD (673b9fe). Click for more details.

HEAD has 35 uploads less than BASE
Flag BASE (4fc50e8) HEAD (673b9fe)
cypress-regression 15 0
cypress 20 0
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     
Flag Coverage Δ
cypress ?
cypress-regression ?
cypress-smoke 41.64% <0.00%> (+0.08%) ⬆️
jest 55.85% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tealefristoe
tealefristoe marked this pull request as ready for review July 27, 2026 21:25
@tealefristoe
tealefristoe requested a review from scytacki July 27, 2026 21:25

@scytacki scytacki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@tealefristoe
tealefristoe merged commit 2f61263 into master Jul 27, 2026
12 of 13 checks passed
@tealefristoe
tealefristoe deleted the raw-data-direct-download branch July 27, 2026 23:18
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.

3 participants