apache / incubator-kie-kogito-runtimes

Kogito Runtimes - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
http://kogito.kie.org
Apache License 2.0
491 stars 192 forks source link

Fix kie-issues #1217 - Replace quay.io with docker.io #3525

Closed ricardozanini closed 1 month ago

ricardozanini commented 1 month ago

Fixes https://github.com/apache/incubator-kie-issues/issues/1217

Many thanks for submitting your Pull Request :heart:!

Please make sure that your PR meets the following requirements:

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](https://github.com/kiegroup/github-action-build-chain) to handle cross repository builds and be sure that we always use latest version of the code for each repository. [build-chain tool](https://github.com/kiegroup/github-action-build-chain) 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](https://github.com/kiegroup/github-action-build-chain#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-runtimes|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-runtimes|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-runtimes|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-runtimes|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-runtimes|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-runtimes|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-`, where `` 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.
kie-ci3 commented 1 month ago

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 https://github.com/apache/incubator-kie-kogito-runtimes/pull/3525 --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-3525/1/display/redirect

Test results:

Those are the test failures:

org.kie.kogito.tracing.QuarkusTracingAddonDevServicesIT.testEvaluateLoanEligibility io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step org.kie.kogito.tracing.decision.quarkus.deployment.KogitoDevServicesProcessor#startTrustyServiceDevService threw an exception: java.lang.RuntimeException: Failed to start Kogito TrustyService DevServices
at org.kie.kogito.tracing.decision.quarkus.deployment.KogitoDevServicesProcessor.startTrustyServiceDevService(KogitoDevServicesProcessor.java:145)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
at java.base/java.lang.Thread.run(Thread.java:833)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=docker.io/apache/incubator-kie-kogito-trusty-postgresql:latest, imagePullPolicy=AlwaysPullPolicy(), imageNameSubstitutor=Chained substitutor of 'DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')' and then 'Kogito Image Name Substitutor')
at org.kie.kogito.tracing.decision.quarkus.deployment.KogitoDevServicesProcessor.lambda$startTrustyService$8(KogitoDevServicesProcessor.java:271)
at java.base/java.util.Optional.orElseGet(Optional.java:364)
at org.kie.kogito.tracing.decision.quarkus.deployment.KogitoDevServicesProcessor.startTrustyService(KogitoDevServicesProcessor.java:276)
at org.kie.kogito.tracing.decision.quarkus.deployment.KogitoDevServicesProcessor.startTrustyServiceDevService(KogitoDevServicesProcessor.java:133)
... 11 more
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=docker.io/apache/incubator-kie-kogito-trusty-postgresql:latest, imagePullPolicy=AlwaysPullPolicy(), imageNameSubstitutor=Chained substitutor of 'DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')' and then 'Kogito Image Name Substitutor')
at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1364)
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:359)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:330)
at org.kie.kogito.tracing.decision.quarkus.deployment.KogitoDevServicesProcessor.lambda$startTrustyService$8(KogitoDevServicesProcessor.java:267)
... 14 more
Caused by: com.github.dockerjava.api.exception.NotFoundException: Status 404: {"message":"pull access denied for apache/incubator-kie-kogito-trusty-postgresql, repository does not exist or may require 'docker login': denied: requested access to the resource is denied"}

at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:241)
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:269)
at java.base/java.lang.Thread.run(Thread.java:833)
ricardozanini commented 1 month ago

@porcelli these are just integration tests that use these YAMLs as mock resources to check the integration with the k8s.

See: https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/quarkus/addons/fabric8-kubernetes-service-catalog/runtime/src/test/java/org/kie/kogito/addons/quarkus/fabric8/k8s/service/catalog/DeploymentUtilsTest.java#L61-L62

I'll change to docker.io/bananas.

porcelli commented 1 month ago

thank you @ricardozanini for clarifying

great idea to use bananas... so we don't confuse ourselves :)

kie-ci3 commented 1 month ago

PR job #2 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 https://github.com/apache/incubator-kie-kogito-runtimes/pull/3525 --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-3525/2/display/redirect

Test results:

Those are the test failures:

org.kie.kogito.tracing.QuarkusTracingAddonDevServicesIT.testEvaluateLoanEligibility io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step org.kie.kogito.tracing.decision.quarkus.deployment.KogitoDevServicesProcessor#startTrustyServiceDevService threw an exception: java.lang.RuntimeException: Failed to start Kogito TrustyService DevServices
at org.kie.kogito.tracing.decision.quarkus.deployment.KogitoDevServicesProcessor.startTrustyServiceDevService(KogitoDevServicesProcessor.java:145)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
at java.base/java.lang.Thread.run(Thread.java:833)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=docker.io/apache/incubator-kie-kogito-trusty-postgresql:latest, imagePullPolicy=AlwaysPullPolicy(), imageNameSubstitutor=Chained substitutor of 'DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')' and then 'Kogito Image Name Substitutor')
at org.kie.kogito.tracing.decision.quarkus.deployment.KogitoDevServicesProcessor.lambda$startTrustyService$8(KogitoDevServicesProcessor.java:271)
at java.base/java.util.Optional.orElseGet(Optional.java:364)
at org.kie.kogito.tracing.decision.quarkus.deployment.KogitoDevServicesProcessor.startTrustyService(KogitoDevServicesProcessor.java:276)
at org.kie.kogito.tracing.decision.quarkus.deployment.KogitoDevServicesProcessor.startTrustyServiceDevService(KogitoDevServicesProcessor.java:133)
... 11 more
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=docker.io/apache/incubator-kie-kogito-trusty-postgresql:latest, imagePullPolicy=AlwaysPullPolicy(), imageNameSubstitutor=Chained substitutor of 'DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')' and then 'Kogito Image Name Substitutor')
at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1364)
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:359)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:330)
at org.kie.kogito.tracing.decision.quarkus.deployment.KogitoDevServicesProcessor.lambda$startTrustyService$8(KogitoDevServicesProcessor.java:267)
... 14 more
Caused by: com.github.dockerjava.api.exception.NotFoundException: Status 404: {"message":"pull access denied for apache/incubator-kie-kogito-trusty-postgresql, repository does not exist or may require 'docker login': denied: requested access to the resource is denied"}

at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:241)
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:269)
at java.base/java.lang.Thread.run(Thread.java:833)
tiagobento commented 1 month ago

What is missing here for us to merge it? @ricardozanini @porcelli

ricardozanini commented 1 month ago

What is missing here for us to merge it? @ricardozanini @porcelli

nothing from my side

porcelli commented 1 month ago

we need to be thoughtful that the build will be broken for a quite due the image references of data-index... but I'm ok to merge as there is no way to solve this in one shot.

porcelli commented 1 month ago

@ricardozanini @tiagobento fyi https://github.com/apache/incubator-kie-kogito-runtimes/pull/3526 this is an attempt to move Integration tests to -apps