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

feat(trait): jvm refactoring #5488

Merged
merged 4 commits into from
May 29, 2024
Merged

feat(trait): jvm refactoring #5488

merged 4 commits into from
May 29, 2024

Conversation

squakez
Copy link
Contributor

@squakez squakez commented May 9, 2024

  • Added jar parameter which can be used with synthetic Kits
  • Deprecated print-command in order to let distroless to work OOTB

Ref #5476

Release Note

feat(trait): jvm refactoring

Copy link
Contributor

github-actions bot commented May 9, 2024

✔️ Unit test coverage report - coverage increased from 38.1% to 38.3% (+0.2%)

@squakez squakez added the trigger native test Use this label in PR when you want to trigger Quarkus Native tests label May 9, 2024
Copy link
Contributor

github-actions bot commented May 9, 2024

✔️ Unit test coverage report - coverage increased from 38.1% to 38.3% (+0.2%)

pkg/trait/jvm.go Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented May 9, 2024

✔️ Unit test coverage report - coverage increased from 38.1% to 38.3% (+0.2%)

@squakez squakez force-pushed the feat/5476 branch 2 times, most recently from 99ae3a4 to c4573dc Compare May 21, 2024 11:37
Copy link
Contributor

✔️ Unit test coverage report - coverage increased from 38.4% to 38.6% (+0.2%)

@squakez
Copy link
Contributor Author

squakez commented May 21, 2024

I think the failures checks we're hitting is because of this joor issue: jOOQ/jOOR#69

Copy link
Contributor

✔️ Unit test coverage report - coverage increased from 38.4% to 38.6% (+0.2%)

@squakez
Copy link
Contributor Author

squakez commented May 23, 2024

Configmap tests are failing because when we use the fast-jar, the resources provided in the classpath are not "visible" to the route directly. The following one is failing (java -cp ... -jar dependencies/quarkus-run.jar):

...
      - setBody:
          simple: "resource:classpath:my-configmap-key"
...

with:

[2] Caused by: java.io.FileNotFoundException: Cannot find resource: classpath:my-configmap-key for URI: classpath:my-configmap-key
[2] 	at org.apache.camel.support.ResourceHelper.resolveMandatoryResourceAsInputStream(ResourceHelper.java:114)
[2] 	at org.apache.camel.support.LanguageSupport.loadResource(LanguageSupport.java:74)

The same is working correctly with explicit execution (ie, java -cp ... io.quarkus.bootstrap.runner.QuarkusEntryPoint)

@squakez
Copy link
Contributor Author

squakez commented May 23, 2024

Given the problems found so far, I'm moving the code developed into https://github.com/squakez/camel-k/tree/feat/5476_executable_jar for future references. I've created a follow up issue that we need to tackle in the future #5539 - for this PR I'm reducing the scope in order to be able to let the user fine tune the trait, have the possibility to run with a synthetic IntegrationKit and add some more coverage.

@squakez squakez marked this pull request as ready for review May 23, 2024 10:19
@squakez squakez linked an issue May 23, 2024 that may be closed by this pull request
3 tasks
Copy link
Contributor

✔️ Unit test coverage report - coverage increased from 38.4% to 38.6% (+0.2%)

1 similar comment
Copy link
Contributor

✔️ Unit test coverage report - coverage increased from 38.4% to 38.6% (+0.2%)

Copy link
Contributor

✔️ Unit test coverage report - coverage increased from 38.4% to 38.6% (+0.2%)

Copy link
Contributor

✔️ Unit test coverage report - coverage increased from 38.4% to 38.6% (+0.2%)

1 similar comment
Copy link
Contributor

✔️ Unit test coverage report - coverage increased from 38.4% to 38.6% (+0.2%)

* add more unit test
* enable the trait for synthetic Kits
* add documentation on the jvm trait usage

Closes apache#5476
The namespace is expected to be clean on purpose!
Copy link
Contributor

✔️ Unit test coverage report - coverage increased from 38.4% to 38.6% (+0.2%)

@squakez squakez merged commit 2a23605 into apache:main May 29, 2024
15 checks passed
@squakez squakez deleted the feat/5476 branch May 29, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
trigger native test Use this label in PR when you want to trigger Quarkus Native tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JVM trait refactoring
3 participants