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

Fix recommended release selection in an archived platform stream #46452

Merged

Conversation

aloubyansky
Copy link
Member

Fix #46436

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/platform Issues related to definition and interaction with Quarkus Platform labels Feb 24, 2025
@aloubyansky aloubyansky added triage/backport-3.15 triage/backport-3.18 triage/backport and removed area/platform Issues related to definition and interaction with Quarkus Platform area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins labels Feb 24, 2025
@gsmet
Copy link
Member

gsmet commented Feb 24, 2025

Maybe a stupid question but why are archived streams behaving differently? I mean why don't we keep the info around anyway?

Copy link
Contributor

@ia3andy ia3andy left a comment

Choose a reason for hiding this comment

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

Thanks @aloubyansky this is perfect!

$ qss update -S=3.17

[INFO] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[INFO]
[INFO] Suggested Quarkus platform BOM(s) update:
[INFO]  +       [io.quarkus.platform:quarkus-bom:pom:3.17.8] to add
[INFO]  -       [io.quarkus:quarkus-bom:pom:3.17.1] to remove
[INFO]
[INFO] Suggested extensions updates for 'io.quarkus.platform:quarkus-bom':
[INFO]  ✔       io.quarkus:quarkus-arc (synced with BOM)
[INFO]
[INFO] Suggested extensions updates from other origins:
[INFO]  ~       io.quarkiverse.roq:quarkus-roq-plugin-aliases:[1.3.0 -> 1.2.0]
[INFO]  ~       io.quarkiverse.roq:quarkus-roq-plugin-series:[1.3.0 -> 1.2.0]
[INFO]  ~       io.quarkiverse.roq:quarkus-roq:[1.3.0 -> 1.2.0]
[INFO]  ~       io.quarkiverse.roq:quarkus-roq-plugin-tagging:[1.3.0 -> 1.2.0]
[INFO]  ~       io.quarkiverse.roq:quarkus-roq-plugin-qrcode:[1.3.0 -> 1.2.0]
[INFO]  ~       io.quarkiverse.roq:quarkus-roq-plugin-sitemap:[1.3.0 -> 1.2.0]
[INFO]
[INFO] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@aloubyansky
Copy link
Member Author

Maybe a stupid question but why are archived streams behaving differently? I mean why don't we keep the info around anyway?

First, not a stupid question. I am not sure what you mean by keeping the info around but there is indeed inconsistency that we could address.

First, there is a split between recommended streams and the rest (what is referred to as "archived" in the test API). That's done to reduce the scope of metadata used when searching for releases that satisfy extension selection requirements.

The difference is that when a user provides a stream option, we first check whether the stream is among the currently recommended streams (by calling https://registry.quarkus.io/q/swagger-ui/#/Client/get_client_platforms) or not, in which case we call https://registry.quarkus.io/q/swagger-ui/#/Client/get_client_platforms_all.
(We don't actually call the REST endpoints, we communicate through the Maven "interface" but that's equivalent. The reason it's a detail, is because it's not as flexible as REST can be, although we've been pretty creative so far).

get_client_platforms and get_client_platforms_all work differently. The former one not only returns recommended platforms but includes only their recommended releases. The latter returns the whole history of releases. So the inconsistency is in the range or releases for a stream that happens to be recommended and for one that is "archived".

It can be solved in a few ways:

  1. When a user provides a stream option we can always use get_client_platforms_all, it's not the most efficient one though.
  2. We could limit the range to the last release for archived releases when processing the result of get_client_platforms_all.
  3. We could develop another endpoint in the registry that would provide a list of releases in a given stream, instead of downloading all the platforms in the history and possibly have an option to limit it to the recommended release in that stream (we'd also need to figure out a way to express that through Maven artifacts).

I think we'll end up implementing 3 at some point in the future.

@aloubyansky
Copy link
Member Author

Note that for 2 and 3 with the option to limit to the recommended release, there may be an edge case that will break (I added a test for it in this PR with a comment).

@aloubyansky
Copy link
Member Author

fyi @gastaldi

Copy link

quarkus-bot bot commented Feb 24, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 24fac49.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 17

📦 extensions/micrometer/deployment

io.quarkus.micrometer.deployment.binder.VertxTcpMetricsTest.testTcpMetrics - History

  • event executor terminated - java.util.concurrent.RejectedExecutionException
java.util.concurrent.RejectedExecutionException: event executor terminated
	at io.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:934)
	at io.netty.util.concurrent.SingleThreadEventExecutor.offerTask(SingleThreadEventExecutor.java:353)
	at io.netty.util.concurrent.SingleThreadEventExecutor.addTask(SingleThreadEventExecutor.java:346)
	at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:836)
	at io.netty.util.concurrent.SingleThreadEventExecutor.execute0(SingleThreadEventExecutor.java:827)
	at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:817)
	at io.vertx.core.impl.EventLoopExecutor.execute(EventLoopExecutor.java:35)

