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

[CI] - Quarkus Super Heroes + Quarkus main #23612

Closed
quarkus-super-heroes-bot opened this issue Feb 11, 2022 · 277 comments · Fixed by quarkusio/quarkus-ecosystem-ci#161
Closed

[CI] - Quarkus Super Heroes + Quarkus main #23612

quarkus-super-heroes-bot opened this issue Feb 11, 2022 · 277 comments · Fixed by quarkusio/quarkus-ecosystem-ci#161
Labels
triage/ci-participant Issue used to track when CI has failed for a ecosystem-ci participant.

Comments

@quarkus-super-heroes-bot

This issue will be open and closed dependent on the state of https://github.com/quarkusio/quarkus-super-heroes building against Quarkus main snapshot.

If you have interest in being notified of this subscribe to the issue.

Closing #23425 in favor of this one.

@quarkus-super-heroes-bot
Copy link
Author

The build is still failing:

@quarkus-super-heroes-bot
Copy link
Author

The build is still failing:

@quarkus-super-heroes-bot
Copy link
Author

The build is still failing:

@quarkus-super-heroes-bot
Copy link
Author

@quarkus-super-heroes-bot
Copy link
Author

Unfortunately, the build failed:

@quarkus-super-heroes-bot
Copy link
Author

The build is still failing:

@edeandrea
Copy link
Contributor

@geoand is this a regression on Quarkus main?

Error: ] Some problems were encountered while processing the POMs:
Error:  'dependencies.dependency.version' for io.quarkus:quarkus-junit5-vertx:jar is missing. @ line 109, column 17
 @ 
Error:  The build could not read 1 project -> [Help 1]
Error:    
Error:    The project io.quarkus.workshop.super-heroes:rest-heroes:1.0 (/home/runner/work/quarkus-super-heroes/quarkus-super-heroes/current-repo/rest-heroes/pom.xml) has 1 error
Error:      'dependencies.dependency.version' for io.quarkus:quarkus-junit5-vertx:jar is missing. @ line 109, column 17

@geoand
Copy link
Contributor

geoand commented Mar 1, 2022

It's the result of #23905.

From the description:

N.B. This is a breaking change because the module name of quarkus-junit5-vertx was changed to quarkus-test-vertx (as it now needs to support quarkus-junit5-internal), the dependency on quarkus-junit5 was removed and the API changed packages (from io.quarkus.test.junit.vertx to io.quarkus.test.vertx).

@edeandrea
Copy link
Contributor

Got it. Thanks you. So does that mean until 2.7.3 is out this CI will fail every day?

@geoand
Copy link
Contributor

geoand commented Mar 1, 2022

Why do you say that?

CI should be green once you make the changes mentioned above.

@edeandrea
Copy link
Contributor

Is quarkus-test-vertx available pre 2.7.3?

@geoand
Copy link
Contributor

geoand commented Mar 1, 2022

Nope. Isn't CI testing against Quarkus main?

@edeandrea
Copy link
Contributor

It is. Which goes to my earlier comment that I can't make any changes until 2.7.3 is released, which also means the daily CI will continue to fail each day because of it. There isn't anything I can do to fix it until 2.7.3 is out.

@geoand
Copy link
Contributor

geoand commented Mar 1, 2022

2.7.3.Final should be out this week

@edeandrea
Copy link
Contributor

Sounds good. Thanks for the help!

Since this is a breaking change in a minor release I'd make sure it's well documented in the release notes :)

@geoand
Copy link
Contributor

geoand commented Mar 1, 2022

Yup, will do

@quarkus-super-heroes-bot
Copy link
Author

The build is still failing:

@quarkus-super-heroes-bot
Copy link
Author

The build is still failing:

@edeandrea
Copy link
Contributor

I just merged in changes for 2.7.3.Final (quarkusio/quarkus-super-heroes#35), so this should go back to green tomorrow.

@quarkus-super-heroes-bot
Copy link
Author

@geoand
Copy link
Contributor

geoand commented Sep 10, 2024

I think I understand what is happening here.

#43005 took away the renames, so now io.quarkus:quarkus-rest-client-reactive-jackson is not part of the BOM, and it is resolving to an old Quarkus version for quarkus-langchain4j-openai.

See this:

[INFO] --- dependency:3.7.0:tree (default-cli) @ rest-narration ---
[INFO] io.quarkus.sample.super-heroes:rest-narration:jar:1.0
[INFO] +- io.quarkiverse.langchain4j:quarkus-langchain4j-openai:jar:0.16.4:compile
[INFO] |  \- io.quarkiverse.langchain4j:quarkus-langchain4j-openai-common:jar:0.16.4:compile
[INFO] |     +- io.quarkus:quarkus-rest-client-reactive-jackson:jar:3.8.2:compile
[INFO] |     |  +- io.quarkus:quarkus-resteasy-reactive-jackson-common:jar:3.8.2:compile
[INFO] |     |  |  \- io.quarkus:quarkus-resteasy-reactive-common:jar:3.8.2:compile
[INFO] |     |  \- io.quarkus:quarkus-rest-client-reactive:jar:3.8.2:compile
[INFO] |     |     +- io.quarkus:quarkus-jaxrs-client-reactive:jar:3.8.2:compile
[INFO] |     |     |  \- io.quarkus.resteasy.reactive:resteasy-reactive-client:jar:999-SNAPSHOT:compile
[INFO] |     |     |     \- io.vertx:vertx-web-client:jar:4.5.10:compile
[INFO] |     |     +- io.quarkus:quarkus-smallrye-stork:jar:999-SNAPSHOT:compile
[INFO] |     |     +- io.quarkus:quarkus-rest-client-config:jar:999-SNAPSHOT:compile
[INFO] |     |     +- io.smallrye.stork:stork-api:jar:2.6.1:compile
[INFO] |     |     +- io.smallrye.stork:stork-core:jar:2.6.1:compile
[INFO] |     |     \- org.eclipse.microprofile.rest.client:microprofile-rest-client-api:jar:3.0.1:compile

So what I think we will need to Quarkus LangChain4j depend on Quarkus 3.15 when that comes out as we would then be able to use the new artifact names.

@edeandrea
Copy link
Contributor

Why can't we change the openai dependency on quarkus-rest-client-reactive-jackson to quarkus-rest-client-jackson now?

If we wait for 3.15 to come out, then anyone using quarkus-langchain with Quarkus 3.15 will be broken until a new quarkus-langchain is released.

@geoand
Copy link
Contributor

geoand commented Sep 10, 2024

Why can't we change the openai dependency on quarkus-rest-client-reactive-jackson to quarkus-rest-client-jackson now?

We can, we just need to depend on 3.9+ and that breaks people who want to use it with the existing LTS

@geoand
Copy link
Contributor

geoand commented Sep 10, 2024

If we wait for 3.15 to come out, then anyone using quarkus-langchain with Quarkus 3.15 will be broken until a new quarkus-langchain is released.

That's not true - with the current situation, 3.15 will work fine with Quarkus LangChain4j because 3.15 is a continuation oi 3.14 (as per our LTS policy). What will stop working if we don't do anything is 3.16.

@edeandrea
Copy link
Contributor

If we wait for 3.15 to come out, then anyone using quarkus-langchain with Quarkus 3.15 will be broken until a new quarkus-langchain is released.

That's not true - with the current situation, 3.15 will work fine with Quarkus LangChain4j because 3.15 is a continuation oi 3.14 (as per our LTS policy). What will stop working if we don't do anything is 3.16.

Ah yes you're right. 3.15 has already been branched, correct? So main reflects what will come for 3.16?

@geoand
Copy link
Contributor

geoand commented Sep 10, 2024

That is correct

@edeandrea
Copy link
Contributor

So then I think we have 2 options until 3.15 is out and Quarkus LangChain4j is updated:

  1. Leave everything as-is. This build will continue to fail every day
  2. Modify the job (for now) to build against the 3.15 branch. Once 3.15 is out and Quarkus LangChain4j is updated, then switch back to building against main. This will resolve the build failures and also continue to make sure that nothing on 3.15 is broken.

Personally I like option 2 (my OCD doesn't like things that continually fail :) )

@geoand
Copy link
Contributor

geoand commented Sep 10, 2024

I strongly agree with option 2

@edeandrea
Copy link
Contributor

What is the branch name for 3.15? I don't see one.

@holly-cummins
Copy link
Contributor

holly-cummins commented Sep 10, 2024

Thanks for the analysis, @edeandrea. The same root cause also caused failures in the groovy and pact ecosystem CIs.

2024-09-10T06:45:21.7851450Z [ERROR] 'dependencies.dependency.version' for io.quarkus:quarkus-rest-client-reactive-jackson:jar is missing. @ line 35, column 17
2024-09-10T06:45:21.7853060Z [ERROR] 'dependencies.dependency.version' for io.quarkus:quarkus-resteasy-reactive-jsonb:jar is missing. @ line 39, column 17

@edeandrea
Copy link
Contributor

You're welcome @holly-cummins. Unfortunately for the super heroes the problem is in a transitive dependency, so I'm not sure there's a way to re-write the dependency graph? I'm no Maven expert. I know it could easily be done in Gradle :)

@geoand
Copy link
Contributor

geoand commented Sep 10, 2024

What is the branch name for 3.15? I don't see one.

It will be a continuation of 3.14 - a new branch will get created before 3.15.0.CR1

@edeandrea
Copy link
Contributor

edeandrea commented Sep 10, 2024

Hey @bdemers do you know if there is a way in Maven to add a dependency rewrite rule on the fly during the build? Meaning if one of my project's transitive dependencies depends on A, maybe I want to re-write that dependency to B? Like you can do with Gradle (https://docs.gradle.org/current/userguide/resolution_rules.html#sub:conditional_dependency_substitution).

In Gradle I could do something like this in my build.gradle:

configurations.all {
  resolutionStrategy {
    eachDependency { dependency ->
      if ((dependency.requested.group == 'io.quarkus') && (dependency.requested.name == 'quarkus-rest-client-reactive-jackson')) {
        dependency.useTarget group: 'io.quarkus', name: 'quarkus-rest-client-jackson', version: dependency.requested.version
      }
    }
  }
}

@edeandrea
Copy link
Contributor

It will be a continuation of 3.14 - a new branch will get created before 3.15.0.CR1

So for now point it at the 3.14 branch?

@geoand
Copy link
Contributor

geoand commented Sep 10, 2024

Yup

edeandrea added a commit to quarkusio/quarkus-super-heroes that referenced this issue Sep 10, 2024
@edeandrea
Copy link
Contributor

See quarkusio/quarkus-super-heroes@d21e8db

Now let's not forget to revert once 3.15 is out :)

@geoand
Copy link
Contributor

geoand commented Sep 10, 2024

👌🏽

@bdemers
Copy link

bdemers commented Sep 10, 2024

Hey @bdemers do you know if there is a way in Maven to add a dependency rewrite rule on the fly during the build? Meaning if one of my project's transitive dependencies depends on A, maybe I want to re-write that dependency to B? Like you can do with Gradle (https://docs.gradle.org/current/userguide/resolution_rules.html#sub:conditional_dependency_substitution).

In Gradle I could do something like this in my build.gradle:

configurations.all {
  resolutionStrategy {
    eachDependency { dependency ->
      if ((dependency.requested.group == 'io.quarkus') && (dependency.requested.name == 'quarkus-rest-client-reactive-jackson')) {
        dependency.useTarget group: 'io.quarkus', name: 'quarkus-rest-client-jackson', version: dependency.requested.version
      }
    }
  }
}

Not really, but you could create a Maven extension could probably do it, but IMHO, that might obscure what is going on.

If you just want to test the same project with one lib (reactive), and run the build again to test it out with another (non-reactive) you could create profiles, and run the build twice: mvn verify && mvn verify -Preactive

If you want to run a build and test the integration of both libraries in the same build you could do that too, but how it's structured may depend on how your project is laid out (and it's goals, e.g. if the goal is testing or explaining to others how they should test a typical app).
TL;DR you could create maven sub-modules something like:
-common-jackson-tests (where src/main/java would contain reusable tests that are used in the following projects)

  • jackson-reactive-client (import the tests using surefire/failsafe's dependenciesToScan param)
  • jackson-rest-client (same as previous just with different dependencies).

If that doesn't help (or I'm way off on what you are trying to do) let me know and we can chat for a few minutes, and I see if I can point you in the right direction!

