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-7578] Evaluate Impact analysis for ansible integration rules #94

Merged
merged 2 commits into from
Dec 13, 2023

Conversation

tkobayas
Copy link
Collaborator

@tkobayas tkobayas commented Nov 28, 2023

  • Quick prototype. Works for a basic example : ParserTest

Requires apache/incubator-kie-drools#5594 to compile and run. drools and drools-ansible-rulebook-integration have different upstream repos ,so cross-repository build wouldn't work, hence this CI should fail until apache/incubator-kie-drools#5594 is merged.

@tkobayas
Copy link
Collaborator Author

ParserTest generates a SVG file:
ParserTest-graph

@tkobayas
Copy link
Collaborator Author

Next task: Export the graph as JSON (implement in drools-impact-analysis side) so that Eder's UI can consume.

@tkobayas
Copy link
Collaborator Author

tkobayas commented Dec 8, 2023

Run CI after the 8.45.0-SNAPSHOT update is deployed.

@tkobayas tkobayas marked this pull request as ready for review December 11, 2023 06:00
- Quick prototype. Works for a basic example : ParserTest
- Replace jboss repo with apache repo for snapshot
@tkobayas tkobayas force-pushed the DROOLS-7578-ansible-visualization branch from 1c98fd0 to 42f1fa7 Compare December 11, 2023 06:41
- project: kiegroup/drools
- project: apache/incubator-kie-drools
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now changed from kiegroup/drools to apache/incubator-kie-drools.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @lampajr , this is a little irregular case. drools-ansible-rulebook-integration is developed in kiegroup, but it depends on the latest SNAPSHOT of apache/incubator-kie-drools. Do you think these yaml changes are valid?

Copy link
Member

Choose a reason for hiding this comment

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

Hey @tkobayas, If I am not missing anything the change is good to adapt the PR checks as the only change is the drools org here (so I am not expecting anything else).

Let me tag @rgdoliveira such that he can also review it as he is much more involved.

PS: I think the same change should be backported to 1.0.x branch if still in active development.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you for reviewing, @lampajr !

Copy link
Member

Choose a reason for hiding this comment

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

@tkobayas I think this change is ok. But keep in mind that the idea is that we will have a kiegroup/drools main branch in sync with apache/incubator-kie-drools at some point (that will be our midstream). So maybe later we can move back to kiegroup/drools when that branch is in place?

Copy link
Member

Choose a reason for hiding this comment

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

@rgdoliveira I wasn't aware that we wanted to restore kiegroup/drools and keep it in sync with the apache project (and tbh I don't see why we should), but anyway are you ok with this change for now? If so can you please approve it so I could merge? Thank you.

lhs.addPattern(pattern);
}

private static void parseConditions(Condition condition, Pattern pattern) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Currently, LhsParser and RhsParser can handle simple rules. After we will get more realistic and complex rules, we can improve further.

Comment on lines -49 to +52
<id>jboss-public-repository-group</id>
<name>JBoss Public Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
<id>apache-public-repository-group</id>
<name>Apache Public Repository Group</name>
<url>https://repository.apache.org/content/groups/public/</url>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Use apache repo rather than jboss repo even for SNAPSHOT

@tkobayas
Copy link
Collaborator Author

@mariofusco Please review, thanks!

@tkobayas
Copy link
Collaborator Author

Note that this visualization depends on apache/incubator-kie-drools#5594 , so this doesn't run with drools 8.43.0.Final which drools-ansible-rulebook-integration 1.0.xbranch currently depends on.

@tkobayas
Copy link
Collaborator Author

This seems to be expected checkout.

2023-12-11T07:53:20.4391431Z ##[group]Checkout summary
2023-12-11T07:53:20.4392442Z [INFO] [apache/incubator-kie-drools]
2023-12-11T07:53:20.4393919Z [INFO]      Project taken from apache/incubator-kie-drools:main (Branch HEAD 0abd1fcbb2c126d4a6b5ad67764bce9c894c4b10)
2023-12-11T07:53:20.4395379Z [INFO] [kiegroup/drools-ansible-rulebook-integration]
2023-12-11T07:53:20.4397264Z [INFO]      Project taken from kiegroup/drools-ansible-rulebook-integration:main (Branch HEAD 5ceabec812f72d10368a2e669b0d608da9d52bf8)
2023-12-11T07:53:20.4399070Z [INFO]      Merged tkobayas/drools-ansible-rulebook-integration:DROOLS-7578-ansible-visualization into branch main
2023-12-11T07:53:20.4400088Z ##[endgroup]

Copy link
Member

@lampajr lampajr left a comment

Choose a reason for hiding this comment

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

CI changes look good to me

@mariofusco mariofusco merged commit 26ac388 into kiegroup:main Dec 13, 2023
1 check passed
mariofusco pushed a commit that referenced this pull request Jan 15, 2024
…94)

* [DROOLS-7578] Evaluate Impact analysis for ansible integration rules
- Quick prototype. Works for a basic example : ParserTest
- Replace jboss repo with apache repo for snapshot

* build apache/incubator-kie-drools rather than kiegroup

(cherry picked from commit 26ac388)
mariofusco added a commit that referenced this pull request Jan 15, 2024
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