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

[Fix #2175]Adding count process intance and count user task queries #2196

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fjtirado
Copy link
Contributor

Fix #2175

@fjtirado fjtirado force-pushed the Fix_#2175 branch 3 times, most recently from 19815d8 to f35f82d Compare February 24, 2025 17:05
@@ -69,7 +69,6 @@ input ProcessDefinitionArgument {
serviceUrl: StringArgument
description: StringArgument
type: StringArgument
metadata: JSON
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we are preventing json properties to appear int he contextual graphql help in case the datastore does not support it

Copy link
Contributor

@gmunozfe gmunozfe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing .rat-excludes entries for schema.graphqls files.

Also 2 failing tests:

apache_incubator-kie-kogito-apps/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java:1 | java.lang.IllegalStateException: Unable to determine the status of the running process. See the above logs for details
apache_incubator-kie-kogito-apps/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/PostgreSqlIndexingServiceIT.java:1 | Assertion condition defined as a org.kie.kogito.index.service.AbstractIndexingServiceIT 1 expectation failed. JSON path data.Jobs[0].lastUpdate doesn't match. Expected: is "20[25](https://github.com/apache/incubator-kie-kogito-apps/actions/runs/13504547221/job/37730970537?pr=2196#step:6:27)-02-24T18:42:38.016Z"   Actual: 2025-02-24T18:42:38.017Z  within 30 seconds.

@fjtirado fjtirado requested a review from gmunozfe February 25, 2025 11:04
@fjtirado fjtirado force-pushed the Fix_#2175 branch 3 times, most recently from 95dd0b9 to a8bac1e Compare February 25, 2025 11:06
Copy link
Contributor

@gmunozfe gmunozfe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but needs some integration tests to validate the count for process instance and user task and also test some edge cases.
Rest of comments are minor, just check the possible null return for getSingleResult.
Nice work @fjtirado !

@kie-ci3
Copy link
Contributor

kie-ci3 commented Feb 26, 2025

PR job #15 was: UNSTABLE
Possible explanation: This should be test failures

Reproducer

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 #2196 --skipParallelCheckout

NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution

Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2196/15/display/redirect

Test results:

  • PASSED: 1826
  • FAILED: 1

Those are the test failures:

org.kie.kogito.jobs.embedded.EmbeddedJobsServiceTest.testJobService java.util.ConcurrentModificationException
at java.base/java.util.ArrayList.forEach(ArrayList.java:1513)
at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1092)
at org.kie.kogito.jobs.embedded.EmbeddedJobsServiceTest.testJobService(EmbeddedJobsServiceTest.java:99)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:973)
at io.quarkus.test.junit.QuarkusTestExtension.interceptTestMethod(QuarkusTestExtension.java:823)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

@pefernan
Copy link
Contributor

pefernan commented Feb 27, 2025

@fjtirado nice addition! Would it be possible to have it for jobs too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include total number of matching records if the underlying data store suppports that
5 participants