Fix OpenAPI spec key reordering on incremental builds#48371
Fix OpenAPI spec key reordering on incremental builds#48371Pepo48 wants to merge 3 commits intokeycloak:mainfrom
Conversation
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.forms.RPInitiatedFrontChannelLogoutTest#testFrontChannelLogoutWithoutSessionRequiredKeycloak CI - Forms IT (firefox) |
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.forms.RPInitiatedFrontChannelLogoutTest#testFrontChannelLogoutWithoutSessionRequiredKeycloak CI - Forms IT (firefox) |
|
Seems the test failures might be related? |
|
@vmuzikar yes, they are, after the change the spec wasn't on the classpath when Let me provide the other workaround using maven-clean-plugin I mentioned in the description, until this gets merged: smallrye/smallrye-open-api#2544 Edit: the smallrye-open-api issue has been already merged, so we need to wait for the release to consume it. Edit2: it will be part of 4.3.1 release. |
Closes: keycloak#48366 Signed-off-by: Peter Zaoral <[email protected]>
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.forms.RPInitiatedFrontChannelLogoutTest#testFrontChannelLogoutWithoutSessionRequiredKeycloak CI - Forms IT (firefox) org.keycloak.testsuite.model.singleUseObject.SingleUseObjectModelTest#testClusterKeycloak CI - Store Model Tests org.keycloak.testsuite.model.user.UserModelTest#testAddRemoveUserConcurrentKeycloak CI - Store Model Tests |
Closes: keycloak#48366 Signed-off-by: Peter Zaoral <[email protected]>
|
@vmuzikar jfyi 4.3.1 was already released 😊. I dug a bit deeper as I knew that using What it means for us, we don't need a workaround and we don't even need the now exposed property. All we need is the bump to freshly released version. To have I pushed the version bump to the PR as a separate commit to see whether it breaks something else in the CI but during my local testing I couldn't reproduce any of the CLI failures/reordering issues. |
Closes: keycloak#48366 Signed-off-by: Peter Zaoral <[email protected]>
| description: Bearer token authentication using a Keycloak access token | ||
| tags: | ||
| - name: Clients (v2) | ||
| x-smallrye-profile-admin: "" |
There was a problem hiding this comment.
@Pepo48 does this mean we need to update our usage of these annotations @Extension(name = KeycloakOpenAPI.Profiles.ADMIN, value = "") - for whatever reason the value is null in all of them, and it looks now that will simply get omitted.
There was a problem hiding this comment.
@shawkins tl;dr I don't think that annotations need any updating at this point.
My understanding of the change in smallrye-open-api/pull/2490 is prior to the PR, the tag copy leaked into the output as (most likely harmless) x-smallrye-profile-admin: "" and in 4.3.1 the new ExtensionRemovalFilter strips it.
The question rather is, do we even need these annotations? For v2 we have no scanProfiles, so they never had any effect, right? I already tried earlier today to just remove @Extension(name = KeycloakOpenAPI.Profiles.ADMIN, value = "") from ClientsApi.java and nothing happened after the rebuild, the spec was identical. But I didn't want to touch this part unnecessarily as I am not that familiar in this area, so I may be missing something that is evident (my only goal was to get rid of the annoying spec drifts 😊).
There was a problem hiding this comment.
The question rather is, do we even need these annotations? For v2 we have no scanProfiles, so they never had any effect, right?
My answer to both is I don't know, so I wanted to check before something was removed.
With #25259 it seems like they were used to just trigger the openapi inclusion, not that anyone was looking for the custom value.
Closes: #48366
Incremental builds and test runs (via
-am) only reach the test phase, which is beforeprepare-package, so no stale META-INF copy exists on the classpath. The only edge case ismvnpackage/installwithoutcleanfollowed by an incremental build - we could solve it fully by adding amaven-clean-pluginexecution to remove staleMETA-INF/openapi.*before generation, but I am not sure whether we want/need to do so. I guess it's not a practical concern since these commands are typically run withclean.So this small change should be sufficient for all the more standard scenarios.