-
Notifications
You must be signed in to change notification settings - Fork 8
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 launch toggle for Native Image Java applications #259
Fix launch toggle for Native Image Java applications #259
Conversation
Thanks for this PR. I'm not totally sure I follow the problem that it is trying to address though. Can you expand on the issue you're seeing and include steps to reproduce the problem? I'll need to know how I can replicate the issue to do validation test. Thanks |
Hi @dmikusa Sure, I will provide you a way to reproduce and understand the issue. Reproducing
tasks.named('bootBuildImage') {
environment['BP_DATADOG_ENABLED'] = 'true'
}
You should have the following output:
Investigating
This behavior is bogus as TestingFrom here? How do you think we can test it and ensure the toggle feature won't break native image builds again? Best, |
I'm not familiar with the native-image support for agents like Datadog, but if they cannot be toggled without rebuilding the binary then what you're saying makes perfect sense.
For testing, I think we just want to make sure that the toggle helper isn't added given the circumstances you mentioned. If you start with a copy of this test that should get you most of the way there. Just wrap your new test in a It seems like one test with |
54a2c97
to
82d63a9
Compare
Thanks for the clear directions to help me to write tests! I went with a test that ensures the toggle layer is not added when Native Image build are enabled. |
Yes, that sounds good. Everything looks good. The branch is just out of date. Normally, GH lets me update it but I can't on this PR. Can you update the branch? Then I can get this merged. Thanks! |
82d63a9
to
239a0cc
Compare
Sure! Just did 👌 |
To follow up. This has been released in the 4.6.0 version of the Datadog buildpack. |
Great! Thanks for your help getting this fixed, merged and published 🎉 |
Summary
This PR will disable toggle and its launch configuration for Java Native Image configuration.
It will also update the README and the Buildpack descriptor accordingly.
Use Cases
When building a native java application container, it will refuse to start assuming you inserted the (Java) toggle layer on a NodeJS application as
JAVA_TOOL_OPTIONS
is not used for Java native application (the agent being used at build time, not run/launch time).Checklist