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

Update to SmallRye Health 2.1.0 and MP Health 2.1 #4641

Merged
merged 1 commit into from Oct 21, 2019

Conversation

@kenfinnigan
Copy link
Member

kenfinnigan commented Oct 17, 2019

No description provided.

@kenfinnigan kenfinnigan added this to the 0.26.0 milestone Oct 17, 2019
Copy link
Member

gsmet left a comment

The title of the PR and the commit message are off: they should be about Health, not Metrics.

Can you adjust? Thanks.

@kenfinnigan kenfinnigan force-pushed the kenfinnigan:health-update branch 2 times, most recently from 9b564d0 to b250de1 Oct 17, 2019
@kenfinnigan kenfinnigan changed the title Update to SmallRye Metrics 2.1.0 and MP Metrics 2.1 Update to SmallRye Health 2.1.0 and MP Health 2.1 Oct 17, 2019
@kenfinnigan

This comment has been minimized.

Copy link
Member Author

kenfinnigan commented Oct 17, 2019

Fixed @gsmet. Not quite sure how I managed that mixup

@gsmet
gsmet approved these changes Oct 17, 2019
Copy link
Member

gsmet left a comment

Cool, thanks! Let's wait for CI then.

@kenfinnigan

This comment has been minimized.

Copy link
Member Author

kenfinnigan commented Oct 17, 2019

