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

KOGITO-3208: integration test for trusty service and explainability service #458

Merged
merged 12 commits into from
Nov 2, 2020

Conversation

kostola
Copy link
Contributor

@kostola kostola commented Sep 16, 2020

Goal

Simulate the complete flow between a Kogito service exposing a DMN model, the Trusty Service and the Explainability Service:

  1. The execution of a DMN model is triggered in Kogito service via a call to its REST API.
  2. Kogito service generates a TraceEvent and sends it to Kafka.
  3. Trusty service reads the TraceEvent, stores the information about the execution in Infinispan.
  4. Trusty service sends an explainability request to the Explainability Service via Kafka.
  5. Explainabilty service reads the request and tries to calculate the feature importance scores by performing several calls back to the original Kogito service with perturbed inputs.
  6. Explainability service sends the explainability result message to Kafka.
  7. Trusty service reads the explainability result and stores it in Infinispan.
  8. Test that the execution and the explainability result exist by calling the corresponding Trusty Service REST APIs.

Main contents

  • As per Kogito feature, the Kogito service can be written using either Quarkus or Spring Boot, so there are two different modules that tests the same flow for each framework (integration-tests-trusty-service-quarkus and integration-tests-trusty-service-springboot) and a common module (integration-tests-trusty-service-common) with the shared logic, all grouped in a submodule of integration-tests called integration-tests-trusty-service.
  • The original submodules of integration-tests implemented specific tests for jobs-service. I renamed them adding the jobs-service part and moved to a dedicated submodule. One of the reason is a specific behavior of QuarkusTestResourceLifecycleManager classes (explained here).
  • I am using plain Testcontainers APIs in AbstractTrustyExplainabilityEnd2EndIT instead of ConditionalQuarkusTestResource and ConditionalSpringBootTestResource because I need to start containers in a specific order and they must communicate between each other (so they must belong to the same bridged network). I tried using *TestResource but I could not manage to implement the complete flow and the code was becoming a mess.

@kostola
Copy link
Contributor Author

kostola commented Sep 30, 2020

jenkins retest this please

1 similar comment
@kostola
Copy link
Contributor Author

kostola commented Oct 1, 2020

jenkins retest this please

Copy link
Contributor

@jiripetrlik jiripetrlik left a comment

Choose a reason for hiding this comment

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

I have first few comments and questions.

Copy link
Contributor

@danielezonca danielezonca left a comment

Choose a reason for hiding this comment

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

Thanks for the PR approving 👍

@kostola
Copy link
Contributor Author

kostola commented Oct 26, 2020

jenkins retest this please

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.

Bug C 2 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 2 Security Hotspots to review)
Code Smell A 2 Code Smells

12.7% 12.7% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@jiripetrlik jiripetrlik left a comment

Choose a reason for hiding this comment

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

Hello @kostola thank you for your changes. Looks good to me now.

@danielezonca danielezonca merged commit 95b46cf into apache:master Nov 2, 2020
@kostola kostola deleted the KOGITO-3208 branch November 3, 2020 08:29
almope pushed a commit to almope/kogito-apps that referenced this pull request Oct 7, 2021
* remove config listeners

* rename config property

* add process metrics test

* rename config property

* removed wrong file

* remove Interceptor

* update readme

* rename monitoring modules

* remove files
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.

4 participants