feat(provider): ListDomains + EnumerateAll for infra.dns#27
Merged
Conversation
Adds Client.ListDomains calling GET /api/domains; returns the full
[]Domain list (ID + Name) for the authenticated account. Distinct from
GetDomain (which targets /api/domains/<name>/dns for per-zone records);
ListDomains is the account-level inverse-key needed by the upstream
IaCProviderEnumerator.EnumerateAll("infra.dns") path.
Loud-on-failure semantics:
- HTTP non-2xx surfaces as a Go error (rather than empty slice).
- Body-level {succeeded: false} also surfaces as an error so callers
don't act on stale state.
Part of docs/plans/2026-05-26-dns-provider-contract.md PR 4 (Task 10).
Introduces the hoverDomainLister interface (single-method shape: ListDomains) plus a domains field on HoverProvider so EnumerateAll can list the account's zones via either the real *hoverclient.Client or a slice-backed fake (fakeHoverClient) in tests. Initialize() now wires domains = client. The EnumerateAll method is intentionally not yet defined — tests fail at build time with 'no field or method EnumerateAll', driving the next commit's implementation. Part of docs/plans/2026-05-26-dns-provider-contract.md PR 4 (Task 12).
…ent ListDomains Wires the existing IaCProviderEnumerator service body on hoverIaCServer (was an Unimplemented stub) and adds the matching *HoverProvider.EnumerateAll Go method. Production uses *hoverclient.Client.ListDomains; tests inject a slice-backed hoverDomainLister (fakeHoverClient). Per-zone Outputs carry zone + domain_id so the downstream IaCProvider.Import path can adopt the zone without re-querying the account list. Domains with empty Name are dropped rather than emitted with empty ProviderID — guards against malformed upstream rows. Adds gRPC-level coverage on hoverIaCServer.EnumerateAll exercising the outputs_json marshalling round-trip. Part of docs/plans/2026-05-26-dns-provider-contract.md PR 4 (Task 12).
Adds an INFRA_DNS_ENUMERATE_LIVE=1 build-tagged smoke test that exercises the real *hoverclient.Client.ListDomains against a live Hover account. Live runs require HOVER_USERNAME + HOVER_PASSWORD; HOVER_TOTP_SECRET is optional and only needed when the test account has MFA enabled. Part of docs/plans/2026-05-26-dns-provider-contract.md PR 4 (Task 13).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Client.ListDomains(ctx) ([]Domain, error)topkg/hoverclientcallingGET /api/domains— the account-level inverse-key needed by the upstream IaCProviderEnumerator path.IaCProviderEnumerator.EnumerateAll(\"infra.dns\")onHoverProvidervia the new ListDomains; per-zoneOutputscarryzone+domain_id.hoverDomainListerinterface so tests inject a slice-backed fake (fakeHoverClient) instead of spinning up the real login flow.{succeeded:false}as Go errors (loud-on-failure).INFRA_DNS_ENUMERATE_LIVE=1+HOVER_USERNAME+HOVER_PASSWORD).Tag follow-up
The cross-repo cascade pin-bumps
pkg/hoverclientin consumers via workflow-registry PR 5 — that requires this PR to merge and av0.4.0tag on the parent module (workflow-plugin-hover).pkg/hoverclientis a subpath inside the single Go module, NOT a separate module, so the parent tag is what consumers resolve viago get .../pkg/hoverclient@v0.4.0.Part of cross-repo cascade docs/plans/2026-05-26-dns-provider-contract.md (workflow-plugin-infra).
Test plan