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

incubator-kie-issues#1483: Create a common Kie Flyway initializer for Kie Modules #3672

Merged
merged 9 commits into from
Oct 1, 2024

Conversation

pefernan
Copy link
Contributor

@pefernan pefernan commented Sep 18, 2024

Closes apache/incubator-kie-issues#1483

Ensemble:
#3672
apache/incubator-kie-kogito-apps#2102
apache/incubator-kie-kogito-examples#2014

Many thanks for submitting your Pull Request ❤️!

Closes/Fixes/Resolves #ISSUE-NUMBER

Description:

Please make sure that your PR meets the following requirements:

  • You have read the contributors guide
  • Your code is properly formatted according to this configuration
  • Pull Request title is properly formatted: Issue-XYZ Subject
  • Pull Request title contains the target branch if not targeting main: [0.9.x] Issue-XYZ Subject
  • Pull Request contains link to the JIRA issue
  • Pull Request contains link to any dependent or related Pull Request
  • Pull Request contains description of the issue
  • Pull Request does not include fixes for issues other than the main ticket
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.

@kie-ci3
Copy link
Contributor

kie-ci3 commented Sep 18, 2024

PR job #1 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-runtimes -u #3672 --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-runtimes-pr/job/PR-3672/1/display/redirect

Test results:

  • PASSED: 3328
  • FAILED: 4

Those are the test failures:

org.kie.kogito.integrationtests.quarkus.reactive.ProcessSvgAddonIT.testGetSvgProcessInstances 1 expectation failed.
Response body doesn't match expectation.
Expected: Expected namespace uri 'http://www.w3.org/2000/svg' but was 'null' - comparing at /svg[1]/defs[1] to at /svg[1]/defs[1]:

Actual:

EndStartProcessSecond Line Approval First Line Approval
org.kie.kogito.integrationtests.quarkus.ProcessSvgAddonIT.testGetSvgProcessInstances 1 expectation failed.
Response body doesn't match expectation.
Expected: Expected namespace uri 'http://www.w3.org/2000/svg' but was 'null' - comparing at /svg[1]/defs[1] to at /svg[1]/defs[1]:

Actual:

EndStartProcessSecond Line Approval First Line Approval
org.kie.kogito.svg.service.SpringBootProcessSvgServiceTest.annotateExecutedPathTest
Expecting value to be false but was true
org.kie.kogito.integrationtests.springboot.ProcessSvgAddonTest.testGetSvgProcessInstances 1 expectation failed.
Response body doesn't match expectation.
Expected: Expected namespace uri 'http://www.w3.org/2000/svg' but was 'null' - comparing at /svg[1]/defs[1] to at /svg[1]/defs[1]:

Actual:

EndStartProcessSecond Line Approval First Line Approval

@kie-ci3
Copy link
Contributor

kie-ci3 commented Sep 20, 2024

PR job #4 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-runtimes -u #3672 --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-runtimes-pr/job/PR-3672/4/display/redirect

Test results:

  • PASSED: 3328
  • FAILED: 4

Those are the test failures:

org.kie.kogito.integrationtests.quarkus.reactive.ProcessSvgAddonIT.testGetSvgProcessInstances 1 expectation failed.
Response body doesn't match expectation.
Expected: Expected namespace uri 'http://www.w3.org/2000/svg' but was 'null' - comparing at /svg[1]/defs[1] to at /svg[1]/defs[1]:

Actual:

EndStartProcessSecond Line Approval First Line Approval
org.kie.kogito.integrationtests.quarkus.ProcessSvgAddonIT.testGetSvgProcessInstances 1 expectation failed.
Response body doesn't match expectation.
Expected: Expected namespace uri 'http://www.w3.org/2000/svg' but was 'null' - comparing at /svg[1]/defs[1] to at /svg[1]/defs[1]:

Actual:

EndStartProcessSecond Line Approval First Line Approval
org.kie.kogito.svg.service.SpringBootProcessSvgServiceTest.annotateExecutedPathTest
Expecting value to be false but was true
org.kie.kogito.integrationtests.springboot.ProcessSvgAddonTest.testGetSvgProcessInstances 1 expectation failed.
Response body doesn't match expectation.
Expected: Expected namespace uri 'http://www.w3.org/2000/svg' but was 'null' - comparing at /svg[1]/defs[1] to at /svg[1]/defs[1]:

Actual:

EndStartProcessSecond Line Approval First Line Approval

@pefernan pefernan changed the title [WIP] incubator-kie-issues#1483: Create a common Kie Flyway initializer for Kie Modules incubator-kie-issues#1483: Create a common Kie Flyway initializer for Kie Modules Sep 23, 2024
Copy link
Contributor

@gitgabrio gitgabrio left a comment

Choose a reason for hiding this comment

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

