Skip to content

Join cancellations on billing time as well#3124

Merged
gbrodman merged 1 commit into
google:masterfrom
gbrodman:billingJoin
Jul 6, 2026
Merged

Join cancellations on billing time as well#3124
gbrodman merged 1 commit into
google:masterfrom
gbrodman:billingJoin

Conversation

@gbrodman

@gbrodman gbrodman commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

This is a small edge case where a cancellation for year 2 could cancel out events in year 1 if we re-ran billing for year 1 for some reason. I don't think we would ever re-run one year later so this is kind of moot, but it's probably still a good thing to do.


This change is Reviewable

This is a small edge case where a cancellation for year 2 could cancel
out events in year 1 if we re-ran billing for year 1 for some reason. I
don't think we would ever re-run one year later so this is kind of moot,
but it's probably still a good thing to do.
@gbrodman gbrodman requested a review from jicelhay July 1, 2026 17:40
@jicelhay

jicelhay commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

core/src/main/resources/google/registry/beam/billing/sql/cloud_sql_billing_events.sql line 33 at r1 (raw file):

JOIN Tld t ON t.tldStr = d.tld
LEFT JOIN BillingCancellation c ON b.id = c.billingEvent
LEFT JOIN BillingCancellation cr ON b.cancellationMatchingBillingEvent = cr.billingRecurrence AND b.billingTime = cr.billingTime

How sure are you that these billingTimes will match exactly for valid cancellations?

@gbrodman gbrodman left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gbrodman made 1 comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on jicelhay).


core/src/main/resources/google/registry/beam/billing/sql/cloud_sql_billing_events.sql line 33 at r1 (raw file):

Previously, jicelhay (Juan Celhay) wrote…

How sure are you that these billingTimes will match exactly for valid cancellations?

Yep. The cancellation billing time, grace period expiration time, and BillingEvent billing time are always the same

@jicelhay

jicelhay commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

core/src/main/resources/google/registry/beam/billing/sql/cloud_sql_billing_events.sql line 33 at r1 (raw file):

Previously, gbrodman wrote…

Yep. The cancellation billing time, grace period expiration time, and BillingEvent billing time are always the same

Alright, worth having a confirmation. LGTM.

@jicelhay jicelhay left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jicelhay reviewed 2 files and all commit messages, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on gbrodman).

@gbrodman gbrodman added this pull request to the merge queue Jul 6, 2026
Merged via the queue into google:master with commit a6e4017 Jul 6, 2026
16 checks passed
@gbrodman gbrodman deleted the billingJoin branch July 6, 2026 19:44
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