-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Enable Custom Java Arguments for AppCDS Archive Generation #38020
Comments
Thanks for reporting. Mind providing a little more information about what exactly fails during the AppCDS build process? |
Hi @geoand, since my application attempts to load a configuration from a K8s ConfigMap (through
It exits with a non-zero exit code due to the following error:
Which makes sense, because I'm not building the AppCDS archive inside of the K8s cluster. So, I would propose introducing a way to pass java arguments to the command that the AppCDS archive generation runs, so that I could, for example, pass the option PS. GitHub automatically added the |
Thanks for the info. So essentially you don't need to add custom flags, you just need the Kubernetes Config extension to not be "active" when AppCDS are built, correct? |
That would fix my use case, yes, but adding the flags would fix all use cases where a custom java argument might be needed to run the quarkus application 😄 |
Right, but at this point we don't have such a use case, do we? |
Consider a use case where a Quarkus application needs to establish connections with external resources (like a database) during runtime, but these resources are not accessible during the build process. In such cases, being able to disable these connections through custom Java arguments at build time would prevent failures and enhance the build process's flexibility and robustness. But you are correct, in my particular case it's just the Kubernetes ConfigMap dependency that is breaking my process. |
These sorts of connections are never started during the AppCDS process generation as Quarkus cuts off the initialization much earler.
👍🏼 |
#38022 takes care of the problem |
Disable impls of ConfigurableConfigSourceFactory that perform network access, when building AppCDS
Description
While examining the
AppCDSBuildStep
class, I've noticed a limitation in the current implementation. The process to generate the AppCDS archive does not support the addition of custom Java arguments.This limitation poses a problem in scenarios like mine, where the AppCDS generation fails due to an attempt to load properties from a Kubernetes ConfigFile, which is not available during the build process.
This enhancement is not only crucial for addressing similar failures but could also be beneficial in various other scenarios where the classes that are loaded depend on java arguments, potentially leading to more optimized AppCDS archives.
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: