feat: metadata for graal VM config#7429
Conversation
# Conflicts: # CHANGELOG.md
4c4f765 to
932f105
Compare
manusa
left a comment
There was a problem hiding this comment.
Looking good, thx.
I don't think you need to do the convoluted call from one script to another, just extract the required method so that it can be called from either.
Then, in the wrapper, you can actually use JBang's //SOURCE annotation to create the dependency and import for the other class.
You can find an example of this at:
https://github.com/marcnuri-demo/blog-tutorials/blob/11ac44f167581f07e11d49d7e0192dfcbee71915/java-virtual-threads-project-loom-complete-guide/Test.java#L4-L9
Also, I'm not sure if we should add a Makefile target for this, the Makefile could easily check too if JBang is available and spit an error in case it isn't.
- Refuse to write outside the module's target/classes when the
auto-derived output path falls outside it (e.g. an artifactId in
pom.xml containing path-traversal segments).
- Fail fast when artifactId can't be extracted from pom.xml instead of
silently falling back to the hardcoded "kubernetes-client" path,
which would corrupt the core module's metadata when merging.
- Switch the KUBERNETES_RESOURCES strategy from HasMetadata to
KubernetesResource so Spec/Status/nested model classes (PodSpec,
ObjectMeta, EnvVar, ...) are picked up. On kubernetes-model-core
this raises the count from 19 to 295 classes.
- Replace the brittle pattern-to-regex translation (only escaped '.'
and '*') with a proper glob translator that escapes every regex
metacharacter, so include/exclude patterns containing '[', '+',
'(', etc. no longer throw PatternSyntaxException at runtime.
- Replace System.exit(1) on unknown options with
IllegalArgumentException so callers using //SOURCES (e.g. the batch
wrapper) aren't terminated.
- Distinguish "wrote a file" from "no classes matched" in
generate()'s return value (new Result enum) so the wrapper's
summary doesn't claim success when nothing was written.
Signed-off-by: Marc Nuri <marc@marcnuri.com>
|
@ash-thakur-rh I went through the two scripts and put together a small PR against your branch with a handful of suggested fixes — feel free to take it as-is, cherry-pick, or use it as a reference and apply your own version: Six changes on the two scripts only (zero CHANGELOG / pom touches). Each one has the reasoning inline so you can see why before deciding. Once whatever subset you're happy with lands on your branch, this PR is ready for another pass. |
fix(scripts): address review findings on GraalVM metadata generators
Description
Refs #5084
Type of change
test, version modification, documentation, etc.)
Checklist