Remove registrar id from invoice grouping key#2749
Remove registrar id from invoice grouping key#2749jicelhay merged 7 commits intogoogle:masterfrom jicelhay:invoicepipelinekey
Conversation
CydeWeys
left a comment
There was a problem hiding this comment.
The PR descriptions mentions Sav explicitly, but this will change the billing behavior for all multi-accreditation registrars (of which we have many), right?
Reviewable status: 0 of 2 files reviewed, all discussions resolved
CydeWeys
left a comment
There was a problem hiding this comment.
Also, in the absence of the registrar ID, what are we grouping on? Just the billing ID? So the billing ID would have to be the same across the various accreditations for a registrar for this to group correctly?
Reviewable status: 0 of 2 files reviewed, all discussions resolved
jicelhay
left a comment
There was a problem hiding this comment.
Yes, it changes the rows of the invoice CSV file which is a single file: it removes the value of one column and because of that the grouping/end result of the file is different.
If you look at the GenerateInvoiceRows.expand method, it maps strings to InvoiceGroupingKeys and then counts/groups identical occurrences. It wasn't explicitly grouping on registrarId, but on the whole row. Once removed it will still group on InvoiceGroupingKey, so for this case = ProductAccountKey and !=registrarId will now group these rows together.
Reviewable status: 0 of 2 files reviewed, all discussions resolved
CydeWeys
left a comment
There was a problem hiding this comment.
Can you amend the commit description to explain details of how grouping is handled after this commit, and omit specific mention of Sav seeing as how this change affects all multi-accreditation registrars?
Reviewable status: 0 of 2 files reviewed, all discussions resolved
CydeWeys
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion
core/src/main/java/google/registry/beam/billing/BillingEvent.java line 175 at r1 (raw file):
.toString(), billingId(), "",
Does null make more sense here vs empty string?
jicelhay
left a comment
There was a problem hiding this comment.
Description updated.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @CydeWeys)
core/src/main/java/google/registry/beam/billing/BillingEvent.java line 175 at r1 (raw file):
Previously, CydeWeys (Ben McIlwain) wrote…
Does null make more sense here vs empty string?
I put "" because the invoicing pipeline sets "" on other fields that are not present (see poNumber) so I assumed it's the way the team prefered to handle non present values. I don't have a strong preference.
I think the most correct solution would be to remove registrar id from the key/string row and remove the header from the csv file, but I don't want to change the code too much.
CydeWeys
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, all discussions resolved
* Remove registrar id from invoice grouping key * Fix formatting issues * Update BillingEventTests
* Remove registrar id from invoice grouping key * Fix formatting issues * Update BillingEventTests
* Remove registrar id from invoice grouping key * Fix formatting issues * Update BillingEventTests
The desired outcome from this changes are:
b/410593421
This change is