@gsmet have you seen CI failures for documentation recently? That seems to be the reason for failure:

Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: io.quarkus:quarkus-core:jar:999-SNAPSHOT, io.quarkus:quarkus-arc:jar:999-SNAPSHOT, io.quarkus:quarkus-caffeine:jar:999-SNAPSHOT, io.quarkus:quarkus-jaxb:jar:999-SNAPSHOT, io.quarkus:quarkus-jackson:jar:999-SNAPSHOT, io.quarkus:quarkus-jsonb:jar:999-SNAPSHOT, io.quarkus:quarkus-jsonp:jar:999-SNAPSHOT, io.quarkus:quarkus-netty:jar:999-SNAPSHOT, io.quarkus:quarkus-agroal:jar:999-SNAPSHOT, io.quarkus:quarkus-artemis-core:jar:999-SNAPSHOT, io.quarkus:quarkus-artemis-jms:jar:999-SNAPSHOT, io.quarkus:quarkus-elasticsearch-rest-client:jar:999-SNAPSHOT, io.quarkus:quarkus-security:jar:999-SNAPSHOT, io.quarkus:quarkus-elytron-security:jar:999-SNAPSHOT, io.quarkus:quarkus-elytron-security-properties-file:jar:999-SNAPSHOT, io.quarkus:quarkus-elytron-security-oauth2:jar:999-SNAPSHOT, io.quarkus:quarkus-oidc:jar:999-SNAPSHOT, io.quarkus:quarkus-flyway:jar:999-SNAPSHOT, io.quarkus:quarkus-hibernate-orm:jar:999-SNAPSHOT, io.quarkus:quarkus-hibernate-orm-panache:jar:999-SNAPSHOT, io.quarkus:quarkus-mongodb-panache:jar:999-SNAPSHOT, io.quarkus:quarkus-hibernate-search-elasticsearch:jar:999-SNAPSHOT, io.quarkus:quarkus-hibernate-validator:jar:999-SNAPSHOT, io.quarkus:quarkus-infinispan-client:jar:999-SNAPSHOT, io.quarkus:quarkus-infinispan-embedded:jar:999-SNAPSHOT, io.quarkus:quarkus-jaeger:jar:999-SNAPSHOT, io.quarkus:quarkus-jdbc-postgresql:jar:999-SNAPSHOT, io.quarkus:quarkus-jdbc-h2:jar:999-SNAPSHOT, io.quarkus:quarkus-jdbc-mariadb:jar:999-SNAPSHOT, io.quarkus:quarkus-jdbc-mssql:jar:999-SNAPSHOT, io.quarkus:quarkus-jdbc-mysql:jar:999-SNAPSHOT, io.quarkus:quarkus-jdbc-derby:jar:999-SNAPSHOT, io.quarkus:quarkus-kafka-client:jar:999-SNAPSHOT, io.quarkus:quarkus-kafka-streams:jar:999-SNAPSHOT, io.quarkus:quarkus-smallrye-health:jar:999-SNAPSHOT, io.quarkus:quarkus-smallrye-jwt:jar:999-SNAPSHOT, io.quarkus:quarkus-smallrye-context-propagation:jar:999-SNAPSHOT, io.quarkus:quarkus-smallrye-reactive-streams-operators:jar:999-SNAPSHOT, io.quarkus:quarkus-smallrye-reactive-type-converters:jar:999-SNAPSHOT, io.quarkus:quarkus-smallrye-reactive-messaging:jar:999-SNAPSHOT, io.quarkus:quarkus-smallrye-reactive-messaging-kafka:jar:999-SNAPSHOT, io.quarkus:quarkus-smallrye-reactive-messaging-amqp:jar:999-SNAPSHOT, io.quarkus:quarkus-smallrye-reactive-messaging-mqtt:jar:999-SNAPSHOT, io.quarkus:quarkus-smallrye-metrics:jar:999-SNAPSHOT, io.quarkus:quarkus-smallrye-openapi:jar:999-SNAPSHOT, io.quarkus:quarkus-smallrye-opentracing:jar:999-SNAPSHOT, io.quarkus:quarkus-rest-client:jar:999-SNAPSHOT, io.quarkus:quarkus-resteasy-common:jar:999-SNAPSHOT, io.quarkus:quarkus-resteasy:jar:999-SNAPSHOT, io.quarkus:quarkus-resteasy-jackson:jar:999-SNAPSHOT, io.quarkus:quarkus-resteasy-jsonb:jar:999-SNAPSHOT, io.quarkus:quarkus-resteasy-jaxb:jar:999-SNAPSHOT, io.quarkus:quarkus-resteasy-server-common:jar:999-SNAPSHOT, io.quarkus:quarkus-narayana-jta:jar:999-SNAPSHOT, io.quarkus:quarkus-undertow:jar:999-SNAPSHOT, io.quarkus:quarkus-smallrye-fault-tolerance:jar:999-SNAPSHOT, io.quarkus:quarkus-vertx-core:jar:999-SNAPSHOT, io.quarkus:quarkus-vertx:jar:999-SNAPSHOT, io.quarkus:quarkus-vertx-http:jar:999-SNAPSHOT, io.quarkus:quarkus-vertx-web:jar:999-SNAPSHOT, io.quarkus:quarkus-reactive-pg-client:jar:999-SNAPSHOT, io.quarkus:quarkus-reactive-mysql-client:jar:999-SNAPSHOT, io.quarkus:quarkus-mailer:jar:999-SNAPSHOT, io.quarkus:quarkus-mongodb-client:jar:999-SNAPSHOT, io.quarkus:quarkus-undertow-websockets:jar:999-SNAPSHOT, io.quarkus:quarkus-scheduler:jar:999-SNAPSHOT, io.quarkus:quarkus-spring-di:jar:999-SNAPSHOT, io.quarkus:quarkus-spring-web:jar:999-SNAPSHOT, io.quarkus:quarkus-spring-data-jpa:jar:999-SNAPSHOT, io.quarkus:quarkus-swagger-ui:jar:999-SNAPSHOT, io.quarkus:quarkus-kotlin:jar:999-SNAPSHOT, io.quarkus:quarkus-amazon-lambda:jar:999-SNAPSHOT, io.quarkus:quarkus-amazon-lambda-resteasy:jar:999-SNAPSHOT, io.quarkus:quarkus-amazon-dynamodb:jar:999-SNAPSHOT, io.quarkus:quarkus-azure-functions-http:jar:999-SNAPSHOT, io.quarkus:quarkus-kubernetes:jar:999-SNAPSHOT, io.quarkus:quarkus-kubernetes-client:jar:999-SNAPSHOT, io.quarkus:quarkus-kogito:jar:999-SNAPSHOT, io.quarkus:quarkus-tika:jar:999-SNAPSHOT, io.quarkus:quarkus-neo4j:jar:999-SNAPSHOT, io.quarkus:quarkus-scala:jar:999-SNAPSHOT, io.quarkus:quarkus-jgit:jar:999-SNAPSHOT, io.quarkus:quarkus-narayana-stm:jar:999-SNAPSHOT, io.quarkus:quarkus-elytron-security-jdbc:jar:999-SNAPSHOT: Could not find artifact io.quarkus:quarkus-core:jar:999-SNAPSHOT
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:422)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:224)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifacts (DefaultRepositorySystem.java:268)
    at io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver.resolve (MavenArtifactResolver.java:186)
    at io.quarkus.docs.generation.AllConfigGenerator.main (AllConfigGenerator.java:72)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:282)
    at java.lang.Thread.run (Thread.java:748)
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact io.quarkus:quarkus-core:jar:999-SNAPSHOT
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:412)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:224)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifacts (DefaultRepositorySystem.java:268)
    at io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver.resolve (MavenArtifactResolver.java:186)
    at io.quarkus.docs.generation.AllConfigGenerator.main (AllConfigGenerator.java:72)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:282)
    at java.lang.Thread.run (Thread.java:748)
@gsmet

This comment has been minimized.

Copy link
Member

gsmet commented Oct 17, 2019

@FroMage could it be related to your PR?

@FroMage

This comment has been minimized.

Copy link
Member

FroMage commented Oct 17, 2019

@kenfinnigan absolutely related. Where do you get those? We fixed this in the PR that introduced that bug, so the fix should be in. It depended on passing the right Maven CLI arguments.

@kenfinnigan

This comment has been minimized.

Copy link
Member Author

kenfinnigan commented Oct 17, 2019

CI failed with that error

Do I need to rebase?

@FroMage

This comment has been minimized.

Copy link
Member

FroMage commented Oct 17, 2019

Well I don't think you can have that class without also having the fix. It involves passing the MAVEN_CMD_LINE_ARGS env var like @aloubyansky told me. CI passed for me with this. I don't get it.

@FroMage

This comment has been minimized.

Copy link
Member

FroMage commented Oct 17, 2019

Yeah, see:

<MAVEN_CMD_LINE_ARGS>${env.MAVEN_CMD_LINE_ARGS}</MAVEN_CMD_LINE_ARGS>

@FroMage

This comment has been minimized.

Copy link
Member

FroMage commented Oct 17, 2019

I can make a quick hack to catch the exception and bail out of generating that config file, but I'd like to know why this fails here.

@kenfinnigan

This comment has been minimized.

Copy link
Member Author

kenfinnigan commented Oct 17, 2019

I'm very confused what's going on if I have the fix

@FroMage

This comment has been minimized.

Copy link
Member

FroMage commented Oct 17, 2019

Do I have the right to push to your branch?

@FroMage

This comment has been minimized.

Copy link
Member

FroMage commented Oct 17, 2019

Let's take this to zulip

@@ -73,6 +73,7 @@
</arguments>
<environmentVariables>
<MAVEN_CMD_LINE_ARGS>${env.MAVEN_CMD_LINE_ARGS}</MAVEN_CMD_LINE_ARGS>
<MAVEN_LOCAL_REPO>${env.MAVEN_LOCAL_REPO}</MAVEN_LOCAL_REPO>

This comment has been minimized.

Copy link
@aloubyansky

aloubyansky Oct 17, 2019

Member

Try replacing it with <QUARKUS_LOCAL_REPO>${env.QUARKUS_LOCAL_REPO}</QUARKUS_LOCAL_REPO>

@kenfinnigan

This comment has been minimized.

Copy link
Member Author

kenfinnigan commented Oct 17, 2019

Nope, still an issue:

Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact io.quarkus:quarkus-core:jar:999-SNAPSHOT
@aloubyansky

This comment has been minimized.

Copy link
Member

aloubyansky commented Oct 17, 2019

I'll try to debug it a bit later tonoght unless you want to disable the docs generation as @FroMage suggested.

@kenfinnigan

This comment has been minimized.

Copy link
Member Author

kenfinnigan commented Oct 17, 2019

I've added a system.exit to end the main, so will see what happens

@aloubyansky

This comment has been minimized.

Copy link
Member

aloubyansky commented Oct 17, 2019

MicroProfile TCK failing? That looks like something new.

@kenfinnigan

This comment has been minimized.

Copy link
Member Author

kenfinnigan commented Oct 17, 2019

It's MP Config failing, which hasn't been updated at all.

And it's failing because of:

Could not find artifact io.quarkus:quarkus-tck-parent:pom:999-SNAPSHOT

Previously the build used to do a build with skip tests first. I wonder if that's changed

@kenfinnigan

This comment has been minimized.

Copy link
Member Author

kenfinnigan commented Oct 18, 2019

