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

Init bootstrap gradle plugin #19067

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

glefloch
Copy link
Member

This branch introduce a new Gradle boostrap plugin that will help extension developer if they want to use gradle.
This is a first step that only generate the quarkus-extension.properties file and does not handle capabilities for now.

One issue I see so far, is that the group id of the project corresponds to the plugin name, in that case io.quarkus.bootstrap.
Can that be an issue when publishing artifacts?

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle area/maven labels Jul 28, 2021
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
=======
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
>>>>>>> d232aad03c (Add wrapper)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a leftover from a merge?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, this is a mistake.

@aloubyansky
Copy link
Member

I am not sure bootstrap is the right place for it though. Which is also true for the corresponding Maven goal. It's related to the extension building. Perhaps it should be io.quarkus.extension plugin or something.

@quarkus-bot

This comment has been minimized.

@glefloch glefloch force-pushed the feat/gradle-bootstrap-plugin branch from 5a330d4 to f439bd1 Compare July 29, 2021 07:07
@glefloch
Copy link
Member Author

@aloubyansky, I fixed the conflict and renamed the plugin. Should I move it somewhere else or is independent-projects/bootstrap ok for now?

@aloubyansky
Copy link
Member

Perhaps we could make https://github.com/quarkusio/quarkus/tree/main/devtools/gradle a common parent for the io.quarkus and io.quarkus.extension plugins?

@aloubyansky
Copy link
Member

It could probably be a multi-module gradle project?

@aloubyansky
Copy link
Member

Not sure though whether it helps from the release/publishing perspective.

@aloubyansky
Copy link
Member

We'll need to start some "Quarkus extension development with Gradle" docs too :)

@glefloch
Copy link
Member Author

