You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "fjtirado (via GitHub)" <gi...@apache.org> on 2025/02/20 12:41:46 UTC
[PR] [Fix #2193] ExecuteAfter mutation to return Json [incubator-kie-kogito-apps]
fjtirado opened a new pull request, #2194:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2194
Fix https://github.com/apache/incubator-kie-kogito-apps/issues/2193
Other mutations are still returning String to keep backward compatibility, although we probably should change them too
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [Fix #2193] ExecuteAfter mutation to return Json [incubator-kie-kogito-apps]
Posted by "kie-ci3 (via GitHub)" <gi...@apache.org>.
kie-ci3 commented on PR #2194:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2194#issuecomment-2671701487
**PR job** `#1` was: **UNSTABLE**
Possible explanation: This should be test failures
<details>
<summary><b>Reproducer</b></summary>
build-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-apps -u https://github.com/apache/incubator-kie-kogito-apps/pull/2194 --skipParallelCheckout
NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution
</details>
Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2194/1/display/redirect
**Test results:**
- PASSED: 1820
- FAILED: 1
Those are the test failures:
<details>
<summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2194/1/testReport/org.kie.kogito.index.addon.api/KogitoAddonRuntimeClientImplTest/testExecuteAfterSuccess/">org.kie.kogito.index.addon.api.KogitoAddonRuntimeClientImplTest.testExecuteAfterSuccess</a></summary>
class java.lang.Object cannot be cast to class org.kie.kogito.Model (java.lang.Object is in module java.base of loader 'bootstrap'; org.kie.kogito.Model is in unnamed module of loader 'app')
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [Fix #2193] ExecuteAfter mutation to return Json [incubator-kie-kogito-apps]
Posted by "wmedvede (via GitHub)" <gi...@apache.org>.
wmedvede commented on code in PR #2194:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2194#discussion_r1963699857
##########
data-index/data-index-common/src/main/java/org/kie/kogito/index/api/KogitoRuntimeCommonClient.java:
##########
@@ -116,13 +117,20 @@ public CompletableFuture sendDeleteClientRequest(WebClient webClient, String req
return future;
}
- protected void asyncHttpResponseTreatment(AsyncResult<HttpResponse<Buffer>> res, CompletableFuture future, String logMessage) {
- if (res.succeeded() && (res.result().statusCode() == 200 || res.result().statusCode() == 201)) {
- String jsonMessage = res.result().bodyAsString();
+ protected void asyncHttpResponseTreatment(AsyncResult<HttpResponse<Buffer>> res, CompletableFuture<String> future, String logMessage) {
+ asyncHttpResponseTreatment(res, future, result -> {
+ String jsonMessage = result.bodyAsString();
LOGGER.trace("Result {}", jsonMessage);
- future.complete(jsonMessage != null ? jsonMessage : "Successfully performed: " + logMessage);
+ return jsonMessage != null ? jsonMessage : "Successfully performed: " + logMessage;
+ }, logMessage);
+
+ }
+
+ protected <T> void asyncHttpResponseTreatment(AsyncResult<HttpResponse<Buffer>> res, CompletableFuture<T> future, Function<HttpResponse<Buffer>, T> function, String logMessage) {
+ if (res.succeeded() && (res.result().statusCode() == 200 || res.result().statusCode() == 201)) {
+ future.complete(function.apply(res.result()));
} else {
- LOGGER.trace("Error {}", logMessage);
+ LOGGER.info("Error {}", logMessage);
Review Comment:
If we are logging an error, why not to use do LOGGER.error ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [Fix #2193] ExecuteAfter mutation to return Json [incubator-kie-kogito-apps]
Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado merged PR #2194:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2194
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org