@gsmet @FroMage @aloubyansky anyone has an idea why artifacts are suddenly not being found?

MP Config TCK is failing but it's because it can't find the root tck directory artifact

@FroMage

This comment has been minimized.

Copy link
Member

FroMage commented Oct 18, 2019

Oh, so it's not just our build artifacts then?

@kenfinnigan

This comment has been minimized.

Copy link
Member Author

kenfinnigan commented Oct 18, 2019

I think it is just our build artifacts, as it's io.quarkus:quarkus-tck-parent:pom:999-SNAPSHOT

But it's not part of docs build now. It's so weird

@FroMage

This comment has been minimized.

Copy link
Member

FroMage commented Oct 18, 2019

Sorry, I meant that it's not related to my docs things now. Why haven't other PRs had this issue then?

@kenfinnigan

This comment has been minimized.

Copy link
Member Author

kenfinnigan commented Oct 18, 2019

I have no idea, but it's so annoying!

@kenfinnigan kenfinnigan force-pushed the kenfinnigan:health-update branch from f095e98 to 72ec3ac Oct 18, 2019
@kenfinnigan

This comment has been minimized.

Copy link
Member Author

kenfinnigan commented Oct 18, 2019

Nuts!

@FroMage so my hack to work around docs caused another failure:

##[error] /home/vsts/work/1/s/docs/src/main/java/io/quarkus/docs/generation/AllConfigGenerator.java(41,9): error :  /home/vsts/work/1/s/docs/src/main/java/io/quarkus/docs/generation/AllConfigGenerator.java:[41,9] unreachable statement
[ERROR] /home/vsts/work/1/s/docs/src/main/java/io/quarkus/docs/generation/AllConfigGenerator.java:[41,9] unreachable statement
[INFO] 1 error
@kenfinnigan

This comment has been minimized.

Copy link
Member Author

kenfinnigan commented Oct 18, 2019

Woohoo! @FroMage @gsmet it passed!

@aloubyansky

This comment has been minimized.

Copy link
Member

aloubyansky commented Oct 18, 2019

I am going to open a draft PR based on this one with the docs gen enabled just to debug the maven settings. I think if Stephane did it in a mojo it would work. It's painful to re-construct the maven settings in an external process.

@aloubyansky

This comment has been minimized.

Copy link
Member

aloubyansky commented Oct 19, 2019

According to the logging that I added, the environment of the maven build process is inherited by the docs generating process. So specifying env vars in the config of the plugin is not necessary. I am still not sure what's missing though.

@aloubyansky

This comment has been minimized.

Copy link
Member

aloubyansky commented Oct 20, 2019

Ok, I got it. The Maven resolver has enough info. The issue is that the docs are generated during process-classes phase, which is before install, which means the artifacts aren't yet installed into the local repo, so the Maven resolver can't find them.
What can be done here is loading the workspace by calling LocalProject.loadWorkspace(project.getBasedir()).getWorkspace() and then adding it to the MavenArtifactResolver.Builder. After that the artifact resolver will be resolving extensions as local projects, i.e. artifact.getFile() will point to the extension's target/classes dir instead of a JAR in the local maven repo. @FroMage

@aloubyansky

This comment has been minimized.

Copy link
Member

aloubyansky commented Oct 20, 2019

The issue is that the docs are generated during process-classes phase, which is before install, which means the artifacts aren't yet installed into the local repo, so the Maven resolver can't find them.

Actually, sorry, that's not the actual reason. It's because our pipeline is configured to do package instead of install at the caching phase. That's why the artifacts are not getting installed.

Copy link
Member

gsmet left a comment

Can the commits be cleaned up?

Especially with #4687 now in.

Thanks!

@FroMage

This comment has been minimized.

Copy link
Member

FroMage commented Oct 21, 2019

The way I understand #4687 we can re-enable the doc generation in this PR, since it will work. It just has to run after we install the rest of the artifacts and not in the caching phase, which is the case now.

@gsmet

This comment has been minimized.

Copy link
Member

gsmet commented Oct 21, 2019

Yes, this PR should only contain the Health upgrade in a single commit and things should work now.

If it doesn't get cleaned up soon, I'll move it to the next release.