We could move it under ˋdevtools/gradle` but not sure if it helps..
regarding docs, I wanted that the plug-in was able to write both descriptor file before writing it.
WDYT?

@quarkus-bot
Copy link

quarkus-bot bot commented Jul 29, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building f439bd1

Status Name Step Test failures Logs Raw logs
Gradle Tests - JDK 11 Windows Build ⚠️ Check → Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 16 Build ⚠️ Check → Logs Raw logs

⚠️ Errors occurred while downloading the Surefire reports. This report is incomplete.

@aloubyansky
Copy link
Member

I thought that way both plugins could share a common parent config and would be built and released at the same time. Otherwise, if they are two independent projects they would have to be released kind of separately. Or is it not exactly true? @gsmet, wdyt?

As to docs, sure, they can take time.

@glefloch
Copy link
Member Author

Yes I think that would make sense to release both plugin at the same time. And the gradle part would be only in one place.

@glefloch glefloch force-pushed the feat/gradle-bootstrap-plugin branch from f439bd1 to 190490a Compare July 30, 2021 12:53
@glefloch
Copy link
Member Author

@aloubyansky I created a multi-module gradle project that contains both plugins.


testImplementation "io.quarkus:quarkus-project-core-extension-codestarts:${version}"
testImplementation 'org.assertj:assertj-core:3.20.2'
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.2'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above versions seem to be common for both plugins, could we define them in the parent project?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh right, fixed, with other common dependencies.

@aloubyansky
Copy link
Member

@gsmet we should check how this will affect the release process/scripts.

@quarkus-bot
Copy link

quarkus-bot bot commented Jul 30, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 190490a

Status Name Step Test failures Logs Raw logs
Initial JDK 11 Build Build ⚠️ Check → Logs Raw logs

@glefloch glefloch force-pushed the feat/gradle-bootstrap-plugin branch from 190490a to 149651e Compare July 30, 2021 13:50
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 30, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 149651e

Status Name Step Test failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 11 Windows Build ⚠️ Check → Logs Raw logs
JVM Tests - JDK 16 Build ⚠️ Check → Logs Raw logs

@glefloch glefloch force-pushed the feat/gradle-bootstrap-plugin branch from 149651e to bbe14c4 Compare August 3, 2021 19:50
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 3, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building bbe14c4

Status Name Step Test failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 11 Windows Build ⚠️ Check → Logs Raw logs
JVM Tests - JDK 16 Build ⚠️ Check → Logs Raw logs

@glefloch glefloch force-pushed the feat/gradle-bootstrap-plugin branch from bbe14c4 to 9b54bd6 Compare August 6, 2021 11:49
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 6, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 9b54bd6

Status Name Step Test failures Logs Raw logs
Gradle Tests - JDK 11 Windows Build ⚠️ Check → Logs Raw logs
JVM Tests - JDK 11 Build Test failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Test failures Logs Raw logs
JVM Tests - JDK 16 Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 11 #

📦 extensions/scheduler/deployment

io.quarkus.scheduler.test.metrics.MicrometerTimedTest.testTimedMethod line 51 - More details - Source on GitHub

io.micrometer.core.instrument.search.MeterNotFoundException: 
Unable to find a meter that matches all the requirements at once. Here's what was found:
   FAIL: No meter with name 'scheduled.methods' was found.
   OK: Meters with type timer were found.
   FAIL: No meters have the required tag 'method'.
   FAIL: No meters have the required tag 'class'.
   FAIL: No meters have the required tag 'exception'.
	at io.micrometer.core.instrument.search.MeterNotFoundException$FromRequiredSearch.build(MeterNotFoundException.java:228)
	at io.micrometer.core.instrument.search.MeterNotFoundException$FromRequiredSearch.access$100(MeterNotFoundException.java:46)
	at io.micrometer.core.instrument.search.MeterNotFoundException.forSearch(MeterNotFoundException.java:43)
	at io.micrometer.core.instrument.search.RequiredSearch.findOne(RequiredSearch.java:199)
	at io.micrometer.core.instrument.search.RequiredSearch.timer(RequiredSearch.java:122)
	at io.quarkus.scheduler.test.metrics.MicrometerTimedTest.te...

⚙️ JVM Tests - JDK 11 Windows #

📦 extensions/opentelemetry/opentelemetry/deployment

io.quarkus.opentelemetry.deployment.OpenTelemetryContinuousTestingTest.testContinuousTesting line 35 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Failed to wait for test run2 TestStatus{lastRun=1, running=2, testsRun=1, testsPassed=1, testsFailed=0, testsSkipped=0}
	at io.quarkus.vertx.http.testrunner.ContinuousTestingTestUtils.waitForNextCompletion(ContinuousTestingTestUtils.java:44)
	at io.quarkus.opentelemetry.deployment.OpenTelemetryContinuousTestingTest.testContinuousTesting(OpenTelemetryContinuousTestingTest.java:35)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.e...

⚙️ JVM Tests - JDK 16 #

📦 extensions/scheduler/deployment

io.quarkus.scheduler.test.metrics.MicrometerTimedTest.testTimedMethod line 51 - More details - Source on GitHub

io.micrometer.core.instrument.search.MeterNotFoundException: 
Unable to find a meter that matches all the requirements at once. Here's what was found:
   FAIL: No meter with name 'scheduled.methods' was found.
   OK: A meter with type timer was found.
   FAIL: No meters have the required tag 'method'.
   FAIL: No meters have the required tag 'class'.
   FAIL: No meters have the required tag 'exception'.
	at io.micrometer.core.instrument.search.MeterNotFoundException$FromRequiredSearch.build(MeterNotFoundException.java:228)
	at io.micrometer.core.instrument.search.MeterNotFoundException$FromRequiredSearch.access$100(MeterNotFoundException.java:46)
	at io.micrometer.core.instrument.search.MeterNotFoundException.forSearch(MeterNotFoundException.java:43)
	at io.micrometer.core.instrument.search.RequiredSearch.findOne(RequiredSearch.java:199)
	at io.micrometer.core.instrument.search.RequiredSearch.timer(RequiredSearch.java:122)
	at io.quarkus.scheduler.test.metrics.MicrometerTimedTest.te...

📦 integration-tests/oidc-wiremock

io.quarkus.it.keycloak.BearerOpaqueTokenAuthorizationTest.testSecureAccessSuccessPreferredUsername line 26 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
Expected status code <200> but was <500>.

	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:277)
	at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate...

io.quarkus.it.keycloak.BearerOpaqueTokenAuthorizationTest.testDeniedAccessAdminResource line 47 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
Expected status code <403> but was <500>.

	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:277)
	at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate...

io.quarkus.it.keycloak.BearerTokenAuthorizationTest.testSecureAccessSuccessPreferredUsername line 29 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
Expected status code <200> but was <500>.

	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallS...

io.quarkus.it.keycloak.BearerTokenAuthorizationTest.testAccessAdminResource line 39 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
Expected status code <200> but was <500>.

	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:277)
	at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate...

@glefloch glefloch force-pushed the feat/gradle-bootstrap-plugin branch from 9b54bd6 to 8f59a5b Compare August 16, 2021 06:26
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 16, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 8f59a5b

Status Name Step Test failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 11 Windows Build ⚠️ Check → Logs Raw logs
JVM Tests - JDK 16 Build ⚠️ Check → Logs Raw logs

⚠️ Errors occurred while downloading the Surefire reports. This report is incomplete.

@glefloch glefloch force-pushed the feat/gradle-bootstrap-plugin branch 2 times, most recently from dabe400 to 422e8b7 Compare August 18, 2021 11:49
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 18, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 422e8b7

Status Name Step Test failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 16 Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 16 #

📦 extensions/smallrye-reactive-messaging-kafka/deployment

io.quarkus.smallrye.reactivemessaging.kafka.deployment.testing.KafkaDevServicesContinuousTestingTestCase.testContinuousTestingScenario1 line 64 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: expected: <1> but was: <0>
	at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
	at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:166)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:161)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:611)
	at io.quarkus.smallrye.reactivemessaging.kafka.deployment.testing.KafkaDevServicesContinuousTestingTestCase.testContinuousTestingScenario1(KafkaDevServicesContinuousTestingTestCase.java:64)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at org.junit.pla...

@gsmet gsmet dismissed their stale review August 20, 2021 09:05

2.3 has been released.

@gsmet
Copy link
Member

gsmet commented Aug 20, 2021

@glefloch @famod @aloubyansky I suggest we wait for the Gradle 7.2 upgrade to get in before rebasing and merging this one.

@glefloch glefloch force-pushed the feat/gradle-bootstrap-plugin branch from 422e8b7 to d7b5d3c Compare August 20, 2021 12:49
@glefloch
Copy link
Member Author

@gsmet sure, I rebased my branch to check if everything works with gradle 7.

@glefloch
Copy link
Member Author

@gsmet can we merge this one?

@glefloch glefloch force-pushed the feat/gradle-bootstrap-plugin branch from d7b5d3c to 9f7b523 Compare September 16, 2021 15:46
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 16, 2021

Failing Jobs - Building 9f7b523

Status Name Step Failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 16 Build ⚠️ Check → Logs Raw logs

@aloubyansky
Copy link
Member

@glefloch is it good to merge in your opinion?

@glefloch
Copy link
Member Author

I think so, most annoying gradle issues have been a fix.
However, this introduce a new artifact with a new group ˋio.quarkus.extension` I don’t know if this have any impact..

