Skip to content

Support include_roles and include_users input to backup.create - #2133

Merged
g-despot merged 5 commits into
mainfrom
backups/support-include-roles-and-users
Oct 8, 2026
Merged

g-despot merged 5 commits into
mainfrom
backups/support-include-roles-and-users

Conversation

@tsmith023

Copy link
Copy Markdown
Member

No description provided.

@orca-security-eu orca-security-eu Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 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
g-despot marked this pull request as ready for review October 8, 2026 13:35
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.98%. Comparing base (95b5d76) to head (74eed97).
⚠️ Report is 188 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@g-despot
g-despot merged commit 79a9948 into main Oct 8, 2026
128 checks passed
@g-despot
g-despot deleted the backups/support-include-roles-and-users branch October 8, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants