Skip to content

fix(domains): the admin Sync button follows the nightly sync's due-date rule - #464

Merged
Panelica merged 1 commit into
Panelica:mainfrom
ertugrulkeyvan:fix/admin-sync-follows-daily-rule
Nov 18, 2026
Merged

Panelica merged 1 commit into
Panelica:mainfrom
ertugrulkeyvan:fix/admin-sync-follows-daily-rule

Conversation

@ertugrulkeyvan

Copy link
Copy Markdown
Contributor

What was wrong

Since #443, the nightly domains:sync moves 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

  • The comparison moves out of the command into App\Services\DomainSyncChanges::between(), and both paths use it. The command's behaviour is unchanged.
  • The button keeps its own last_sync_* fields and the RDAP fallback for a missing registration date. It now writes only what changed, as the nightly run does, which includes registrar_contact_id.

A question for you

A domain whose due date was left behind before #443 now has no screen to correct it: updateBilling leaves next_due_date to 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.php covers 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, AdminDomainSyncRdapTest and DomainPrivacySyncTest still pass. Full suite: 5,429 passed; the 2 failures (CurrencyAndBackupTest, MailLinkHostTest) fail the same way on main.

…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.
@Panelica
Panelica merged commit fccdb6c into Panelica:main Nov 18, 2026
1 check passed
@Panelica

Copy link
Copy Markdown
Owner

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 DomainSyncChanges::between(...) + ['last_sync_at' => …] cannot collide (the service never returns those keys) and that the RDAP fallback still only fills a date that is genuinely missing.

All 3 tests red on 1.29.0, green after. Measured on the merge result: the full suite is green — 5463 passed in parallel (--exclude-group=serial, 4 processes) plus the 17 serial installer tests, 5 skipped, 0 failed.

@Panelica

Copy link
Copy Markdown
Owner

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.

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.

2 participants