Register ProcessResult for reflection in native - #1628
Conversation
…t-config.json Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Registers ProcessResult for reflection in the GraalVM native-image configuration to support native builds.
Changes:
- Adds
io.serverlessworkflow.impl.executors.ProcessResulttoreflect-config.jsonfor reflection access in native image. - Enables broad reflective access (constructors/methods/fields/classes) for
ProcessResult.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| { | ||
| "name": "io.serverlessworkflow.impl.executors.ProcessResult", | ||
| "queryAllPublicConstructors": true, | ||
| "queryAllDeclaredConstructors": true, | ||
| "queryAllPublicMethods": true, | ||
| "queryAllDeclaredMethods": true, | ||
| "allPublicConstructors": true, | ||
| "allDeclaredConstructors": true, | ||
| "allPublicMethods": true, | ||
| "allDeclaredMethods": true, | ||
| "allPublicFields": true, | ||
| "allDeclaredFields": true, | ||
| "allPublicClasses": true, | ||
| "allDeclaredClasses": true | ||
| }, |
| "queryAllPublicConstructors": true, | ||
| "queryAllDeclaredConstructors": true, | ||
| "queryAllPublicMethods": true, | ||
| "queryAllDeclaredMethods": true, | ||
| "allPublicConstructors": true, | ||
| "allDeclaredConstructors": true, | ||
| "allPublicMethods": true, | ||
| "allDeclaredMethods": true, |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
impl/core/src/main/resources/META-INF/native-image/io.serverlessworkflow/serverlessworkflow-impl-core/reflect-config.json:16
- This reflection entry grants full reflective access to constructors/methods/fields/classes (public + declared). In native images, overly-broad reflection configs increase the attack surface and can unintentionally expose internals. Prefer registering only what’s required (e.g., specific constructors and only the fields/methods actually accessed reflectively) and drop the
queryAll*flags unless you have a concrete need for agent-based discovery.
{
"name": "io.serverlessworkflow.impl.executors.ProcessResult",
"queryAllPublicConstructors": true,
"queryAllDeclaredConstructors": true,
"queryAllPublicMethods": true,
"queryAllDeclaredMethods": true,
"allPublicConstructors": true,
"allDeclaredConstructors": true,
"allPublicMethods": true,
"allDeclaredMethods": true,
"allPublicFields": true,
"allDeclaredFields": true,
"allPublicClasses": true,
"allDeclaredClasses": true
},
Many thanks for submitting your Pull Request ❤️!
What this PR does / why we need it:
Special notes for reviewers:
Additional information (if needed):
Closes #1627