seqeralabs / wave

On-demand containers provisioning service
https://seqera.io/wave/
GNU Affero General Public License v3.0
34 stars 4 forks source link

Getting Missing credentials for target cache repository even after adding credentials in platform #580

Open munishchouhan opened 3 months ago

munishchouhan commented 3 months ago

Getting this error in master: Note: not getting this error in branch 563-invalid-error-when-pulling-a-failing-build

18:27:27.539 [io-executor-thread-2] DEBUG i.s.w.s.i.ContainerInspectServiceImpl - Build credentials for repository: alpine => RegistryCredentials[username=username; password=dck****]
18:27:27.553 [io-executor-thread-3] WARN  io.seqera.wave.ErrorHandler - Missing credentials for target cache repository: docker.io/hrma017/dev - Request: POST /v1alpha2/container
io.seqera.wave.exception.BadRequestException: Missing credentials for target cache repository: docker.io/hrma017/dev
    at io.seqera.wave.service.inspect.ContainerInspectServiceImpl.credentialsConfigJson(ContainerInspectServiceImpl.groovy:99)
    at io.seqera.wave.controller.ContainerController.makeBuildRequest(ContainerController.groovy:316)
    at io.seqera.wave.controller.ContainerController.makeRequestData(ContainerController.groovy:398)
    at io.seqera.wave.controller.ContainerController.handleRequest(ContainerController.groovy:234)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    at java.base/java.lang.reflect.Method.invoke(Method.java:578)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1268)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
    at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:1036)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:1019)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethodSafe(InvokerHelper.java:97)
    at io.seqera.wave.controller.ContainerController$_getContainerImpl_lambda1.doCall(ContainerController.groovy:199)
    at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
    at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
    at java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:614)
    at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:653)
    at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
    at io.micrometer.core.instrument.composite.CompositeTimer.record(CompositeTimer.java:141)
    at io.micrometer.core.instrument.Timer.lambda$wrap$0(Timer.java:196)
munishchouhan commented 3 months ago

Its prints repo name as 'alpine', which is the base image in Dockerfile i am using as reproducer

munishchouhan commented 3 months ago

after debugging i found that wave is throwing this error for cache repository

munishchouhan commented 3 months ago

ok found the issue, after adding these changes https://github.com/seqeralabs/wave/pull/564 we need to specify repo for docker with docker.io/repo, we cannot specify just repo for docker hub anymore.

cc @pditommaso

pditommaso commented 3 months ago

Not understanding, how to replicate the problem?

munishchouhan commented 3 months ago

If i just add hrma017/dev in build repository and not add docker.io