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

Fix inconsistency in kubernetes commands / arguments handling between jvm and native #27733

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

iocanel
Copy link
Contributor

@iocanel iocanel commented Sep 5, 2022

The pull request addresses the inconsitencies between jvm and native mode when it comes to command / arguments handling.

With this change the s2i builder image is no longer taken into consideration.
The command may still be generated if the user provides arguments without command.

Resolves: #24885

gsmet
gsmet previously requested changes Sep 5, 2022
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Spotted some typos in variable names. Use your IDE to fix them as I only suggested the first occurrence.

@gsmet gsmet changed the title Fix inconsitentcy in kubernetes commands / arguments handling between jvm and native Fix inconsistency in kubernetes commands / arguments handling between jvm and native Sep 5, 2022
@iocanel iocanel force-pushed the issue-24885-smart-args branch from 422b0a7 to 4c213c8 Compare September 5, 2022 16:46
@gsmet gsmet dismissed their stale review September 6, 2022 07:51

Addressed.

@gsmet gsmet requested a review from Sgitario September 6, 2022 07:51
Copy link
Contributor

@Sgitario Sgitario left a comment

Choose a reason for hiding this comment

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

Other necessary changes could be to remove the OpenshiftConfig.getEffectiveJvmArguments method which is confusing and does not add much value.
Also, we have this getEffectiveJvmArguments method in JIBConfig and S2IConfig because we had a default value for the jvmArguments, so had two properties jvmArguments and jvmAdditionalArguments. We should validate that this default value in jvmArguments and the jvmAdditionalArguments are respected after these changes.
Finally, I'm missing some tests to verify the actual change. As far I understand, before these changes, we only generated a command if we didn't know about the base image. Now, we're always generating the command if a custom jar path or the arguments are set by the user, regardless the base image we're using.
Another last note, this could be a breaking change that should be noted in the release notes.

@iocanel iocanel force-pushed the issue-24885-smart-args branch from 4c213c8 to 2642001 Compare September 12, 2022 06:23
Copy link
Contributor

@Sgitario Sgitario left a comment

Choose a reason for hiding this comment

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

The changes look good to me.
Moreover, I checked the reproducer in the linked issue and now the generated DeploymentConfig resource is the same for JVM and Native. So, the app should behave the same.

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.

quarkus.openshift.arguments fails on OCP + native mode
3 participants