Skip to content

Fixed idempotency in user_rolw_workflow_manager#32

Merged
madhansansel merged 1 commit into
mainfrom
private/vivekraj2000/CSCwu68660
Jun 24, 2026
Merged

Fixed idempotency in user_rolw_workflow_manager#32
madhansansel merged 1 commit into
mainfrom
private/vivekraj2000/CSCwu68660

Conversation

@vivekraj2000

@vivekraj2000 vivekraj2000 commented Jun 16, 2026

Copy link
Copy Markdown

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Description

In user_role_workflow_manager.py, idempotency was breaking during user_requires_update() because the module compared the desired role against the current role too literally.
The module resolves that role name to a role ID from get_roles_api. But Catalyst Center may return the existing user’s roleList
The fix normalizes both sides before comparing:
Resolve every desired role name to its role ID.
Normalize the current roleList by converting any role names returned by Catalyst Center back to role IDs.
Compare the resulting role ID sets instead of comparing only the first list item.

@madhansansel madhansansel merged commit 3be1821 into main Jun 24, 2026
14 checks passed
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.

2 participants