-
Notifications
You must be signed in to change notification settings - Fork 209
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
[KOGITO-9614] Fixing issue with async api and dev mode #3165
Conversation
…on (apache#3147)" This reverts commit decf232.
jenkins run kogito-runtimes quarkus-lts |
jenkins run kogito-runtimes native |
Jenkins run kogito-runtimes quarkus-lts |
Jenkins run kogito-runtimes native |
Jenkins run kogito-runtimes quarkus-lts |
Jenkins run kogito-runtimes native |
KogitoBuildContextAttributeBuildItem asyncAPIContext(List<AsyncAPIBuildItem> asyncAPIBuildItem) { | ||
return new KogitoBuildContextAttributeBuildItem(ParserContext.ASYNC_CONVERTER_KEY, new AsyncAPIInfoConverter( | ||
new MapAsyncAPIRegistry(asyncAPIBuildItem.stream().map(AsyncAPIBuildItem::getAsyncAPI).collect(Collectors.toList())))); | ||
void asyncAPIContext(LiveReloadExecutionBuildItem reload, KogitoBuildContextBuildItem context, BuildProducer<KogitoAddonsPreGeneratedSourcesBuildItem> sources) throws ClassNotFoundException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LiveReload depends on KogitoBuildContext (which depends on KogitoContextAttributeBuildItem), so here the trick is to declare a producer (that actually does not produce anything) so this is invoked before kogito codegen and take benefit of the fact that KogitoBuildContext is a mutable class.
We need LiveReload to use the proper classloader when loading the service
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
(quarkus-lts) - kogito-runtimes job Reproducerexport QUARKUS_BRANCH=2.13 NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution Test results:
Those are the test failures: org.kie.kogito.quarkus.serverless.workflow.deployment.livereload.LiveReloadProcessorTest.testAsyncApi1 expectation failed.Expected status code <201> but was <500>. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I have my doubts, but now it is clear is not related with async api extension, but with the reload test. |
@@ -25,7 +25,7 @@ | |||
/** | |||
* Decorators for Http CloudEvents outgoing messages | |||
*/ | |||
public final class CloudEventHttpOutgoingDecorator implements MessageDecorator { | |||
public class CloudEventHttpOutgoingDecorator implements MessageDecorator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@radtriste This is intending to fix the inheritance issue on lts
Jenkins run kogito-runtimes quarkus-lts |
(tests) - kogito-runtimes job Reproducerexport BUILD_MVN_OPTS_CURRENT=-T 1C -Dvalidate-formatting -Prun-code-coverage NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution Test results:
Those are the test failures: org.kie.kogito.persistence.kafka.KafkaProcessInstancesIT.testFindByIdReadModeexpected: 5 but was: 0 |
jenkins run kogito-runtimes tests |
Kudos, SonarCloud Quality Gate passed! 0 Bugs 91.4% Coverage The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
Reverted to previos version of async api base on code generation (since the alternative approach mengled with quarkus config management and make wrong assumption about resource location)
There is a degree of classpath manipulation that I cannot avoid but it should be fine since it only occurs while on devmode. Also there are some exception while cleanup test that I feel are acceptable since it does not affect the overal result