Backport #8466 to release-12.1: Fix role propagation error due to missing grantor dependencies#8569
Open
ihalatci wants to merge 1 commit into
Open
Backport #8466 to release-12.1: Fix role propagation error due to missing grantor dependencies#8569ihalatci wants to merge 1 commit into
ihalatci wants to merge 1 commit into
Conversation
DESCRIPTION: Add grantor role dependencies to fix node addition with interdependent roles Modified ExpandRolesToGroups in dependency.c to track grantor roles as dependencies alongside role memberships during node activation. This ensures grantors are propagated before roles that reference them in GRANT ... GRANTED BY statements. Added regression test covering the interdependent role scenario. Fixes #8425
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-12.1 #8569 +/- ##
================================================
- Coverage 89.65% 89.64% -0.02%
================================================
Files 276 276
Lines 59790 59804 +14
Branches 7471 7473 +2
================================================
+ Hits 53605 53611 +6
- Misses 4041 4047 +6
- Partials 2144 2146 +2 🚀 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.
Backport of #8466 to release-12.1.
DESCRIPTION: Add grantor role dependencies to fix node addition with interdependent roles
Modified
ExpandRolesToGroupsindependency.cto track grantor roles as dependencies alongside role memberships during node activation. This ensures grantors are propagated before roles that reference them inGRANT ... GRANTED BYstatements.Added regression test covering the interdependent role scenario.
Fixes #8425
12.1-specific notes
The cherry-pick required minor
expected/create_role_propagation.outadjustments:non_dist_role_1rows that were absent in 12.1's baseline.interdep_role1→postgres(on 12.1,GRANTED BYis not preserved when re-propagating to a re-added worker — a separate, pre-existing limitation). The fix's core behavior (master_add_nodeno longer fails with the missing-admin-option error) works correctly.Verification
check-multi): 183/183 ✅ghcr.io/citusdata/stylechecker:0.8.18-dev-85e972b, uncrustify 0.68.1): ✅