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

[DROOLS-6894] Metrics of rule execution should include … #2761

Merged
merged 1 commit into from
Apr 13, 2022

Conversation

tkobayas
Copy link
Contributor

@tkobayas tkobayas commented Apr 4, 2022

…rules fired from bpmn process

JIRA:
https://issues.redhat.com/browse/DROOLS-6894

How to replicate CI configuration locally?

Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.

build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.

How to retest this PR or trigger a specific build:
  • a pull request please add comment: Jenkins retest this

  • a full downstream build please add comment: Jenkins run fdb

  • a compile downstream build please add comment: Jenkins run cdb

  • a full production downstream build please add comment: Jenkins execute product fdb

  • an upstream build please add comment: Jenkins run upstream

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class PrometheusMetricsRuleTaskListener implements AgendaEventListener {
Copy link
Contributor Author

@tkobayas tkobayas Apr 4, 2022

Choose a reason for hiding this comment

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

I added PrometheusMetricsRuleTaskListener rather than reusing PrometheusMetricsDroolsListener because fields in the class are different (= constructor parameters which can be provided are different between Drools extension use case and jBPM extension use case).

@tkobayas tkobayas changed the title [DO-NOT-MERGE][DROOLS-6894] Metrics of rule execution should include … [DROOLS-6894] Metrics of rule execution should include … Apr 11, 2022
@tkobayas tkobayas marked this pull request as ready for review April 11, 2022 03:52
@tkobayas
Copy link
Contributor Author

tkobayas commented Apr 11, 2022

SonarCloud : 39.7% Duplication

I may be able to reduce the duplication by class inheritance. But PrometheusMetricsRuleTaskListener and PrometheusMetricsDroolsListener have different use cases and different fields so I think that separation without inheritance is easier to maintain.

@tkobayas
Copy link
Contributor Author

Linux - Pull Request & GHA Java 8 : Failed tests are common to other PR tests. So not related to this PR.

2022-04-11T06:31:02.9793012Z [ERROR] Tests run: 6, Failures: 0, Errors: 6, Skipped: 0, Time elapsed: 2.073 s <<< FAILURE! - in org.kie.server.integrationtests.scenariosimulation.ScenarioSimulationIntegrationTest

@tkobayas
Copy link
Contributor Author

@VaniHaripriya @sutaakar Please review, thanks!

@sutaakar
Copy link
Contributor

@tkobayas Do you know who could check the scesim issue?

[2022-04-11T05:26:37.112Z] Unexpected HTTP response code when requesting URI 'http://localhost:43570/kie-server-services/services/rest/server/containers/input-data-string/scesim'! Error code: 400, message: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
[2022-04-11T05:26:37.112Z] <response type="FAILURE" msg="Test scenario parsing error: Not supported: http://javax.xml.XMLConstants/property/accessExternalDTD"/>

Would be good to address it for green builds.

@tkobayas
Copy link
Contributor Author

tkobayas commented Apr 11, 2022

Do you know who could check the scesim issue?

Sent an email to bsig list :)

@yesamer
Copy link
Member

yesamer commented Apr 11, 2022

jenkins retest this please

@sonarcloud
Copy link

sonarcloud bot commented Apr 11, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

94.3% 94.3% Coverage
39.7% 39.7% Duplication

@tkobayas
Copy link
Contributor Author

Linux - Pull Request is green now. Thank you, @yesamer !

Copy link
Contributor

@VaniHaripriya VaniHaripriya left a comment

Choose a reason for hiding this comment

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

@tkobayas , this looks good to me. Thank you.

@tkobayas
Copy link
Contributor Author

@mariofusco Please merge this, thanks!

@mariofusco mariofusco merged commit 89bbd16 into kiegroup:main Apr 13, 2022
tkobayas added a commit to tkobayas/droolsjbpm-integration that referenced this pull request Jul 21, 2022
mariofusco pushed a commit that referenced this pull request Jul 25, 2022
tkobayas added a commit to tkobayas/droolsjbpm-integration that referenced this pull request Jul 26, 2022
mariofusco pushed a commit that referenced this pull request Jul 27, 2022
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.

5 participants