-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
feat: exclude archived features in max reporting #7559
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
this.db.raw( | ||
'feature_strategies, jsonb_array_elements(constraints) AS constraint_value', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this had to be rewritten to cross join after adding join to the feature table so that the syntax is correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably fine, but should we add a test or two to at least one of the queries to check that
- it doesn't count archived flags
- if you archive and then unarchive a flag, the newly unarchived flag starts to count towards these metrics again?
'features.name', | ||
'feature_strategies.feature_name', | ||
) | ||
.where('features.archived_at', null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder: if a feature is archived and then revived, is archived_at
set to null
again? I know we've run into issues with this before, but I think that archived_at might have been the solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this manually and reviving brings the feature back to the reported metrics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added one test to show archived feature exclusion.
About the changes
When reporting max values in prometheus metrics we want to exclude strategies that belong to archived features. It means we need to join with the features table in the queries.
Important files
Discussion points