Repository navigation
fix(domains): the admin Sync button follows the nightly sync's due-date rule - #464
Conversation
…te rule The nightly domains:sync moves the next due date with a corrected expiry only while it was following it (Panelica#443), and leaves a due date billing set apart where it is. The admin Sync button had its own copy of the logic and put the due date 14 days before every expiry it read, so pressing it overrode the due date the nightly run had just kept. The comparison moves out of the command into App\Services\DomainSyncChanges and both use it. The button keeps its own last_sync fields and the RDAP fallback for a missing registration date. It now also writes only what changed, like the nightly run.
|
Merged, thank you. One rule in one place is the right fix; the Sync button putting the due date 14 days before every expiry it read was overriding what billing had set. Checked that All 3 tests red on 1.29.0, green after. Measured on the merge result: the full suite is green — 5463 passed in parallel ( |
|
Released in 1.30.0, the stable channel, offered to every installation. Gates on the tag and that package: full suite 5463 passed in parallel plus the 17 serial installer tests (0 failed, 5 skipped); 276 translation and parity tests green; the update lab 14 scenarios ALL GREEN; the real package updated the last stable (1.29.0 → 1.30.0, 13 checks) and the last beta (1.25.1-beta.1 → 1.30.0, 14 checks), each installed from its published package in the published runtime image with the signature checked by the key built into the application; the three uploaded assets re-downloaded and compared byte for byte before publishing. |
What was wrong
Since #443, the nightly
domains:syncmoves the next due date with a corrected expiry only while the due date was still following the expiry. A due date that billing set apart stays where it is ("Billing owns next_due_date; the registry only informs expiry_date",DomainSyncTest).The admin Sync button has its own copy of the logic. It sets the due date to 14 days before every expiry it reads. So pressing it overrode the due date the nightly run had just kept, and the two paths disagreed about the same domain. Raised in the community: https://community.pnlcs.com/t/43
The change
App\Services\DomainSyncChanges::between(), and both paths use it. The command's behaviour is unchanged.last_sync_*fields and the RDAP fallback for a missing registration date. It now writes only what changed, as the nightly run does, which includesregistrar_contact_id.A question for you
A domain whose due date was left behind before #443 now has no screen to correct it:
updateBillingleavesnext_due_dateto the renewal flow on purpose, and until now the button was the way round that. Should staff get a due date field on the domain page? I left that out of this PR.Tests
tests/Feature/AdminDomainSyncDueDateTest.phpcovers a due date that follows the expiry, one set apart from it, and an unchanged expiry. On main, all 3 fail; with the change, all 3 pass.DomainSyncTest,AdminDomainSyncRdapTestandDomainPrivacySyncTeststill pass. Full suite: 5,429 passed; the 2 failures (CurrencyAndBackupTest, MailLinkHostTest) fail the same way on main.