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

Add flags to prevent code running in envs where dfe-analytics isn't set up #130

Merged
merged 4 commits into from
Apr 22, 2024

Conversation

ericaporter
Copy link
Contributor

Events are being triggered on Register Sandbox env which isn't set up to send events to BigQuery. This is causing issues with lots of erroring jobs in Sentry, lots of emails, noise etc.

Adding in these flags should prevent events from sending in both the bulk upload and the entity table check job unless the env is set up.

@ericaporter ericaporter requested a review from asatwal April 12, 2024 12:02
@ericaporter ericaporter force-pushed the add-analytics-enabled-check branch from 4c5b24f to c805f9d Compare April 12, 2024 13:16
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.

Looks good. Just a few comments for you perusal

lib/dfe/analytics/services/entity_table_checks.rb Outdated Show resolved Hide resolved
lib/dfe/analytics/load_entity_batch.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.

Looks good - Just a few optional messages to the console would be informative I think when the import rake tasks are called but analytics disabled.

lib/dfe/analytics/tasks/import_entities.rake Show resolved Hide resolved
lib/dfe/analytics/tasks/import_entities.rake Show resolved Hide resolved
@ericaporter ericaporter merged commit 9d89664 into main Apr 22, 2024
7 checks passed
@ericaporter ericaporter deleted the add-analytics-enabled-check branch April 22, 2024 14:49
This was referenced Apr 22, 2024
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