Skip to content

erddap-mcp: anchor the buoy live test to the dataset's maxTime, not now - #124

Merged
mansurjisan merged 1 commit into
mainfrom
fix/erddap-live-test-buoy-window
Sep 4, 2026
Merged

mansurjisan merged 1 commit into
mainfrom
fix/erddap-live-test-buoy-window

Conversation

@mansurjisan

Copy link
Copy Markdown
Collaborator

Closes #121

Why

The weekly Live API Tests job has failed for erddap-mcp on 2026-08-17, 08-24 and 08-31. The failing test, test_get_tabledap_buoy, queries PacIOOS buoy wqb_04 with a rolling now-2days window. Live check today:

allDatasets: wqb_04 maxTime = 2026-08-13T19:45:00Z
tabledap wqb_04 ... time>=now-2days -> 404 "Your query produced no matching results
  (time>=2026-09-02... is outside of the variable's actual_range: ... to 2026-08-13T19:45:00Z)"

The buoy went offline on 2026-08-13. The client and the ERDDAP API are fine; the test was pinned to one sensor's uptime, which is not what test_live.py is meant to detect.

What

  • Read wqb_04's maxTime from tabledap/allDatasets first, then query a 2-day window ending at that timestamp.
  • The test still exercises get_all_datasets with a string constraint and get_tabledap with two time constraints, so an upstream API or response-shape change would still surface.
  • Clear assertion messages if the dataset is ever delisted or loses its maxTime.

Verification

  • uv run pytest tests/test_live.py -v against PacIOOS: 5 passed (was 1 failed, 4 passed).
  • Unit + MCP protocol tests: 116 passed; uv build OK; ruff check/format clean.

test_get_tabledap_buoy queried PacIOOS wqb_04 with a rolling
now-2days window. The buoy stopped reporting on 2026-08-13, so ERDDAP
has answered every weekly run since with its "no matching results"
404 and the live job has been red for three weeks (issue #121). That
is a sensor outage, not API drift, which is what test_live.py exists
to catch.

Look up the dataset's maxTime through allDatasets first and build the
2-day window from that, so the test keeps exercising the tabledap path
(a string constraint plus two time constraints) regardless of whether
the buoy is currently online. Verified live: all five erddap live tests
pass against PacIOOS.
@mansurjisan
mansurjisan merged commit df40cd8 into main Sep 4, 2026
20 checks passed
@mansurjisan
mansurjisan deleted the fix/erddap-live-test-buoy-window branch September 4, 2026 04: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.

Live API drift: erddap-mcp

1 participant