-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
RBAC on unstable fails to load #5684
Comments
@cognifloyd Could this be related to the output schema changes that went in via: #5319 It's around the right time, as these tests were reliable before. And it looks like similar area of code. Wondering if the RBAC schema is incorrect as per the updates to the schema checking? Do we need to define the schemas that are defined in code, e.g. st2/st2common/st2common/models/api/rbac.py Line 116 in 8726092
Or the problem migth be that the schema has a default of [] on the permission_types, and the code for setting defaults doesn't cope with setting that? |
@amanda11 wow. So, it looks like this bug was present before, BUT by fixing a different bug, I uncovered this bug. Looks like:
Before, it was only applying defaults to each of the items schema properties if, and only if, the property's schema included I think I see what the fix requires, hopefully I can submit a PR to add tests for that scenario and fix that today or tomorrow. |
OK. I think the best way to fix this is to merge these two assign_default_values implementations:
I've spent a lot of time revising the pack config loader and ensuring it can handle many different schema types in #5225 and #5321, so I'd like to move that implementation from |
It looks like the schema handling in
So, I'm refactoring |
This test is a reproducer for #5684
Cool. I have a reproducer test that fails on master and passes with my changes. Now pushing the commits one at a time to show the progression in CI. |
* stub changelog entry * add tests for nested json schema handling This test is a reproducer for #5684 * separate schema defaults assignments logic for array vs object * add changelog entry
SUMMARY
Provide a quick summary of your bug report.
STACKSTORM VERSION
Paste the output of
st2 --version
:OS, environment, install method
Ansible CI/CD has been failing for 3 days on the smoke tests at the RBAC apply defintions
Steps to reproduce the problem
Perform a ansible install with environment -e st2_rbac_enable=True. At the point it loads the rbac definition file with the smoke test resource it fails.
Think this is probably true for any RBAC on unstable.
Expected Results
Load should complete.
Actual Results
The ansible script fails on the rbac. Reproducing this on a clean VM and running the ansible install then we see error:
There is only one role defined, and it looks good:
The text was updated successfully, but these errors were encountered: