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

Conflicting open telemetry and flyway dependencies #45130

Closed
DawidStuzynski opened this issue Dec 14, 2024 · 3 comments · Fixed by #45136
Closed

Conflicting open telemetry and flyway dependencies #45130

DawidStuzynski opened this issue Dec 14, 2024 · 3 comments · Fixed by #45136
Labels
Milestone

Comments

@DawidStuzynski
Copy link

DawidStuzynski commented Dec 14, 2024

Describe the bug

Hi, I found that if I have open telemetry and flyway dependencies in one project and set quarkus.otel.logs.enabled=true during build I got:

> There was a failure while executing work items
   > A failure occurred while executing io.quarkus.gradle.tasks.worker.BuildWorker
      > io.quarkus.builder.ChainBuildException: Cycle detected:
                           io.quarkus.flyway.deployment.FlywayProcessor#createBeans produced class io.quarkus.arc.deployment.AdditionalBeanBuildItem
                        to io.quarkus.arc.deployment.ArcProcessor#initialize produced class io.quarkus.arc.deployment.ContextRegistrationPhaseBuildItem
                        to io.quarkus.narayana.jta.deployment.NarayanaJtaProcessor#transactionContext produced class io.quarkus.arc.deployment.ContextRegistrationPhaseBuildItem$ContextConfiguratorBuildItem
                        to io.quarkus.arc.deployment.ArcProcessor#registerBeans produced class io.quarkus.arc.deployment.BeanDiscoveryFinishedBuildItem
                        to io.quarkus.arc.deployment.ReflectiveBeanClassesProcessor#implicitReflectiveBeanClasses produced class io.quarkus.arc.deployment.ReflectiveBeanClassBuildItem
                        to io.quarkus.arc.deployment.ArcProcessor#generateResources produced class io.quarkus.arc.deployment.ResourcesGeneratedPhaseBuildItem
                        to io.quarkus.arc.deployment.ArcProcessor#initializeContainer produced class io.quarkus.arc.deployment.ArcContainerBuildItem
                        to io.quarkus.arc.deployment.ArcProcessor#notifyBeanContainerListeners produced class io.quarkus.arc.deployment.PreBeanContainerBuildItem
                        to io.quarkus.arc.deployment.ArcProcessor#signalBeanContainerReady produced class io.quarkus.arc.deployment.BeanContainerBuildItem
                        to io.quarkus.opentelemetry.deployment.logging.LogHandlerProcessor#build produced class io.quarkus.deployment.builditem.LogHandlerBuildItem
                        to io.quarkus.deployment.logging.LoggingResourceProcessor#setupLoggingRuntimeInit produced class io.quarkus.deployment.logging.LoggingSetupBuildItem
                        to io.quarkus.flyway.deployment.FlywayProcessor#createBeans

If I remove implementation("io.quarkus:quarkus-flyway") or implementation("io.quarkus:quarkus-opentelemetry") everything works fine

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

https://github.com/DawidStuzynski/open-telemetry-flyway-problem
clone this repo, run in terminal ./gradlew assemble, if quarkus.otel.logs.enabled=true or quarkus.otel.metrics.enabled=true is removed everything works fine

Output of uname -a or ver

Darwin Dawids-MacBook-Pro.local 24.0.0 Darwin Kernel Version 24.0.0:

Output of java -version

openjdk version "21.0.1" 2023-10-17 OpenJDK Runtime Environment GraalVM CE 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19) OpenJDK 64-Bit Server VM GraalVM CE 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19, mixed mode, sharing)

Quarkus version or git rev

3.17.4

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 8.9

Additional information

No response

@DawidStuzynski DawidStuzynski added the kind/bug Something isn't working label Dec 14, 2024
Copy link

quarkus-bot bot commented Dec 14, 2024

/cc @cristhiank (flyway), @gastaldi (flyway), @geoand (flyway), @gsmet (flyway)

@brunobat
Copy link
Contributor

@geoand, @mkouba. I think this issue is related with #44181, as well.

@geoand
Copy link
Contributor

geoand commented Dec 16, 2024

It's vaguely similar, but fixing either issue would not solve the other.

For this issue, I have opened #45136 but I don't really have a way to check if it does not break the Flyway extension in some obscure way

@gsmet gsmet closed this as completed in 327341c Dec 17, 2024
gsmet added a commit that referenced this issue Dec 17, 2024
Break build cycle between OTel, logging and Flyway
@quarkus-bot quarkus-bot bot added this to the 3.18 - main milestone Dec 17, 2024
@gsmet gsmet modified the milestones: 3.18 - main, 3.17.5 Dec 17, 2024
gsmet pushed a commit to gsmet/quarkus that referenced this issue Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants