Skip to content
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

Update entity_check_job to loop through entities only #98

Merged
merged 8 commits into from
Nov 28, 2023

Conversation

ericaporter
Copy link
Contributor

We noticed after testing on Register, that the entity_check_job would loop through sub-types causing an extra event to be sent to BQ.

This PR updates the perform method to loop through entities only and updates the build_event_for method to handle entity_name rather than model. The logger message had to be moved too.

@ericaporter ericaporter requested a review from asatwal November 23, 2023 11:42
Copy link
Collaborator

@asatwal asatwal left a comment

Choose a reason for hiding this comment

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

Please see comments.

lib/dfe/analytics/entity_table_check_job.rb Outdated Show resolved Hide resolved
lib/dfe/analytics/entity_table_check_job.rb Outdated Show resolved Hide resolved
Copy link
Collaborator

@asatwal asatwal left a comment

Choose a reason for hiding this comment

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

A few comments as I've noticed a few things. I also got errors when running locally as the checksum_calculated_at was a little out. I had to add Timecop.

I'll push a commit to fix review comments and added Timecop.

Also removed model altogether from entity checksum.

Could you take a look please.

lib/dfe/analytics/entity_table_check_job.rb Outdated Show resolved Hide resolved
lib/dfe/analytics/entity_table_check_job.rb Outdated Show resolved Hide resolved
lib/dfe/analytics/entity_table_check_job.rb Outdated Show resolved Hide resolved
lib/dfe/analytics/entity_table_check_job.rb Show resolved Hide resolved
lib/dfe/analytics/entity_table_check_job.rb Outdated Show resolved Hide resolved
Copy link
Contributor Author

@ericaporter ericaporter left a comment

Choose a reason for hiding this comment

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

Updates look good 👍

@asatwal
Copy link
Collaborator

asatwal commented Nov 27, 2023

Updates look good 👍

I'm going to test this in Register staging overnight. We can then merge if all OK.

Copy link
Collaborator

@asatwal asatwal left a comment

Choose a reason for hiding this comment

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

👍

@ericaporter ericaporter merged commit 188f74f into main Nov 28, 2023
7 checks passed
@ericaporter ericaporter deleted the update-entity-check-job branch November 28, 2023 10:42
@ericaporter ericaporter mentioned this pull request Nov 28, 2023
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