Skip to content

CEQ -12669#1792

Merged
avano merged 1 commit intotnb-software:mainfrom
bhavani111:CEQ-12669
Mar 11, 2026
Merged

CEQ -12669#1792
avano merged 1 commit intotnb-software:mainfrom
bhavani111:CEQ-12669

Conversation

@bhavani111
Copy link

@bhavani111 bhavani111 commented Feb 27, 2026

Comment on lines +56 to +62
if (QuarkusConfiguration.isQuarkusNative()) {
if (OpenshiftConfiguration.isOpenshift()) {
QuarkusConfiguration.setProperty("quarkus.native.container-runtime-options", "--platform=linux/amd64");
} else {
QuarkusConfiguration.setProperty("quarkus.native.container-build", "false");
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

make the changes directly in the buildApp method - as they belong to building the application. there is a properties map already that contains the properties passed to the build

Copy link
Contributor

Choose a reason for hiding this comment

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

And also i'm missing some macOS environment check?

Copy link
Author

Choose a reason for hiding this comment

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

yes, Sorry added it , i will push the latest changes, I thought macos check is not needed since it worked in linux without these properties quarkus.native.container-build ,quarkus.native.container-runtime-options

Copy link
Contributor

Choose a reason for hiding this comment

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

I would ideally not set it for anything else then macOS. We wan't to test with the defaults.

@bhavani111 bhavani111 marked this pull request as draft March 6, 2026 15:54
@bhavani111 bhavani111 force-pushed the CEQ-12669 branch 5 times, most recently from bc8a7c1 to ea190ef Compare March 8, 2026 13:52
@tnb-bot
Copy link
Contributor

tnb-bot bot commented Mar 8, 2026

Dependency changes

No diff

@bhavani111 bhavani111 marked this pull request as ready for review March 8, 2026 13:59
@Override
public void start() {
logCounter++;
getProperties();
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe setOpenshiftProperties(properties) taking parameter would be more readable?

Copy link
Author

Choose a reason for hiding this comment

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

yes, changed it , thank you

boolean isLocal = !OpenshiftConfiguration.isOpenshift();
this.properties.put("quarkus.native.container-build", (isMac && isLocal) ? "false" : "true");
if (!isLocal) {
this.properties.put("quarkus.native.container-runtime-options", "--platform=linux/amd64");
Copy link
Contributor

Choose a reason for hiding this comment

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

This probably wouldn't need to be here and could be moved to OpenshiftQuarkusApp and then you wouldn't need the check? Or do we want to keep it together here to keep the context @avano ?

Also it should be set only for macOS, if am not mistaken.

Copy link
Contributor

Choose a reason for hiding this comment

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

yes it is a good idea to move it to openshift quarkus app properties.

it should not matter what is the platform that runs the test, the target platform should always be linux/amd64

Copy link
Contributor

Choose a reason for hiding this comment

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

@avano I know, but i would rather vote for testing with "defaults".

Copy link
Contributor

Choose a reason for hiding this comment

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

ok then we can add it only for mac

@bhavani111 bhavani111 force-pushed the CEQ-12669 branch 3 times, most recently from cdb72a3 to 71c338f Compare March 10, 2026 15:04
"quarkus.openshift.service-account", getName()));
boolean isMac = System.getProperty("os.name").toLowerCase().contains("mac");
boolean isLocal = !OpenshiftConfiguration.isOpenshift();
this.properties.put("quarkus.native.container-build", (isMac && isLocal) ? "false" : "true");
Copy link
Contributor

Choose a reason for hiding this comment

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

@bhavani111 This should have been set in the QuarkusApp, that is shared for both Standalone and Kubernetes, isn't it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also you are in OpenshiftQuarkusApp, thus you don't need to check isLocal anymore, as you know you are not local.

@bhavani111 bhavani111 marked this pull request as draft March 10, 2026 15:55
@bhavani111 bhavani111 force-pushed the CEQ-12669 branch 3 times, most recently from b32d4b1 to 5db5706 Compare March 10, 2026 16:34
@bhavani111 bhavani111 marked this pull request as ready for review March 10, 2026 16:38
@avano avano requested a review from llowinge March 10, 2026 16:41
@avano avano merged commit 0a5b26a into tnb-software:main Mar 11, 2026
3 checks passed
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.

3 participants