quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.82k stars 2.69k forks source link

Quarkus CLI failes to resolve extension catalog on created app as expected checksum is empty string #32266

Closed michalvavrik closed 1 year ago

michalvavrik commented 1 year ago

Describe the bug

I created app and meant to list extensions, but that's not possible with the 999-SNAPSHOT.

Expected behavior

I can list extensions.

Actual behavior

Command fails.

[ERROR] ❗  Unable to list extensions: Failed to resolve extension catalog

and warning

12:55:53,816 INFO  Looking for the newly published extensions in registry.quarkus.io
12:56:00,708 INFO  2023-03-30 12:55:59,612 WARN  [org.ecl.aet.int.imp.WarnChecksumPolicy] (main) Could not validate integrity of download from https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-platforms/1.0-SNAPSHOT/quarkus-platforms-1.0-SNAPSHOT-999-SNAPSHOT.json: org.eclipse.aether.transfer.ChecksumFailureException: Checksum validation failed, expected '' (REMOTE_EXTERNAL) but is actually 'da39a3ee5e6b4b0d3255bfef95601890afd80709'
12:56:00,712 INFO   at org.eclipse.aether.connector.basic.ChecksumValidator.validateExternalChecksums(ChecksumValidator.java:179)
12:56:00,713 INFO   at org.eclipse.aether.connector.basic.ChecksumValidator.validate(ChecksumValidator.java:109)
12:56:00,716 INFO   at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:484)
12:56:00,717 INFO   at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:414)
12:56:00,717 INFO   at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:260)
12:56:00,717 INFO   at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:516)
12:56:00,718 INFO   at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:433)
12:56:00,719 INFO   at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:261)
12:56:00,719 INFO   at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:242)
12:56:00,720 INFO   at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:277)
12:56:00,721 INFO   at io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver.resolveInternal(MavenArtifactResolver.java:164)
12:56:00,722 INFO   at io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver.resolve(MavenArtifactResolver.java:154)
12:56:00,722 INFO   at io.quarkus.registry.client.maven.MavenRegistryArtifactResolverWithCleanup.resolveAndCleanupOldTimestampedVersions(MavenRegistryArtifactResolverWithCleanup.java:76)
12:56:00,726 INFO   at io.quarkus.registry.client.maven.MavenRegistryArtifactResolverWithCleanup.resolveArtifact(MavenRegistryArtifactResolverWithCleanup.java:37)
12:56:00,726 INFO   at io.quarkus.registry.client.maven.MavenPlatformsResolver.resolvePlatforms(MavenPlatformsResolver.java:41)
12:56:00,727 INFO   at io.quarkus.registry.client.RegistryClientDispatcher.resolvePlatforms(RegistryClientDispatcher.java:38)
12:56:00,727 INFO   at io.quarkus.registry.RegistryExtensionResolver.resolvePlatformCatalog(RegistryExtensionResolver.java:86)
12:56:00,727 INFO   at io.quarkus.registry.ExtensionCatalogResolver.collectPlatformExtensions(ExtensionCatalogResolver.java:775)
12:56:00,727 INFO   at io.quarkus.registry.ExtensionCatalogResolver.resolveExtensionCatalog(ExtensionCatalogResolver.java:479)
12:56:00,728 INFO   at io.quarkus.registry.ExtensionCatalogResolver.resolveExtensionCatalog(ExtensionCatalogResolver.java:715)
12:56:00,728 INFO   at io.quarkus.devtools.project.buildfile.MavenProjectBuildFile.getProject(MavenProjectBuildFile.java:105)
12:56:00,728 INFO   at io.quarkus.devtools.project.buildfile.MavenProjectBuildFile.getProject(MavenProjectBuildFile.java:76)
12:56:00,728 INFO   at io.quarkus.devtools.project.buildfile.MavenProjectBuildFile.getProject(MavenProjectBuildFile.java:65)
12:56:00,729 INFO   at io.quarkus.cli.build.MavenRunner.quarkusProject(MavenRunner.java:90)
12:56:00,729 INFO   at io.quarkus.cli.build.MavenRunner.listExtensions(MavenRunner.java:112)
12:56:00,729 INFO   at io.quarkus.cli.ProjectExtensionsList.call(ProjectExtensionsList.java:82)
12:56:00,729 INFO   at io.quarkus.cli.ProjectExtensionsList.call(ProjectExtensionsList.java:21)
12:56:00,730 INFO   at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
12:56:00,730 INFO   at picocli.CommandLine.access$1500(CommandLine.java:148)
12:56:00,730 INFO   at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
12:56:00,730 INFO   at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
12:56:00,731 INFO   at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
12:56:00,731 INFO   at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
12:56:00,731 INFO   at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
12:56:00,731 INFO   at picocli.CommandLine.execute(CommandLine.java:2170)
12:56:00,732 INFO   at io.quarkus.cli.QuarkusCli.run(QuarkusCli.java:108)
12:56:00,732 INFO   at io.quarkus.cli.QuarkusCli_ClientProxy.run(Unknown Source)
12:56:00,732 INFO   at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:132)
12:56:00,732 INFO   at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
12:56:00,732 INFO   at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
12:56:00,733 INFO   at io.quarkus.cli.Main.main(Main.java:9)

