- 
                Notifications
    
You must be signed in to change notification settings  - Fork 291
 
Remove registrar id from invoice grouping key #2749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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