⚙️ JVM Tests - JDK 21

📦 extensions/panache/hibernate-reactive-rest-data-panache/deployment

io.quarkus.hibernate.reactive.rest.data.panache.deployment.entity.PanacheEntityResourcePutMethodTest.shouldUpdateComplexObject - History

  • 1 expectation failed. JSON path name doesn't match. Expected: is "updated collection" Actual: empty collection - java.lang.AssertionError
java.lang.AssertionError: 
1 expectation failed.
JSON path name doesn't match.
Expected: is "updated collection"
  Actual: empty collection

	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)

⚙️ JVM Tests - JDK 17 Windows

📦 extensions/hibernate-orm/deployment

io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest.testFieldAccess - History

  • Expecting actual not to be null - java.lang.AssertionError
java.lang.AssertionError: 

Expecting actual not to be null
	at io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest$FieldAccessEnhancedDelegate$1.assertValue(PublicFieldAccessInheritanceTest.java:141)
	at io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest.doTestFieldAccess(PublicFieldAccessInheritanceTest.java:100)
	at io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest.testFieldAccess(PublicFieldAccessInheritanceTest.java:61)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at io.quarkus.test.QuarkusUnitTest.runExtensionMethod(QuarkusUnitTest.java:513)

📦 extensions/micrometer-opentelemetry/deployment

io.quarkus.micrometer.opentelemetry.deployment.compatibility.MicrometerTimedInterceptorTest.testTimeMethod_UniFailed - History

  • Stream has no elements - java.lang.IllegalArgumentException
java.lang.IllegalArgumentException: Stream has no elements
	at io.quarkus.micrometer.opentelemetry.deployment.common.MetricDataFilter.lastReadingDataPoint(MetricDataFilter.java:236)
	at io.quarkus.micrometer.opentelemetry.deployment.compatibility.MicrometerTimedInterceptorTest.testTimeMethod_UniFailed(MicrometerTimedInterceptorTest.java:202)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at io.quarkus.test.QuarkusUnitTest.runExtensionMethod(QuarkusUnitTest.java:513)
	at io.quarkus.test.QuarkusUnitTest.interceptTestMethod(QuarkusUnitTest.java:427)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

⚙️ JVM Integration Tests - JDK 21

📦 integration-tests/virtual-threads/mailer-virtual-threads

io.quarkus.virtual.mail.RunOnVirtualThreadTest.test - History

  • Read timed out - java.net.SocketTimeoutException
java.net.SocketTimeoutException: Read timed out
	at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:278)
	at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:304)
	at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:346)
	at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:796)
	at java.base/java.net.Socket$SocketInputStream.read(Socket.java:1099)
	at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:161)
	at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:82)

@aloubyansky aloubyansky merged commit 8ff5400 into quarkusio:main Feb 24, 2025
58 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.21 - main milestone Feb 24, 2025
@gsmet gsmet modified the milestones: 3.21 - main, 3.19.1 Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quarkus tooling use wrong version for create and update (when specifying stream)
4 participants