Skip to content

Remove proofing costs report, associated data (LG-8028)#7345

Merged
zachmargolis merged 4 commits intomainfrom
margolis-remove-proofing-costs-reports
Nov 16, 2022
Merged

Remove proofing costs report, associated data (LG-8028)#7345
zachmargolis merged 4 commits intomainfrom
margolis-remove-proofing-costs-reports

Conversation

@zachmargolis
Copy link
Contributor

🎫 Ticket

LG-8028

🛠 Summary of changes

Confirmed in Slack this is not used, next up will be dropping this table.

We still use the sp_costs table, so that will be sticking around.

changelog: Internal, Reporting, Remove unused reporting code
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines +8 to +9
# rubocop:disable Lint/UnusedMethodArgument
def perform(issuer:, result_id:, encrypted_arguments:, trace_id:, user_id: nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit confused by what I'm seeing in #7346 changes, but just to confirm: The unused argument here is temporary during deployment, and we'll circle back to remove it and the Rubocop inline disabling?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah the two PRs got out of sync a bit as I was patching more issues

My current thinking is, maybe we don't want to remove the user_id as an argument? Since if we ever wanted to add analytics logging, it would be useful to have, etc

@@ -2,9 +2,5 @@ class BackfillAddAcuantResultToProofingCosts < ActiveRecord::Migration[5.2]
disable_ddl_transaction!

def up
Copy link
Contributor

Choose a reason for hiding this comment

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

A question from my own ignorance: Could we remove this migration file altogether?

Copy link
Contributor

Choose a reason for hiding this comment

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

Related question: We only need to do anything here because the Ruby class implemlentation wouldn't exist, right? So it's not a problem that other migrations would continue to reference the (later-deleted) tables, since they'd be present at that point in the migration timeline?

add_column :proofing_costs, :threatmetrix_count, :integer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah exactly, it's because the ProofingCost model was removed, so this blew up with a name error.

Another option would have been to redo this as raw SQL because at the time it runs, the table would exist.

I guess we could remove the class, but the timestamp slug would still exist in the schema_migrations table? But it's not like we check that very often so it's probably not a big deal.

Do you think it would be clearer to remove entirely?

Copy link
Contributor

Choose a reason for hiding this comment

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

I was mostly curious to improve my understanding of the migrations, but I don't have a strong feeling one way or the other. I think practically speaking this is almost certainly something we won't need. I'd defer to what you think is best, and generally would be fine to keep it as-is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok! Ill choose to leave it, because I think for future us, it's easier to look back at the history of a mostly empty file that does exist, rather than search history for a file that used to exist

@zachmargolis zachmargolis merged commit 913ccb0 into main Nov 16, 2022
@zachmargolis zachmargolis deleted the margolis-remove-proofing-costs-reports branch November 16, 2022 16:55
@solipet solipet mentioned this pull request Nov 18, 2022
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