-
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
feat(RLS): RESTful apis and react view for RLS #22325
Conversation
All new files need the Apache license boilerplate at the top. I added it (via a code suggestion) to a couple so you can copy/paste from there. |
…e and update rules
Codecov Report
@@ Coverage Diff @@
## master #22325 +/- ##
==========================================
+ Coverage 66.91% 66.93% +0.01%
==========================================
Files 1851 1861 +10
Lines 70715 71131 +416
Branches 7766 7797 +31
==========================================
+ Hits 47320 47610 +290
- Misses 21373 21485 +112
- Partials 2022 2036 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -188,3 +188,14 @@ def delete(cls, model: Model, commit: bool = True) -> Model: | |||
db.session.rollback() | |||
raise DAODeleteFailedError(exception=ex) from ex | |||
return model | |||
|
|||
@classmethod | |||
def bulk_delete(cls, models: List[Model], commit: bool = True) -> None: |
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 on base class, so other apis can reuse it.
Hi @mayurnewase! This discussion is in progress and your opinion and feedback is important there! |
Hey @mayurnewase! If you see my #22230 PR is merged. Can you prepare a PR for migrating RLS page to |
Hi @mayurnewase. Can you review #22775 (Move RLS to src/pages folder)? |
yeah, I would consider this a breaking change, because it changes the name of a config. I noticed the comment in "Breaking changes" in UPDATING.MD as well, which we should reserve only for major versions. I think we're going to run into issues in the 2.1.0 release for our users. Can we try adding a new config, and reading either flag for now in order to make this backward compatible, and then remove the old config in 3.0? Changing permission names is also considered a breaking change. I don't have any suggestions as to how to fix that in this PR other than going back to the old permission names. |
We didn't talk about removing views in the semantic versioning SIP but in the future, we may want to consider that as an additional override/extension point to the application and only remove views in major version bumps. Actually, on further consideration, removing a view removes an api endpoint, so it would be covered there. |
This reverts commit 159dcd7.
@mayurnewase Because of these breaking changes to semantic versioning, I'd like to propose that we revert this PR and bring it back into master for 3.0. I expect that it will break a few Superset users' workflows when they try to upgrade to the next minor release, which we're trying to avoid. |
@eschutho When are we planning the 3.0 release? in 2024? |
@michael-s-molina has a better idea of that timeline than I do. |
Hi @EugeneTorap. We're currently discussing the 3.0 date and our LTS support guidelines. We'll announce the official date to the community pretty soon but the current thinking (which may change) is April/2023. |
so no major features can be pushed to master if a major release isn't planned? |
Oh no, you can push major features any time, just not with any of the breaking changes as outlined in the semantic versioning SIP to follow convention. And if there are any, most breaking changes in new features can be made to be backward compatible with just a few adjustments. Those suggestions are also in the sip. |
@eschutho Maybe it's better to add a feature flag for the new breaking changes of RLS instead of reverting the PR? |
This reverts commit 159dcd7.
created PR to revert, although if it breaks any action in CI I will need some time to get back on it, so feel free to push in my branch if its urgent. |
Thank you @mayurnewase. If you want to put up a new pr, I would suggest a few things to make it backward compatible:
I don't believe a feature flag specifically would work in this case, but I've outlined some other options. |
This reverts commit 159dcd7.
…"" This reverts commit 6306803.
@mayurnewase Now that the window for breaking changes is open (until May 15th), would you like to submit these changes again and update its status on the Apache Superset 3.0 board? |
SUMMARY
Update RLS view to use React and REST apis.
this PR only migrates old view to new without any additional features like,
can add this in a separate PR.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
RLS_FILTER_RELATED_FIELDS
in the config.py as belowbirth
should be shown and roles dropdown should only show roles containing textAdmin
.ADDITIONAL INFORMATION