Skip to content

fix: stream records via /zone/{origin}/_stream - #1

Merged
Alserda merged 1 commit into
mainfrom
fix/stream-record-path
Jul 20, 2026
Merged

fix: stream records via /zone/{origin}/_stream#1
Alserda merged 1 commit into
mainfrom
fix/stream-record-path

Conversation

@Alserda

@Alserda Alserda commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Problem

StreamRecords posts to /zone/{origin}/{virtualNameServer}/_stream, but the real API keys the stream endpoint by origin alone: that path returns 404 on api.autodns.com (verified 2026-07-20 with a probe TXT record on a live zone). fakeautodns implemented the same wrong route, so the client and fake agreed with each other while both disagreed with production - no test caught it.

Fix

  • client.StreamRecords posts to /zone/{origin}/_stream and drops the now-unused virtualNameServer parameter (API change, allowed at v0.x).
  • fakeautodns serves the corrected origin-only route; its stream handler applies the stream to every stored zone with the given origin.
  • New unit test pins the production route so client and fake can no longer drift together on this path.

Verification

  • POST /zone/{origin}/_stream (no vns segment) against api.autodns.com on a live zone: HTTP 200, S0202002 - add and remove of a probe TXT record both succeeded.
  • The vns-carrying variant returns 404 with an empty error envelope.
  • make test and make lint green.

The real API keys the stream endpoint by origin alone and returns
404 for the /zone/{origin}/{virtualNameServer}/_stream path both the
client and fakeautodns used (verified against api.autodns.com on
2026-07-20; fake and client agreed with each other, so no test
caught it).

StreamRecords drops its now-unused virtualNameServer parameter, an
API change allowed at v0.x.
@Alserda
Alserda merged commit 2ecb0fe into main Jul 20, 2026
6 checks passed
@Alserda
Alserda deleted the fix/stream-record-path branch July 20, 2026 09:38
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