@gsmet gsmet modified the milestones: 0.26.0, 0.27.0 Oct 21, 2019
@gsmet gsmet added the backport? label Oct 21, 2019
@kenfinnigan kenfinnigan force-pushed the kenfinnigan:health-update branch from 164df80 to 9a4a85b Oct 21, 2019
@kenfinnigan

This comment has been minimized.

Copy link
Member Author

kenfinnigan commented Oct 21, 2019

I've gone back to just the original commit and rebased on master

@gsmet
gsmet approved these changes Oct 21, 2019
@gsmet gsmet merged commit bd19469 into quarkusio:master Oct 21, 2019
23 checks passed
23 checks passed
WIP Ready for review
Details
quarkusio.quarkus Build #20191021.34 succeeded
Details
quarkusio.quarkus (Build for Native Build JDK8 Linux) Build for Native Build JDK8 Linux succeeded
Details
quarkusio.quarkus (Maven Cache Linux Maven Repo) Maven Cache Linux Maven Repo succeeded
Details
quarkusio.quarkus (Maven Cache Windows Maven Repo) Maven Cache Windows Maven Repo succeeded
Details
quarkusio.quarkus (Native Tests amazon-dynamodb, amazon-lambda) Native Tests amazon-dynamodb, amazon-lambda succeeded
Details
quarkusio.quarkus (Native Tests artemis-core, artemis-jms, kafka) Native Tests artemis-core, artemis-jms, kafka succeeded
Details
quarkusio.quarkus (Native Tests elytron-security-oauth2, elytron-security, oidc) Native Tests elytron-security-oauth2, elytron-security, oidc succeeded
Details
quarkusio.quarkus (Native Tests flyway, hibernate-orm-panache, reactive-pg-client) Native Tests flyway, hibernate-orm-panache, reactive-pg-client succeeded
Details
quarkusio.quarkus (Native Tests hibernate-search-elasticsearch) Native Tests hibernate-search-elasticsearch succeeded
Details
quarkusio.quarkus (Native Tests infinispan-cache-jpa, infinispan-client, mongodb-client, mongodb-panache, neo4j, narayana-stm) Native Tests infinispan-cache-jpa, infinispan-client, mongodb-client, mongodb-panache, neo4j, narayana-stm succeeded
Details
quarkusio.quarkus (Native Tests jackson, jgit, kogito, kubernetes-client) Native Tests jackson, jgit, kogito, kubernetes-client succeeded
Details
quarkusio.quarkus (Native Tests jpa, jpa-postgresql, jpa-mysql) Native Tests jpa, jpa-postgresql, jpa-mysql succeeded
Details
quarkusio.quarkus (Native Tests jpa-h2, jpa-mariadb, jpa-mssql, jpa-derby) Native Tests jpa-h2, jpa-mariadb, jpa-mssql, jpa-derby succeeded
Details
quarkusio.quarkus (Native Tests main) Native Tests main succeeded
Details
quarkusio.quarkus (Native Tests resteasy-jackson, vertx, vertx-http, virtual-http) Native Tests resteasy-jackson, vertx, vertx-http, virtual-http succeeded
Details
quarkusio.quarkus (Native Tests spring-di, spring-web, spring-data-jpa) Native Tests spring-di, spring-web, spring-data-jpa succeeded
Details
quarkusio.quarkus (Native Tests tika, hibernate-validator, test-extension) Native Tests tika, hibernate-validator, test-extension succeeded
Details
quarkusio.quarkus (Run JVM Tests Build JDK8 Linux) Run JVM Tests Build JDK8 Linux succeeded
Details
quarkusio.quarkus (Run JVM Tests Linux JDK11 Build) Run JVM Tests Linux JDK11 Build succeeded
Details
quarkusio.quarkus (Run JVM Tests Linux JDK12 Build) Run JVM Tests Linux JDK12 Build succeeded
Details
quarkusio.quarkus (Run JVM Tests Run_TCKs) Run JVM Tests Run_TCKs succeeded
Details
quarkusio.quarkus (Run JVM Tests Windows JVM Build) Run JVM Tests Windows JVM Build succeeded
Details
@gsmet

This comment has been minimized.

Copy link
Member

gsmet commented Oct 21, 2019

Merged, thanks!

@gsmet gsmet modified the milestones: 0.27.0, 0.26.0 Oct 21, 2019
@gsmet gsmet removed the backport? label Oct 21, 2019
@kenfinnigan kenfinnigan deleted the kenfinnigan:health-update branch Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.