@edeandrea
Copy link
Contributor

Thanks for chiming in @bdemers!

The issue here is that in Quarkus itself, version 3.9+ renamed quarkus-rest-client-reactive-jackson to quarkus-rest-client-jackson. Up until what is on main there were "placeholder" artifacts in place to redirect quarkus-rest-client-reactive-jackson to quarkus-rest-client-jackson. Now on main those placeholder artifacts are gone, but one of the transitive dependencies of the application refer to an older version of quarkus that has those placeholders.

So now the build of the application fails. We were trying to figure out a clever way for the application to enforce the placeholders, which can be easily done in Gradle :)

@bdemers
Copy link

bdemers commented Sep 10, 2024

Ahh! Changing a GAV is hard!

Depending on what you did for the placeholder redirects, (Maven empty maven modules, or actual maven repository relocation files)

My suggestion would be to keep an empty module using the old name, that depends on the new name, add a deprecated note in the pom (nobody will read it though).
Quarkus could also create a Maven Enforcer rule (only works for Maven though), to detect potential problems (usage of the old dependency being one of them)
Or possibly this new wrapper jar some build time hook (using some Quarkus magic?) that adds a warning to build output, make that an error the next version, then fail builds in a future version (with a pointer to docs on how to upgrade)

We had a similar story with JJWT.
In an older release, used a single single jar, since then the packaging was made more modular (choice of JSON parser, etc). What we noticed is folks were stuck on the old version because lots of folks just depend on Dependabot, which don't work if you change a GAV. Our solution was to create a new module using the old coordinates, and include all the needed dependencies.
We added a note in the pom, which probably nobody will read 😆

🤔 Another idea would be to deploy an empty jar with an odd version name like quarkus-rest-client-reactive-jackson:3.9.999999, add that version in the Quarkus BOM. Any consumers of the BOM will automatically get the empty jar. If that empty jar depends on the new quarkus-rest-client-jackson jar (and that is also in the BOM), users should resolve the version in the BOM). You should only need to deploy quarkus-rest-client-reactive-jackson:3.9.999999, once and use it going forward.

@geoand
Copy link
Contributor

geoand commented Sep 11, 2024

Thanks a lot for the insight @bdemers.

Just for completeness I'll add that we did have relocations for the artifact in question, but those were removed since we don't want to maintain them forever.

@quarkus-super-heroes-bot
Copy link
Author

The build is still failing:

@quarkus-super-heroes-bot
Copy link
Author

The build is still failing:

@quarkus-super-heroes-bot
Copy link
Author

The build is still failing:

@quarkus-super-heroes-bot
Copy link
Author

The build is still failing:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/ci-participant Issue used to track when CI has failed for a ecosystem-ci participant.
Projects
None yet
Development

Successfully merging a pull request may close this issue.