fix: return error from rdapQuery when no expiration event found#1603
Conversation
When an RDAP response has no expiration event, rdapQuery returned a zero-value ExpirationDate with nil error. This prevented GetDomainExpiration from falling back to WHOIS, causing failures for TLDs like .net where RDAP may omit the expiration event. Signed-off-by: majiayu000 <1835304752@qq.com>
Add .net domain test cases to TestRdapQuery and TestGetDomainExpiration to cover the fallback path when RDAP lacks an expiration event (TwiN#1570). Include hostname in the error message for easier debugging. Signed-off-by: majiayu000 <1835304752@qq.com>
|
Thank you for the contribution! |
|
I stand most greatly appreciative of everyone that looked into this issue. The reason I am asking is because I just entirely deleted and downloaded whatever is the currently available version of the container which states it is 7 hours old and I see that the code was merged 7 hours ago. Thus, I presume the container I have is the latest code. If so, then I sadly must state that the bug seems to be remaining stubbornly persistent. However, if I simply must wait a bit longer for the latest code to merge into the container I understand entirely. Stuart, N3GWG |
|
It should be available under the latest tag, but you may still have it cached. FWIW there was a build issue yesterday that I just fixed, so maybe that was the issue |
|
I downloaded this image: It seems to still have the bug persistent. Am I using the proper image that has the fix in it or is this wrong? Thanks for your hard work on this thus far! Stuart, N3GWG |
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/twin/gatus](https://github.com/TwiN/gatus) | minor | `v5.35.0` → `v5.36.0` | --- ### Release Notes <details> <summary>TwiN/gatus (ghcr.io/twin/gatus)</summary> ### [`v5.36.0`](https://github.com/TwiN/gatus/releases/tag/v5.36.0) [Compare Source](TwiN/gatus@v5.35.0...v5.36.0) ##### What's Changed - perf: Add PostgreSQL indexes for \~15x performance improvement by [@​ozanonurtek](https://github.com/ozanonurtek) in [#​1541](TwiN/gatus#1541) - fix(alerting): Remove square brackets from email subject by [@​jaydeethree](https://github.com/jaydeethree) in [#​1586](TwiN/gatus#1586) - fix(security): Do not allow invalid security configs by [@​PythonGermany](https://github.com/PythonGermany) in [#​1531](TwiN/gatus#1531) - fix: return error from rdapQuery when no expiration event found by [@​majiayu000](https://github.com/majiayu000) in [#​1603](TwiN/gatus#1603) - fix(ci): regenerate-static-assets workflow reporting false errors on success by [@​Copilot](https://github.com/Copilot) in [#​1614](TwiN/gatus#1614) - feat(ui): Add customizable OIDC login screen branding by [@​hluaces](https://github.com/hluaces) in [#​1583](TwiN/gatus#1583) - fix(test): Remove t.Parallel() from tests racing on injectedHTTPClient by [@​Copilot](https://github.com/Copilot) in [#​1630](TwiN/gatus#1630) - fix(storage): close rows before nested queries to prevent PostgreSQL driver error by [@​osalloum](https://github.com/osalloum) in [#​1503](TwiN/gatus#1503) - docs: Document remote.client configuration by [@​surdaft](https://github.com/surdaft) in [#​1637](TwiN/gatus#1637) - fix: update lib/pq to v1.11.2 to fix Supabase PostgreSQL connection regression by [@​wahajahmed010](https://github.com/wahajahmed010) in [#​1644](TwiN/gatus#1644) ##### New Contributors - [@​ozanonurtek](https://github.com/ozanonurtek) made their first contribution in [#​1541](TwiN/gatus#1541) - [@​jaydeethree](https://github.com/jaydeethree) made their first contribution in [#​1586](TwiN/gatus#1586) - [@​majiayu000](https://github.com/majiayu000) made their first contribution in [#​1603](TwiN/gatus#1603) - [@​hluaces](https://github.com/hluaces) made their first contribution in [#​1583](TwiN/gatus#1583) - [@​osalloum](https://github.com/osalloum) made their first contribution in [#​1503](TwiN/gatus#1503) - [@​surdaft](https://github.com/surdaft) made their first contribution in [#​1637](TwiN/gatus#1637) - [@​wahajahmed010](https://github.com/wahajahmed010) made their first contribution in [#​1644](TwiN/gatus#1644) **Full Changelog**: <TwiN/gatus@v5.35.0...v5.36.0> </details> --- ### Configuration 📅 **Schedule**: (in timezone America/New_York) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xODIuMiIsInVwZGF0ZWRJblZlciI6IjQzLjE4Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19--> Reviewed-on: https://git.greyrock.io/greyrock-labs/home-ops/pulls/82
…(#577) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/twin/gatus](https://github.com/TwiN/gatus) | minor | `v5.35.0` → `v5.36.0` | --- ### Release Notes <details> <summary>TwiN/gatus (ghcr.io/twin/gatus)</summary> ### [`v5.36.0`](https://github.com/TwiN/gatus/releases/tag/v5.36.0) [Compare Source](TwiN/gatus@v5.35.0...v5.36.0) ##### What's Changed - perf: Add PostgreSQL indexes for \~15x performance improvement by [@​ozanonurtek](https://github.com/ozanonurtek) in [#​1541](TwiN/gatus#1541) - fix(alerting): Remove square brackets from email subject by [@​jaydeethree](https://github.com/jaydeethree) in [#​1586](TwiN/gatus#1586) - fix(security): Do not allow invalid security configs by [@​PythonGermany](https://github.com/PythonGermany) in [#​1531](TwiN/gatus#1531) - fix: return error from rdapQuery when no expiration event found by [@​majiayu000](https://github.com/majiayu000) in [#​1603](TwiN/gatus#1603) - fix(ci): regenerate-static-assets workflow reporting false errors on success by [@​Copilot](https://github.com/Copilot) in [#​1614](TwiN/gatus#1614) - feat(ui): Add customizable OIDC login screen branding by [@​hluaces](https://github.com/hluaces) in [#​1583](TwiN/gatus#1583) - fix(test): Remove t.Parallel() from tests racing on injectedHTTPClient by [@​Copilot](https://github.com/Copilot) in [#​1630](TwiN/gatus#1630) - fix(storage): close rows before nested queries to prevent PostgreSQL driver error by [@​osalloum](https://github.com/osalloum) in [#​1503](TwiN/gatus#1503) - docs: Document remote.client configuration by [@​surdaft](https://github.com/surdaft) in [#​1637](TwiN/gatus#1637) - fix: update lib/pq to v1.11.2 to fix Supabase PostgreSQL connection regression by [@​wahajahmed010](https://github.com/wahajahmed010) in [#​1644](TwiN/gatus#1644) ##### New Contributors - [@​ozanonurtek](https://github.com/ozanonurtek) made their first contribution in [#​1541](TwiN/gatus#1541) - [@​jaydeethree](https://github.com/jaydeethree) made their first contribution in [#​1586](TwiN/gatus#1586) - [@​majiayu000](https://github.com/majiayu000) made their first contribution in [#​1603](TwiN/gatus#1603) - [@​hluaces](https://github.com/hluaces) made their first contribution in [#​1583](TwiN/gatus#1583) - [@​osalloum](https://github.com/osalloum) made their first contribution in [#​1503](TwiN/gatus#1503) - [@​surdaft](https://github.com/surdaft) made their first contribution in [#​1637](TwiN/gatus#1637) - [@​wahajahmed010](https://github.com/wahajahmed010) made their first contribution in [#​1644](TwiN/gatus#1644) **Full Changelog**: <TwiN/gatus@v5.35.0...v5.36.0> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19--> Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/577
Fixes #1570
rdapQuery()was silently returning a zero-valueExpirationDatewhen the RDAPresponse didn't contain an expiration event. This meant
GetDomainExpirationneverfell back to WHOIS for domains like .net where RDAP might not include expiration data.
Added a check after the event loop: if
ExpirationDateis still zero, return an errorso the caller falls back to WHOIS as intended (client.go:73-74).
Also added a test case for a .net domain in
TestRdapQuery.