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

Support multivalue in component config #825

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ChrisHubinger
Copy link
Contributor

@ChrisHubinger ChrisHubinger commented Mar 17, 2023

Refactored Component to allow the usage of multivalued configuration settings.

Changed:
func (component *component) getConfig(val string) string => func (component *component) getConfig(val string) []string

Created new:
func (component *component) getConfigFirstOrDefault(val string) string

as replacement for original getConfig fixed all usage thoughout the code.

Implementation Note:
Keycloak API does not preserver order for config values on it's own. Therefore the config value arrays are sorted using code, preventing creation of no-op changesets due to ordering changes between runs.

Just a gues, but look exactly like those issues about attributes/values order:

keycloak/keycloak#9712
keycloak/keycloak#9794

ChrisHubinger and others added 6 commits November 4, 2022 13:30
* FEAT: Allow multivalue for Config attibutes
* Documentation for multivalue behaviour
Added Component.getConfigFirstOrDefault to behave like
the old getConfig implementation returning first item or
empty string
@ChrisHubinger ChrisHubinger marked this pull request as ready for review March 21, 2023 18:22
@ChrisHubinger
Copy link
Contributor Author

I tested it locally and everything seems to work as expected/described. No Idea why the test for Keycloak 19 failes. The error seems to be completely unrelated. On my first commit it was version 18 that failed a bit strange...

@ChrisHubinger ChrisHubinger changed the title WIP: Support multivalue in component config Support multivalue in component config Apr 25, 2023
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.

None yet

1 participant