Skip to content

MNTOR-4499: subscriber id foreign key cascade for feature_flag_events #5886

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mansaj
Copy link
Collaborator

@mansaj mansaj commented May 16, 2025

References:

Jira: MNTOR-4499

Description

Add cascade update/del for feature_flag_events fk

Checklist (Definition of Done)

  • Localization strings (if needed) have been added.
  • Commits in this PR are minimal and have descriptive commit messages.
  • I've added or updated the relevant sections in readme and/or code comments
  • Product Owner accepted the User Story (demo of functionality completed) or waived the privilege.
  • All acceptance criteria are met.
  • Jira ticket has been updated (if needed) to match changes made during the development process.
  • Jira ticket has been updated (if needed) with suggestions for QA when this PR is deployed to stage.

@mansaj mansaj requested review from Vinnl and rhelmer May 16, 2025 20:10
Copy link

Copy link
Collaborator

@Vinnl Vinnl left a comment

Choose a reason for hiding this comment

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

Since feature flags were only added recently, accounts responsible for feature flag events should always have an FxA ID.

However, since we had to import legacy unauditable feature flags, and because I wanted the author of an event to be a required column, I set the author of the legacy events to the first subscriber with an @mozilla email address. (I see now that I did not explicitly call that out in the PR, which I should've done - sorry about that.)

So what we'll probably want to do instead of adding a cascade delete, is change those to someone with an FxA ID, and then we can delete the other one without breaking any foreign keys.

@Vinnl
Copy link
Collaborator

Vinnl commented May 20, 2025

Closing this, since I'm fairly sure we don't want to delete audit events. There are two other PRs option with other options, with this one I think being preferred: #5905

@rhelmer rhelmer removed their request for review May 20, 2025 23:19
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