@aloubyansky
Copy link
Member

@geoand I would merge it ASAP but I'd like to make sure we are prepared to release it. It is second Gradle plugin.

@aloubyansky
Copy link
Member

aloubyansky commented Sep 17, 2021

@glefloch please write at least a little doc describing how to use it and what it does. It could be in a separate PR.

@geoand
Copy link
Contributor

geoand commented Sep 17, 2021

Gotcha!

@geoand geoand merged commit 169b145 into quarkusio:main Sep 17, 2021
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Sep 17, 2021
@geoand
Copy link
Contributor

geoand commented Sep 17, 2021

@gastaldi IIRC you handled the details of releasing the original plugin the first time around?

@glefloch glefloch deleted the feat/gradle-bootstrap-plugin branch September 17, 2021 07:00
@glefloch
Copy link
Member Author

@aloubyansky yes, I'm taking care of the doc today.

@gastaldi
Copy link
Contributor

@gastaldi IIRC you handled the details of releasing the original plugin the first time around?

Yes, that's right.

@geoand
Copy link
Contributor

geoand commented Sep 17, 2021

So we'll probably summon you next week :)

@gastaldi
Copy link
Contributor

Publishing is easy, you can use the same token for the original plugin: https://github.com/quarkusio/quarkus-release/blob/main/release-gradle-plugin.sh#L24

@geoand
Copy link
Contributor

geoand commented Sep 17, 2021

We'll give it a shot :)

@glefloch
Copy link
Member Author

glefloch commented Sep 17, 2021

I think this should still work and publish both plugins

@aloubyansky
Copy link
Member

@glefloch little follow up request. Could you please add gradle- prefixes to the plugin Maven modules? So they appear under the gradle- prefix in the IDE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle area/maven
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants