Skip to content

Fix OVHcloud record creation for DNS-01 and Dynamic DNS - #458

Merged
drudge merged 2 commits into
mainfrom
fix/ovh-record-create
Oct 14, 2026
Merged

drudge merged 2 commits into
mainfrom
fix/ovh-record-create

Conversation

@drudge

@drudge drudge commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Fixes #450.

OVHcloud's POST /domain/zone/{zone}/record returns the created domain.zone.Record object ({"id":…,"zone":…,"fieldType":…,"subDomain":…,"target":…,"ttl":…}), not a bare record ID. Both callers decoded into int64:

  • ovhProvider.Present (ACME DNS-01) — fails every public TLS issuance/renewal with decode OVHcloud response: json: cannot unmarshal object into Go value of type int64.
  • ovhProvider.EnsureRecord (Dynamic DNS) — same failure whenever the record doesn't exist yet and has to be created.

Both now decode into a small ovhCreatedRecord{ID} struct; Present keeps the ID for cleanup. This matches how lego's OVH provider reads the same response.

Tests

  • TestOVHProviderRefreshesAfterCreateAndCleanup mocked the response as 42, which is why this slipped through; it now uses the real object shape.
  • New TestOVHEnsureRecordCreatesMissingRecord covers the Dynamic DNS create path.
  • Both new/updated tests fail on main with the exact error from the issue and pass here. mage verify green.

No UI changes.

POST /domain/zone/{zone}/record returns the new domain.zone.Record, not
a bare ID, so DNS-01 challenges and Dynamic DNS creates failed with
"cannot unmarshal object into Go value of type int64".

Fixes #450
@drudge
drudge merged commit dde3359 into main Oct 14, 2026
4 checks passed
@drudge
drudge deleted the fix/ovh-record-create branch October 14, 2026 19:04
@drudge

drudge commented Oct 14, 2026

Copy link
Copy Markdown
Owner Author

Post-merge review (Gray): LGTM, shipped in v1.7.1. Full review covering this PR and #459 is at #459 (tests fail on the pre-#458 OVH code, so they guard the fix; non-blocking nits there).

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.

Error when using OVH cloud for Public TLS Certificate

1 participant