Repository navigation
Support include_roles and include_users input to backup.create - #2133
Merged
Merged
Conversation
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
Since 1.39.9 the server treats an omitted includeRoles as "back up all roles" and an empty list as "skip the RBAC snapshot". Mapping None to [] made every default backup.create() drop roles and users while reporting SUCCESS. The keys are now set only when the argument is given, a str becomes a one-item list, and a list is sent as is. The restore payload no longer carries fields the server does not define, and the shared validation helper is back to what main has. A 1.40.0 version gate mirrors the incremental one. Adds a mock test for the default body and the gate, and a 1.40-gated integration test that include_roles=["A"] restores A and not B.
The integration test only exercised the explicit-list path, which was never broken, and it skips on every CI server until the matrix gains a 1.40 entry. The mock test now also checks that a str and a list land in the body as includeRoles and includeUsers against a 1.40 mock.
Send includeRoles/includeUsers only when set, gate on 1.40, add tests
g-despot
marked this pull request as ready for review
October 8, 2026 13:35
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2133 +/- ##
==========================================
+ Coverage 86.64% 88.98% +2.34%
==========================================
Files 300 308 +8
Lines 23172 24396 +1224
==========================================
+ Hits 20077 21709 +1632
+ Misses 3095 2687 -408 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.