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 get image auth digest #530

Merged
merged 2 commits into from
Jun 13, 2024
Merged

Fix get image auth digest #530

merged 2 commits into from
Jun 13, 2024

Conversation

pditommaso
Copy link
Collaborator

This PR fixes the retrieval of image digest for container built by Wave and hosted on private repos.

Signed-off-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
@pditommaso pditommaso linked an issue Jun 13, 2024 that may be closed by this pull request
@munishchouhan
Copy link
Member

Not able to reproduce the error, but tested it with docker hub and was ecr, no errors in thee logs
Tested with docker registry:
logs

Jun-13 17:20:24.599 [io-executor-thread-2] DEBUG i.s.wave.core.RegistryProxyService - Credentials for route path=docker.io/hrma017/dev:lofreq--543a3bb9666d70c4; identity=PlatformId(user=null, workspaceId=null, accessToken=null, towerEndpoint=null) => RegistryCredentials[username=xxxxxx; password=xxxxxx]
Jun-13 17:20:25.552 [io-executor-thread-2] INFO  i.s.w.s.b.ContainerBuildServiceImpl - == Submit build request: BuildRequest[containerId=543a3bb9666d70c4; targetImage=hrma017/dev:lofreq--543a3bb9666d70c4; identity=PlatformId(user=null, workspaceId=null, accessToken=null, towerEndpoint=null); dockerFile=FROM mambaorg/micromamba:1.5.8-lunar (more omitted); condaFile=channels: (more omitted); spackFile=null; buildId=543a3bb9666d70c4_1]
Jun-13 17:20:25.561 [io-executor-thread-2] DEBUG i.s.w.controller.ContainerController - New container request fulfilled - token=198ad47b2a7a; expiration=2024-06-13T16:20:25.556982Z; container=hrma017/dev:lofreq--543a3bb9666d70c4; build=543a3bb9666d70c4_1; identity=PlatformId(user=null, workspaceId=null, accessToken=null, towerEndpoint=null)
Jun-13 17:20:25.593 [io-executor-thread-1] INFO  i.s.wave.service.k8s.K8sConfigClient - Creating K8s config with path: /Users/munish.chouhan/.kube/config -- context: 'colima'
Jun-13 17:23:52.163 [io-executor-thread-1] DEBUG i.s.wave.core.RegistryProxyService - Credentials for route path=docker.io/hrma017/dev:lofreq--543a3bb9666d70c4; identity=PlatformId(user=null, workspaceId=null, accessToken=null, towerEndpoint=null) => RegistryCredentials[username=xxxxxx; password=xxxxxx]
Jun-13 17:23:52.718 [io-executor-thread-1] INFO  i.s.w.s.b.ContainerBuildServiceImpl - == Build request 543a3bb9666d70c4_1 completed with status=0
Jun-13 17:23:52.920 [io-executor-thread-4] INFO  i.s.w.service.scan.KubeScanStrategy - Launching container scan for buildId: 543a3bb9666d70c4_1 with scanId dfd43343690d

Client:

munish.chouhan@Munishs-MacBook-Pro wave_testing % wave --conda-package lofreq  --wave-endpoint http://localhost:9090                       
3653-85-136-67-71.ngrok-free.app/wt/198ad47b2a7a/hrma017/dev:lofreq--543a3bb9666d70c4
munish.chouhan@Munishs-MacBook-Pro wave_testing % docker pull 3653-85-136-67-71.ngrok-free.app/wt/198ad47b2a7a/hrma017/dev:lofreq--543a3bb9666d70c4
lofreq--543a3bb9666d70c4: Pulling from wt/198ad47b2a7a/hrma017/dev
6360b3717211: Pull complete 
2ec3f7ad9b3c: Pull complete 
7716ca300600: Pull complete 
4f4fb700ef54: Pull complete 
8c61d418774c: Pull complete 
03dae77ff45c: Pull complete 
aab7f787139d: Pull complete 
837d55536720: Pull complete 
897362c12ca7: Pull complete 
3893cbe24e91: Pull complete 
d1b61e94977b: Pull complete 
5b71549877ff: Pull complete 
67559d49fb9f: Pull complete 
Digest: sha256:5bc41c829f9410fb0205cf25929bd3e1452c34ca96a051c8b4cd38cef5778824
Status: Downloaded newer image for 3653-85-136-67-71.ngrok-free.app/wt/198ad47b2a7a/hrma017/dev:lofreq--543a3bb9666d70c4
3653-85-136-67-71.ngrok-free.app/wt/198ad47b2a7a/hrma017/dev:lofreq--543a3bb9666d70c4

Tested with AWS ecr:

logs:

17:33:17.326 [io-executor-thread-2] DEBUG i.s.wave.core.RegistryProxyService - Credentials for route path=xxxxxx.dkr.ecr.eu-west-2.amazonaws.com/wave/build/dev:lofreq-xxxxxx; identity=PlatformId(user=null, workspaceId=null, accessToken=null, towerEndpoint=null) => RegistryCredentials[username=xxxxxx; password=xxxxxx]
17:33:17.580 [io-executor-thread-2] INFO  i.s.w.s.b.ContainerBuildServiceImpl - == Submit build request: BuildRequest[containerId=39f276b6470e927d; targetImage=xxxxxx.dkr.ecr.eu-west-2.amazonaws.com/wave/build/dev:lofreq--39f276b6470e927d; identity=PlatformId(user=null, workspaceId=null, accessToken=null, towerEndpoint=null); dockerFile=FROM mambaorg/micromamba:1.5.8-lunar (more omitted); condaFile=channels: (more omitted); spackFile=null; buildId=xxxxxx_1]
17:33:17.600 [io-executor-thread-2] DEBUG i.s.w.controller.ContainerController - New container request fulfilled - token=f0d2c97774fe; expiration=2024-06-13T16:33:17.585973Z; container=xxxxxx.dkr.ecr.eu-west-2.amazonaws.com/wave/build/dev:lofreq--xxxxxx; build=xxxxxx_1; identity=PlatformId(user=null, workspaceId=null, accessToken=null, towerEndpoint=null)
17:33:17.640 [io-executor-thread-1] INFO  i.s.wave.service.k8s.K8sConfigClient - Creating K8s config with path: /Users/munish.chouhan/.kube/config -- context: 'colima'
17:34:21.328 [scheduled-executor-thread-10] DEBUG i.seqera.wave.cron.ThreadMonitorCron - Current jvm.threads.live value: 48
17:35:48.339 [io-executor-thread-1] DEBUG i.s.wave.core.RegistryProxyService - Credentials for route path=xxxxxx.dkr.ecr.eu-west-2.amazonaws.com/wave/build/dev:lofreq--xxxxxx; identity=PlatformId(user=null, workspaceId=null, accessToken=null, towerEndpoint=null) => RegistryCredentials[username=xxxxxx; password=xxxxxx]
17:35:48.579 [io-executor-thread-1] INFO  i.s.w.s.b.ContainerBuildServiceImpl - == Build request xxxxxx_1 completed with status=0

client:

munish.chouhan@Munishs-MacBook-Pro wave_testing % wave --conda-package lofreq  --wave-endpoint http://localhost:9090                               
3653-85-136-67-71.ngrok-free.app/wt/xxxxxx]/wave/build/dev:lofreq--xxxxxx]
munish.chouhan@Munishs-MacBook-Pro wave_testing % docker pull 3653-85-136-67-71.ngrok-free.app/wt/f0d2c97774fe/wave/build/dev:lofreq--xxxxxx]
lofreq--39f276b6470e927d: Pulling from wt/xxxxxx]/wave/build/dev
6360b3717211: Already exists 
2ec3f7ad9b3c: Already exists 
7716ca300600: Already exists 
4f4fb700ef54: Already exists 
8c61d418774c: Already exists 
03dae77ff45c: Already exists 
aab7f787139d: Already exists 
837d55536720: Already exists 
897362c12ca7: Already exists 
3893cbe24e91: Already exists 
d1b61e94977b: Already exists 
7b8a1d120451: Pull complete 
001bdeda5e29: Pull complete 
Digest: sha256:2683b087fc0bee2331905f703c96fb239f7bcef1e42f06fc0b1fc37f04e16715
Status: Downloaded newer image for 3653-85-136-67-71.ngrok-free.app/wt/xxxxxx]/wave/build/dev:lofreq--xxxxxx]
3653-85-136-67-71.ngrok-free.app/wt/f0d2c97774fe/wave/build/dev:lofreq--xxxxxx]

@pditommaso pditommaso merged commit df8ec04 into master Jun 13, 2024
1 check passed
@pditommaso pditommaso deleted the fix-get-image-digest-auth branch June 13, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to fetch container digest
2 participants