-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Bump FAB to 2.0.0 #7323
Merged
Merged
Bump FAB to 2.0.0 #7323
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
bb96a8d
Bump FAB to 2.0.0
dpgaspar c9c2dd0
[tests] whitelist SecurityApi login and refresh endpoints
dpgaspar 21fa309
[style] Fix, C812 missing trailing commas
dpgaspar e2eec2f
[security] Remove SUPERSET_UPDATE_PERMS flag
dpgaspar 19aa5e2
[docs] New, FAB_UPDATE_PERMS and flask fab cli
dpgaspar b39a0d6
Merge branch 'master' into fab_2.0.0
dpgaspar 87523c4
[docs] Fix, db upgrade needs to come first, create-admin needs a db
dpgaspar 6b34e12
[cli] New, superset init bootstraps all permissions for FAB and Superset
dpgaspar e0c0d3e
[style] Fix, flakes
dpgaspar 5885884
Merge branch 'master' into fab_2.0.0
dpgaspar 4b37cac
Merge branch 'master' into fab_2.0.0
mistercrunch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 we should make this
False
now, and assume people will have to runsuperset init
once per deployThere 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 now we need to call
appbuilder.add_permissions(update_perms=True)
fromsuperset.cli.init
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.
FAB defaults to
True
onupdate_perms
, so that we get the same behavior.My reasoning is that the present change will create all permissions on start just like before.
If we want to disable the permission creation (avoid contention on the db on startup),
FAB_UPDATE_PERMS=False and run
superset init
once per deploy.I would say that
appbuilder.add_permissions(update_perms=True)
can be achieved by calling the newflask fab create-permissions
. I noticed thatsuperset db upgrade
creates and upgrades the db, leaving it already with bootstrap permissions andsuperset init
created Superset's extra roles even withFAB_UPDATE_PERMS=False
(so all is good).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.
Ok, let's add another note in
UPDATE.md
aboutFAB_UPDATE_PERMS = False
being the new equivalent to the envvarSUPERSET_UPDATE_PERMS=0
.I think it'd be good to call
appbuilder.add_permissions(update_perms=True)
withinsuperset init
, so that we people don't have to alsoflask fab create-permissions
at every deploy. I don't think usingcreate-permissions
is documented anywhere on our side. I think it's easier to makesuperset init
do more instead of documenting usingflask fab
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.
Makes sense, new commit.