How to Reproduce?

cat <<EOF > ./quarkus-dev-cli
#!/bin/bash
java -jar /home/mvavrik/.m2/repository/io/quarkus/quarkus-cli/999-SNAPSHOT/quarkus-cli-999-SNAPSHOT-runner.jar "\$@"
EOF
chmod +x ./quarkus-dev-cli
./quarkus-dev-cli create app app --platform-bom=io.quarkus:quarkus-bom:999-SNAPSHOT
cd app
./../quarkus-dev-cli extension list --id

Output of uname -a or ver

Linux

Output of java -version

openjdk 17.0.4 2022-07-19

GraalVM version (if different from Java)

OpenJDK Runtime Environment GraalVM CE 22.3

Quarkus version or git rev

999-SNAPSHOT

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

Apache Maven 3.8.6

Additional information

No response

quarkus-bot[bot] commented 1 year ago

/cc @ebullient (cli), @maxandersen (cli)

michalvavrik commented 1 year ago

/cc @aloubyansky

rsvoboda commented 1 year ago

The url should be imo https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-platforms/1.0-SNAPSHOT/quarkus-platforms-1.0-SNAPSHOT.json

aloubyansky commented 1 year ago

The URL is OK. It is using 999-SNAPSHOT as a target Quarkus version. @gastaldi this looks like a registry issue, could you have a look, please? https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-platforms/1.0-SNAPSHOT/quarkus-platforms-1.0-SNAPSHOT-999-SNAPSHOT.json results in an empty file, as well as the sha1 checksum for it. It should simply return 404 in case the version isn't recognized.

gastaldi commented 1 year ago

Apparently the DB Postgres image in our production server was bumped and that crashed the DB pods. I'm working on it

gastaldi commented 1 year ago

Database is back up, but the URL is still returning empty, I'm still on it

gastaldi commented 1 year ago

@aloubyansky the current behavior is to return HTTP/1.1 204 No Content when the Platform exists but the requested version does not. I'll change it to return 404 instead in this case

aloubyansky commented 1 year ago

@gastaldi didn't the registry change in some way recently? I thought it was working before?

aloubyansky commented 1 year ago

No, it's not the registry. 2.16.2.Final CLI works, so it's a change in the Maven resolver version.

gastaldi commented 1 year ago

The change was deployed in registry.quarkus.io and I don't see the issue happening. Can you confirm @michalvavrik?

aloubyansky commented 1 year ago

Thanks @gastaldi!

michalvavrik commented 1 year ago

@gastaldi fixed, thank you