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

feat(ddm): Add custom_metrics_access organization flag #66953

Merged
merged 2 commits into from Mar 15, 2024

Conversation

iambriccardo
Copy link
Member

@iambriccardo iambriccardo commented Mar 14, 2024

This PR adds a new organization flag called sentry:custom_metrics_access which will be used internally by getsentry to enable certain feature flags needed by custom metrics.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 14, 2024
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/0676_add_custom_metrics_access_flag.py ()

--
-- Alter field flags on organization
--
-- (no-op)

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.32%. Comparing base (e9d1973) to head (8054d8c).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #66953   +/-   ##
=======================================
  Coverage   84.31%   84.32%           
=======================================
  Files        5309     5309           
  Lines      237399   237405    +6     
  Branches    41058    41060    +2     
=======================================
+ Hits       200172   200185   +13     
+ Misses      37009    37002    -7     
  Partials      218      218           
Files Coverage Δ
src/sentry/api/endpoints/organization_details.py 91.58% <100.00%> (+0.06%) ⬆️

... and 8 files with indirect coverage changes

@@ -431,6 +432,10 @@ def save(self):
org.flags.codecov_access = data["codecovAccess"]
if "require2FA" in data:
org.flags.require_2fa = data["require2FA"]
# This option is temporary since we will control custom metrics via a single feature flag in the future. This
Copy link
Member Author

Choose a reason for hiding this comment

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

Right now, to enable custom metrics you have to activate:

"organizations:custom-metrics"
"organizations:ddm-ui"
"organizations:metrics-blocking"
"organizations:use-metrics-layer-in-alerts"

The role of this organization option is that it will be read by getsentry and it will enable all of those flags automatically in case the option was set to true. On self-hosted this org option will not be needed and rather the aforementioned flags will have to be activated manually.

@iambriccardo iambriccardo merged commit be42753 into master Mar 15, 2024
50 checks passed
@iambriccardo iambriccardo deleted the riccardo/feat/add-org-flag branch March 15, 2024 07:41
@github-actions github-actions bot locked and limited conversation to collaborators Mar 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants