-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
fix: Making the database/cluster read-only #10823
fix: Making the database/cluster read-only #10823
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10823 +/- ##
==========================================
- Coverage 65.43% 61.21% -4.22%
==========================================
Files 803 803
Lines 37930 37935 +5
Branches 3561 3561
==========================================
- Hits 24818 23223 -1595
- Misses 13008 14526 +1518
- Partials 104 186 +82
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
368babf
to
b00acd8
Compare
related: #10731, I could add this logic into my PR We're looking to deprecate the CRUD for tables soon-ish. |
@@ -160,7 +160,7 @@ class TableColumnInlineView( # pylint: disable=too-many-ancestors | |||
add_form_extra_fields = { | |||
"table": QuerySelectField( | |||
"Table", | |||
query_factory=lambda: db.session().query(models.SqlaTable), | |||
query_factory=lambda: db.session.query(models.SqlaTable), |
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.
nice catch!
"cluster": QuerySelectField( | ||
"Cluster", | ||
query_factory=lambda: db.session.query(models.DruidCluster), | ||
widget=Select2Widget(extra_classes="readonly"), |
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'll make a patch release for FAB to make the readonly
work again
dpgaspar/Flask-AppBuilder#1467
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.
LGTM 👍
Co-authored-by: John Bodley <john.bodley@airbnb.com> (cherry picked from commit a3e2e65)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
SUMMARY
This PR makes a few related consistency updates to ensure that the database/cluster et al. is read-only either in the FAB CRUD or React data editor. Note one could reason that you could potential make the schema, table, etc. read-only, though my sense is that is that could be somewhat controversial.
Specially this PR:
@dpgaspar I noticed that there seems to have been a regression in FAB and the read-only selector logic which we are using (per the documentation) no longer works. I've also verified this using the FAB examples and was wondering whether you could look into it?
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE
AFTER
TEST PLAN
Tested locally.
ADDITIONAL INFORMATION