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

Clean up insights data on environment deletion #3630

Merged
merged 3 commits into from
Jan 8, 2024

Conversation

bomoko
Copy link
Contributor

@bomoko bomoko commented Dec 21, 2023

Right now, when deleting an environment, there is nothing to clean up facts and problems that have been registered against that environment.

The really big problem here (beyond the fact that we're not cleaning up data) is with multiple PR/ephemeral environments, if they're running insights, there is potentially a lot of insights information that is not even of any historical value.

This PR adds two things

  1. Calls to queries that will clean up the appropriate facts and problems entries.
  2. Adds a migration to remove any existing data that should be removed from the DB.

General Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated
  • PR title is ready for inclusion in changelog

Database Migrations

  • If your PR contains a database migation, it MUST be the latest in date order alphabetically

Copy link
Member

@shreddedbacon shreddedbacon left a comment

Choose a reason for hiding this comment

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

Yep, this makes sense

@shreddedbacon shreddedbacon merged commit 92af324 into main Jan 8, 2024
1 check passed
@shreddedbacon shreddedbacon deleted the feature/cleanup_insights branch January 8, 2024 21:42
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.

None yet

2 participants