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 #2102

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

Conversation

pefernan
Copy link
Contributor

@pefernan pefernan commented Sep 18, 2024

Closes apache/incubator-kie-issues#1483

Ensemble:
apache/incubator-kie-kogito-runtimes#3672
#2102
apache/incubator-kie-kogito-examples#2014
apache/incubator-kie-kogito-serverless-operator#542

Many thanks for submitting your Pull Request ❤️!

Please make sure that your PR meets the following requirements:

  • You have read the contributors guide
  • Pull Request title is properly formatted: KOGITO-XYZ Subject
  • Pull Request title contains the target branch if not targeting main: [0.9.x] KOGITO-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.

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

  • for a specific pull request check
    Please add comment: Jenkins (re)run [kogito-apps|kogito-examples] tests

  • for quarkus branch checks
    Run checks against Quarkus current used branch
    Please add comment: Jenkins run quarkus-branch

  • for a quarkus branch specific check
    Run checks against Quarkus current used branch
    Please add comment: Jenkins (re)run [kogito-apps|kogito-examples] quarkus-branch

  • for quarkus main checks
    Run checks against Quarkus main branch
    Please add comment: Jenkins run quarkus-main

  • for a specific quarkus main check
    Run checks against Quarkus main branch
    Please add comment: Jenkins (re)run [kogito-apps|kogito-examples] quarkus-main

  • for quarkus lts checks
    Run checks against Quarkus lts branch
    Please add comment: Jenkins run quarkus-lts

  • for a specific quarkus lts check
    Run checks against Quarkus lts branch
    Please add comment: Jenkins (re)run [kogito-apps|kogito-examples] quarkus-lts

  • for native checks
    Run native checks
    Please add comment: Jenkins run native

  • for a specific native check
    Run native checks
    Please add comment: Jenkins (re)run [kogito-apps|kogito-examples] native

  • for native lts checks
    Run native checks against quarkus lts branch
    Please add comment: Jenkins run native-lts

  • for a specific native lts check
    Run native checks against quarkus lts branch
    Please add comment: Jenkins (re)run [kogito-apps|kogito-examples] native-lts

How to backport a pull request to a different branch?

In order to automatically create a backporting pull request please add one or more labels having the following format backport-<branch-name>, where <branch-name> is the name of the branch where the pull request must be backported to (e.g., backport-7.67.x to backport the original PR to the 7.67.x branch).

NOTE: backporting is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.

Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.

If something goes wrong, the author will be notified and at this point a manual backporting is needed.

NOTE: this automated backporting is triggered whenever a pull request on main branch is labeled or closed, but both conditions must be satisfied to get the new PR created.

Quarkus-3 PR check is failing ... what to do ? The Quarkus 3 check is applying patches from the `.ci/environments/quarkus-3/patches`.

The first patch, called 0001_before_sh.patch, is generated from Openrewrite .ci/environments/quarkus-3/quarkus3.yml recipe. The patch is created to speed up the check. But it may be that some changes in the PR broke this patch.
No panic, there is an easy way to regenerate it. You just need to comment on the PR:

jenkins rewrite quarkus-3

and it should, after some minutes (~20/30min) apply a commit on the PR with the patch regenerated.

Other patches were generated manually. If any of it fails, you will need to manually update it... and push your changes.

@apache apache deleted a comment from kie-ci3 Sep 19, 2024
@apache apache deleted a comment from kie-ci3 Sep 19, 2024
@apache apache deleted a comment from kie-ci3 Sep 19, 2024
@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
@tiagobento
Copy link
Contributor

Hi @pefernan, great addition, thanks for this. Can we change the directory of our kie-flyway scripts from src/main/resources/db to src/main/resources/kie-flyway/db? This way I think it's unquestionably clear who will deal with those scripts. Thanks!

@apache apache deleted a comment from kie-ci3 Sep 25, 2024
@kie-ci3
Copy link
Contributor

kie-ci3 commented Sep 25, 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-apps -u #2102 --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-2102/10/display/redirect

Test results:

  • PASSED: 959
  • FAILED: 4

