-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
chore: deprecate restricted metrics #8197
chore: deprecate restricted metrics #8197
Conversation
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.
Thanks @mistercrunch. I agree with this approach.
|
||
|
||
def upgrade(): | ||
op.drop_column("metrics", "is_restricted") |
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 think you need to use op.batch_alter_table
to satisfy SQLite.
An early community contribution added the concept of restricted metrics. The idea was to allow for some metrics to be restricted, and if a metric was tagged as such, a user would need to be given access to that metric more explicitely, through a special perm we would maintain for that metric. Now since the new concept of "Adhoc Metrics", the popover that lets a user pick a column and an aggregate function or to write their own SQL expression inline, this restriction is completely bypassed. Adhoc metrics was developed without the restricted metrics in mind. Anyhow, in the near future, we'll be rethinking the ideas behind data-access permissions, and things like column-level or row-level security will be redesigned from scratch. By deprecating this feature, we're removing a confusing and mostly broken feature, and making it easy to move forward
eae1947
to
ff5be2e
Compare
@@ -10,7 +10,7 @@ | |||
"scripts": { | |||
"tdd": "jest --watch", | |||
"test": "jest", | |||
"cover": "jest --maxWorkers=8 --coverage", | |||
"cover": "jest --coverage", |
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.
unrelated to this PR, but this seems to help quite a bit with broken JS builds. For reference, not specifying maxWorkers
will lead to use all CPUs cores on the box minus one
Codecov Report
@@ Coverage Diff @@
## master #8197 +/- ##
==========================================
+ Coverage 66.16% 66.17% +<.01%
==========================================
Files 479 479
Lines 22920 22897 -23
Branches 2524 2524
==========================================
- Hits 15164 15151 -13
+ Misses 7622 7612 -10
Partials 134 134
Continue to review full report at Codecov.
|
An early community contribution added the concept of restricted metrics.
The idea was to allow for some metrics to be restricted, and if a metric
was tagged as such, a user would need to be given access to that metric
more explicitely, through a special perm we would maintain for that
metric.
Now since the new concept of "Adhoc Metrics", the popover that lets a
user pick a column and an aggregate function or to write their own SQL
expression inline, this restriction is completely bypassed. Adhoc
metrics was developed without the restricted metrics in mind.
Anyhow, in the near future, we'll be rethinking the ideas behind
data-access permissions, and things like column-level or row-level
security will be redesigned from scratch.
By deprecating this feature, we're removing a confusing and mostly broken
feature, and making it easy to move forward