Skip to content

[BAU] Check feature flag before sending custom version events#3061

Open
jebw wants to merge 1 commit into
mainfrom
bau-version-custom-events-honour-feature-flag
Open

[BAU] Check feature flag before sending custom version events#3061
jebw wants to merge 1 commit into
mainfrom
bau-version-custom-events-honour-feature-flag

Conversation

@jebw
Copy link
Copy Markdown
Collaborator

@jebw jebw commented Nov 27, 2025

Context

Ticket: BAU

Currently we're trying to send custom events when versions are created even if the feature flag is off for dfe analytics

Changes proposed in this pull request

  1. Check feature flag before sending event

@jebw jebw requested a review from a team as a code owner November 27, 2025 16:01
queue_as :low_priority

def perform(user_name, data)
return unless dfe_analytics_enabled?
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've done this check within the Job but I can see an argument for doing it in the module and never creating the job? Thoughts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yeah - may be better done in the module:
base.after_commit :send_to_dfe_analytics, on: :create, if: -> { Feature.dfe_analytics_enabled? }

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

@jebw jebw force-pushed the bau-version-custom-events-honour-feature-flag branch from bc40196 to 66bc849 Compare January 28, 2026 10:41
@sonarqubecloud
Copy link
Copy Markdown

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