Skip to content

Conversation

@shawkins
Copy link
Contributor

@shawkins shawkins commented Dec 19, 2025

also outputting all commands for help files

closes #44975

also outputting all commands for help files

closes keycloak#44975

Signed-off-by: Steve Hawkins <[email protected]>
@shawkins shawkins marked this pull request as ready for review December 19, 2025 18:48
@shawkins shawkins requested review from a team as code owners December 19, 2025 18:48
@shawkins
Copy link
Contributor Author

@Pepo48 this reestablishes the replacement logic, but I see that more is still needed to enable the tests on windows.

@shawkins shawkins requested review from Pepo48 and vmuzikar December 19, 2025 18:49

import static org.keycloak.quarkus.runtime.cli.command.AbstractAutoBuildCommand.OPTIMIZED_BUILD_OPTION_LONG;

@WithEnvVars({"KEYCLOAK_ALL_COMMANDS", "true"})
Copy link
Contributor

Choose a reason for hiding this comment

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

With this approach, we won't know the hiding of the OS-specific cocmmands actually works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I meant to add a Linux specific test showing that these commands won't work there.

The main thought here is that we don't need helpcommanddisttest to be OS dependent.

I'd also be fine to extend this approach to a way to set the OS for picocli, rather than just relying upon the Environment method.

@Pepo48
Copy link
Contributor

Pepo48 commented Dec 19, 2025

@Pepo48 this reestablishes the replacement logic, but I see that more is still needed to enable the tests on windows.

@shawkins correct, as I mentioned in the Windows service PR, this issue most likely has nothing to do with the changes introduced by the service feature. If the test had been enabled, it probably would have failed a long time ago. It’s a tricky one, because I couldn’t reproduce it locally. The raw GitHub logs show just a single trailing space (you can try searching the logs for "Usage: "), and I can’t directly download the received .txt files to check whether there’s anything more.

I tried to implement a scrubber using various regexes, but again - what worked locally didn’t work in CI. Therefore, I suspect there must be something else at play, possibly an environmental difference or a Picocli discrepancy.

As a result, simply adding the tag did not resolve the issue for me either, and it requires deeper analysis.

I’m now wondering whether someone noticed this a long time ago and whether this was the actual reason the tests were never enabled on Windows runners. 😄.

@shawkins shawkins marked this pull request as draft December 21, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tools commands accepts any arguments

3 participants