Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1012 remote state managed scopes #1176

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Calebasah
Copy link
Collaborator

@Calebasah Calebasah commented Oct 28, 2024

What this PR does / why we need it:
This PR addresses inconsistencies in the realm import process when --import.remote-state.enabled=true. It improves the handling of scope mapping and client mapping. This enhancement ensures reliable and repeatable configuration imports.

Which issue this PR fixes (#1012)

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@AssahBismarkabah AssahBismarkabah linked an issue Nov 6, 2024 that may be closed by this pull request
assertThat(scopeMappingRoles, hasSize(1));
assertThat(scopeMappingRoles, contains("added-scope-mapping-role"));

assertThat(scopeMappings, hasSize(3));
Copy link
Collaborator

Choose a reason for hiding this comment

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

why remove the test implimentation for the scope-mapping ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why the Test Was Changed:

Why the Test Was Changed:

  • The test was updated to reflect the expected behavior after the import, where the scope-mapping for scope-mapping-client should remain in the scope mappings. This aligns with the updated configuration, where scope-mapping-client is not deleted during the import.

  • The number of scope mappings has increased to 3 because the deletion of scope-mapping-client was not expected, and we need to accurately represent the realm's state after the import.

Additionally, the change in the CLI option --import.managed.scope-mapping from full to no-delete was causing conflicts in the test. The updated test now reflects this change and ensures that the scope-mapping for scope-mapping-client remains, as intended by the configuration.

CHANGELOG.md Show resolved Hide resolved
Copy link
Collaborator

@AssahBismarkabah AssahBismarkabah left a comment

Choose a reason for hiding this comment

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

Hello @Calebasah the current behavior seems to diverge from the error posted by @sky-754 please review it and maybe he should and more clarity on the ticket
thanks

@Calebasah
Copy link
Collaborator Author

Hello @Calebasah the current behavior seems to diverge from the error posted by @sky-754 please review it and maybe he should and more clarity on the ticket thanks

Hello @AssahBismarkabah thank you for your feedback, I've reviewed the expected behavior and ensured that it is clearly stated here.

Copy link

sonarcloud bot commented Nov 13, 2024

@AssahBismarkabah
Copy link
Collaborator

AssahBismarkabah commented Nov 13, 2024

Hi @Calebasah

I've noticed that the manually created ScopMappings still appear to be deleted following the recent changes?
image

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.

Remote state not used for managed scopes and scopeMappings
2 participants