Those are the test failures:

org.kie.kogito.index.service.messaging.PostgreSqlMessagingKafkaConsumerIT.testProcessInstanceEvent JDBC exception executing SQL [delete from jobs] [ERROR: relation "jobs" does not exist
Position: 13] [n/a]
org.kie.kogito.index.service.messaging.PostgreSqlMessagingKafkaConsumerIT.testJobEvent JDBC exception executing SQL [delete from jobs] [ERROR: relation "jobs" does not exist
Position: 13] [n/a]
org.kie.kogito.index.service.messaging.PostgreSqlMessagingKafkaConsumerIT.testUserTaskInstanceEvent JDBC exception executing SQL [delete from jobs] [ERROR: relation "jobs" does not exist
Position: 13] [n/a]
org.kie.kogito.index.service.messaging.PostgreSqlMessagingKafkaConsumerIT.testProcessDefinitionEvent JDBC exception executing SQL [delete from jobs] [ERROR: relation "jobs" does not exist
Position: 13] [n/a]

@kie-ci3
Copy link
Contributor

kie-ci3 commented Sep 25, 2024

PR job #11 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 #2102 --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-2102/11/display/redirect

Test results:

  • PASSED: 1153
  • FAILED: 5

Those are the test failures:

org.kie.kogito.index.service.messaging.PostgreSqlMessagingKafkaConsumerIT.testProcessInstanceEvent JDBC exception executing SQL [delete from jobs] [ERROR: relation "jobs" does not exist
Position: 13] [n/a]
org.kie.kogito.index.service.messaging.PostgreSqlMessagingKafkaConsumerIT.testJobEvent JDBC exception executing SQL [delete from jobs] [ERROR: relation "jobs" does not exist
Position: 13] [n/a]
org.kie.kogito.index.service.messaging.PostgreSqlMessagingKafkaConsumerIT.testUserTaskInstanceEvent JDBC exception executing SQL [delete from jobs] [ERROR: relation "jobs" does not exist
Position: 13] [n/a]
org.kie.kogito.index.service.messaging.PostgreSqlMessagingKafkaConsumerIT.testProcessDefinitionEvent JDBC exception executing SQL [delete from jobs] [ERROR: relation "jobs" does not exist
Position: 13] [n/a]
TEST-org.kie.kogito.addons.quarkus.data.index.it.MongoQuarkusAddonDataIndexIT.xml.[failed-to-read] Failed to read test report file /home/jenkins/jenkins-agent/workspace/uest_jobs_kogito-apps-pr_PR-2102/kogito-pipelines/bc/apache_incubator-kie-kogito-apps/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-sw/target/failsafe-reports/TEST-org.kie.kogito.addons.quarkus.data.index.it.MongoQuarkusAddonDataIndexIT.xml
org.dom4j.DocumentException: Error on line 10 of document : XML document structures must start and end within the same entity.
at org.dom4j.io.SAXReader.read(SAXReader.java:511)
at org.dom4j.io.SAXReader.read(SAXReader.java:392)
at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:186)
at hudson.tasks.junit.TestResult.parse(TestResult.java:390)
at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:320)
at hudson.tasks.junit.TestResult.parse(TestResult.java:262)
at hudson.tasks.junit.TestResult.parse(TestResult.java:248)
at hudson.tasks.junit.TestResult.parse(TestResult.java:226)
at hudson.tasks.junit.TestResult.(TestResult.java:179)
at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:180)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3616)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:377)
at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 3235; XML document structures must start and end within the same entity.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:178)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1465)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.endEntity(XMLDocumentFragmentScannerImpl.java:933)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentScannerImpl.java:562)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1502)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1720)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanLiteral(XMLEntityScanner.java:1137)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(XMLScanner.java:980)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(XMLNSDocumentScannerImpl.java:447)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:250)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2710)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
at org.dom4j.io.SAXReader.read(SAXReader.java:494)
... 18 more

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.

Great work @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

@apache apache deleted a comment from kie-ci3 Sep 27, 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.

Create a common Kie Flyway initializer addon
6 participants