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

Unable to push to registry due to group requirement #30240

Closed
snowe2010 opened this issue Jan 7, 2023 · 4 comments
Closed

Unable to push to registry due to group requirement #30240

snowe2010 opened this issue Jan 7, 2023 · 4 comments
Labels
area/container-image kind/bug Something isn't working

Comments

@snowe2010
Copy link

Describe the bug

For some reason, the quarkus docker plugin requires a group name. #1300 (comment)

This is incorrect. With private ECR registries on AWS there is no need for a group. You push directly to the registry/image name. This restriction seems very arbitrary and should be removed.

Expected behavior

I expect to be able to push to a repository like 1234.dkr.ecr.us-west-2.amazonaws.com/quarkusio without needing a user or group.

Actual behavior

Attempting to set the group to something like

quarkus.container-image.group=""

results in an error message:

(Maven)

Error:  Failed to execute goal io.quarkus:quarkus-maven-plugin:2.15.1.Final:build (default) on project availability: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
Error: [ERROR] 	[error]: Build step io.quarkus.container.image.deployment.ContainerImageProcessor#publishImageInfo threw an exception: java.lang.IllegalArgumentException: The supplied combination of container-image group '""' and name 'availability' is invalid
Error:  	at io.quarkus.container.image.deployment.ContainerImageProcessor.publishImageInfo(ContainerImageProcessor.java:90)
Error:  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error:  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
Error:  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error:  	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
Error:  	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
Error:  	at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
Error:  	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
Error:  	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
Error:  	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
Error:  	at java.base/java.lang.Thread.run(Thread.java:833)
Error:  	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Error:  -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error: Process completed with exit code 1.

(Gradle)

* What went wrong:
Execution failed for task ':quarkusBuild'.
> io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.container.image.deployment.ContainerImageProcessor#publishImageInfo threw an exception: java.lang.IllegalArgumentException: The supplied combination of container-image group '""' and name 'docker-group-requirement' is invalid
        at io.quarkus.container.image.deployment.ContainerImageProcessor.publishImageInfo(ContainerImageProcessor.java:90)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:577)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
        at java.base/java.lang.Thread.run(Thread.java:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)

How to Reproduce?

Run ./gradlew build

docker-group-requirement.zip

Output of uname -a or ver

Darwin SR-MB-502963 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 arm64

Output of java -version

openjdk version "17.0.4" 2022-07-19 OpenJDK Runtime Environment GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06) OpenJDK 64-Bit Server VM GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.15.1, 2.15.2

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

------------------------------------------------------------ Gradle 7.5.1 ------------------------------------------------------------ Build time: 2022-08-05 21:17:56 UTC Revision: d1daa0cbf1a0103000b71484e1dbfe096e095918 Kotlin: 1.6.21 Groovy: 3.0.10 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 18 (Oracle Corporation 18+36-2087) OS: Mac OS X 12.6 aarch64

Additional information

No response

@snowe2010 snowe2010 added the kind/bug Something isn't working label Jan 7, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Jan 7, 2023

/cc @evanchooly(kotlin), @geoand(kotlin)

@geoand
Copy link
Contributor

geoand commented Jan 9, 2023

We actually use code from Jib for this, so I would propose asking the Jib folks about this.

@snowe2010
Copy link
Author

The corresponding Jib code allows for a null user so it still seems like the issue is on quarkus's side.

@geoand
Copy link
Contributor

geoand commented Jan 10, 2023

The code you linked to is not the user for the repository, it's for the OS user as which the process in the container will run.

@geoand geoand closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/container-image kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants