fix: adding a -- separator for spi options#40005
Conversation
cc9ccb0 to
10c501a
Compare
|
@vmuzikar are you ok with this being a breaking change from the perspective of users who are relying on auto-builds with -provider, -provider-default, -enabled? If so I can add a note for that. And / or do you want a warning for now for the possibly ambiguous cases? |
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.webauthn.account.WebAuthnSigningInTest#checkAuthenticatorTimeLocaleKeycloak CI - WebAuthn IT (chrome) |
vmuzikar
left a comment
There was a problem hiding this comment.
are you ok with this being a breaking change from the perspective of users who are relying on auto-builds with -provider, -provider-default, -enabled? If so I can add a note for that.
Yes, please add a note to the upgrading guide about that. Maybe with some reasoning about it.
And / or do you want a warning for now for the possibly ambiguous cases?
You mean to the docs? Definitely yes. I know you've done some updates to the docs but IMHO we need to be much more explicit. Basically to explain the difference between the two forms and the auto build behaviour. It might very easily get confusing to the users.
Additionally, I think we should update all docs occurences to the -- format.
|
Updated with a warning when changed the docs to use the new format. There's still a reference to spi-authentication-sessions-map-auth-sessions-limit (now spi-authentication-sessions--map--auth-sessions-limit) that should be removed correct? |
|
Also updated to internally map to the new spi form - this also highlighted that the PropertyMapper logic needs to maintain an additional mapping to the legacy form. |
bd4744e to
ae2a768
Compare
docs/documentation/upgrading/topics/changes/changes-26_3_0.adoc
Outdated
Show resolved
Hide resolved
docs/documentation/upgrading/topics/changes/changes-26_3_0.adoc
Outdated
Show resolved
Hide resolved
docs/documentation/upgrading/topics/changes/changes-26_3_0.adoc
Outdated
Show resolved
Hide resolved
docs/documentation/upgrading/topics/changes/changes-26_3_0.adoc
Outdated
Show resolved
Hide resolved
...untime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/PropertyMappers.java
Outdated
Show resolved
Hide resolved
Thank you for the review. Applied the suggestions. |
docs/documentation/upgrading/topics/changes/changes-26_3_0.adoc
Outdated
Show resolved
Hide resolved
|
I plan to give this a quick look later today. |
vmuzikar
left a comment
There was a problem hiding this comment.
@shawkins Sorry for the late review and thank you for the changes!
Overall LGTM but might be good to add some tests for checking the selected SPI options are correctly treated as buildtime.
Additionally, I wonder if we should have a test for the env var form, if __ works as expected.
|
Can you also please rebase? |
We already had a test or two along those lines (see StartCommandDistTest.errorSpiBuildtimeAtRuntime for example), and the arquilian logic relies on implicit rebuilds due to provider option changes.
I can certainly add something. The replacement logic in KcEnvConfigSource is now quite straight-forward all _ in a non-wildcard key will become -, so there's nothing special about this case. |
Signed-off-by: Steven Hawkins <shawkins@redhat.com>
But we don't cover all the SPI build time options (i.e.
Yeah, it'd be good to have something to make sure that e.g. Quarkus doesn't messes that up somewhere. |
I'll add something after lunch.
Quarkus? These entries are only handled by Keycloak logic. |
Yeah, but I meant some too smart interceptors maybe. Still I'd feel safer with some tests. :) |
Signed-off-by: Steve Hawkins <shawkins@redhat.com>
See if the the additional changes are sufficient. |
* fix: adding a -- separator for spi options closes: keycloak#39063 Signed-off-by: Steve Hawkins <shawkins@redhat.com> * adding a warning for ambiguous spi options also adding a note about the change Signed-off-by: Steve Hawkins <shawkins@redhat.com> # Conflicts: # docs/documentation/upgrading/topics/changes/changes-26_3_0.adoc * updating docs to the new format Signed-off-by: Steve Hawkins <shawkins@redhat.com> # Conflicts: # docs/guides/high-availability/examples/generated/keycloak-ispn.yaml # docs/guides/high-availability/examples/generated/keycloak.yaml * internally using the new spi options also adding a deprecation notice Signed-off-by: Steve Hawkins <shawkins@redhat.com> * Apply suggestions from code review Co-authored-by: Martin Bartoš <mabartos@redhat.com> Signed-off-by: Steven Hawkins <shawkins@redhat.com> * correcting options output adding + + inlining where needed Signed-off-by: Steve Hawkins <shawkins@redhat.com> * adding test showing the env mapping with __ Signed-off-by: Steve Hawkins <shawkins@redhat.com> --------- Signed-off-by: Steve Hawkins <shawkins@redhat.com> Signed-off-by: Steven Hawkins <shawkins@redhat.com> Co-authored-by: Martin Bartoš <mabartos@redhat.com> Signed-off-by: Robin Meese <39960884+robson90@users.noreply.github.com>
|
@shawkins Hi, I noticed you have changed MicroProfileScope.getPropertyNames() to filter keys using double-dash-separator only. That means it is a breaking change if you rely on getPropertyNames() and still using single-dash options. Am I right? As getPropertyNames() is now deprecated I guess I should move away from using that function anyway. I just wanted to make sure your change was intentional. |
The change was intentional, as was marking it as deprecated. Yes you should not rely on this function. |
closes: #39063