Hi @pefernan

Thanks for the PR, but I think it is better to avoid framework-specific duplicated code.
Framework-specific classes should be just "proxy" to common code, with different annotations.
KieFlywaySpringbootInitializer code is exactly the same as KieFlywayRecorder.
Even if different frameworks may provide "utilities", in our context is better to have vanilla-java code, to reduce the hassle of maintaining two different implementations, since our code is a "library" meant to be used inside different applications, and not a "final downstream" project

@gitgabrio
Copy link
Contributor

Hi @pefernan
About the comment in original ticket, could you explain exactly where/how multiple "META-INF/kie-flyway.properties" may ends up in the classloader/classpath ?

@pefernan
Copy link
Contributor Author

@gitgabrio each module that requires initializing the DB (runtime-persistence, data-index, data-audit, jobs.. ) will have a kie-flyway.props file in the META-INF folder, with its specific config. The idea is that during the app startup (if the feature is enabled), the KieFlywayInitializer component will load them using the KieFlywayConfigLoader and execute a flyway migration if needed.

@elguardian
Copy link
Contributor

elguardian commented Sep 23, 2024

Hi @gitgabrio this was disscussed already in the proper channels. Let's try to avoid noise in the PR.

@kie-ci3
Copy link
Contributor

kie-ci3 commented Sep 23, 2024

PR job #5 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-runtimes -u #3672 --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-runtimes-pr/job/PR-3672/5/display/redirect

Test results:

  • PASSED: 3328
  • FAILED: 4

Those are the test failures:

org.kie.kogito.integrationtests.quarkus.reactive.ProcessSvgAddonIT.testGetSvgProcessInstances 1 expectation failed.
Response body doesn't match expectation.
Expected: Expected namespace uri 'http://www.w3.org/2000/svg' but was 'null' - comparing at /svg[1]/defs[1] to at /svg[1]/defs[1]:

Actual:

EndStartProcessSecond Line Approval First Line Approval
org.kie.kogito.integrationtests.quarkus.ProcessSvgAddonIT.testGetSvgProcessInstances 1 expectation failed.
Response body doesn't match expectation.
Expected: Expected namespace uri 'http://www.w3.org/2000/svg' but was 'null' - comparing at /svg[1]/defs[1] to at /svg[1]/defs[1]:

Actual:

EndStartProcessSecond Line Approval First Line Approval
org.kie.kogito.svg.service.SpringBootProcessSvgServiceTest.annotateExecutedPathTest
Expecting value to be false but was true
org.kie.kogito.integrationtests.springboot.ProcessSvgAddonTest.testGetSvgProcessInstances 1 expectation failed.
Response body doesn't match expectation.
Expected: Expected namespace uri 'http://www.w3.org/2000/svg' but was 'null' - comparing at /svg[1]/defs[1] to at /svg[1]/defs[1]:

Actual:

EndStartProcessSecond Line Approval First Line Approval

- README.md
Copy link
Contributor

@martinweiler martinweiler left a comment

Choose a reason for hiding this comment

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

Added some minor remarks regarding the readme
Great job @pefernan

Copy link
Contributor

@elguardian elguardian left a comment

Choose a reason for hiding this comment

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

LGTM

- Api improvements
Copy link
Contributor

@gitgabrio gitgabrio left a comment

Choose a reason for hiding this comment

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

Hi @pefernan
I see only three very minor bits to fix - see my comments

@pefernan
Copy link
Contributor Author

good catch @gitgabrio

Copy link
Contributor

@gitgabrio gitgabrio left a comment

Choose a reason for hiding this comment

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

Great stuff @pefernan , thx!

@kie-ci3
Copy link
Contributor

kie-ci3 commented Sep 30, 2024

PR job #10 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-runtimes -u #3672 --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-runtimes-pr/job/PR-3672/10/display/redirect

Test results:

  • PASSED: 3335
  • FAILED: 1

Those are the test failures:

org.jbpm.bpmn2.IntermediateEventTest.testIntermediateCatchEventTimerCycle3
expected: 3
but was: 2

@gitgabrio gitgabrio merged commit b096bf2 into apache:main Oct 1, 2024
6 checks passed
@pefernan pefernan deleted the incubator-kie-issues#1483 branch October 1, 2024 07:29
rgdoliveira pushed a commit to rgdoliveira/kogito-runtimes that referenced this pull request Oct 3, 2024
… Kie Modules (apache#3672)

* incubator-kie-issues#1483: Create a common Kie Flyway initializer for Kie Modules

* - cleanup

* - cleanup

* - ddls

* - runtime configuration changes

* - changing script locations

* - Improved testing
- README.md

* - README.md
- Api improvements

* - minor changes
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.

Create a common Kie Flyway initializer addon
6 participants