Skip to content

Fix role propagation error due to missing grantor dependencies#8589

Merged
ihalatci merged 1 commit into
mainfrom
fix-role-propagation-grantor
May 15, 2026
Merged

Fix role propagation error due to missing grantor dependencies#8589
ihalatci merged 1 commit into
mainfrom
fix-role-propagation-grantor

Conversation

@ihalatci
Copy link
Copy Markdown
Contributor

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

Note: this is a clean re-application of #8466 onto current main (replacing that PR, which had accumulated unrelated merge commits). The change has already been backported and merged into release-14.0 (#8568), release-13.2 (#8579), and release-12.1 (#8569).

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
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.75%. Comparing base (cc92f23) to head (6b46c7d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8589   +/-   ##
=======================================
  Coverage   88.74%   88.75%           
=======================================
  Files         288      288           
  Lines       64254    64268   +14     
  Branches     8085     8086    +1     
=======================================
+ Hits        57021    57039   +18     
+ Misses       4894     4892    -2     
+ Partials     2339     2337    -2     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@onurctirtir onurctirtir self-requested a review May 15, 2026 14:17
@ihalatci ihalatci merged commit 2305b87 into main May 15, 2026
159 checks passed
@ihalatci ihalatci deleted the fix-role-propagation-grantor branch May 15, 2026 18:01
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.

Role propagation error due to interdependent roles while adding new nodes

2 participants