Skip to content

move image digests resolution to backend#10026

Merged
ndeloof merged 2 commits intodocker:v2from
ndeloof:cli_registry_client
Nov 30, 2022
Merged

move image digests resolution to backend#10026
ndeloof merged 2 commits intodocker:v2from
ndeloof:cli_registry_client

Conversation

@ndeloof
Copy link
Copy Markdown
Contributor

@ndeloof ndeloof commented Nov 29, 2022

What I did
introduced ResolveImageDigests in the API and moved image digest resolution to the backend
longer terms goal is to use dockercli.RegistryClient() to replace cnab-to-oci dependency

(not mandatory) A picture of a cute animal, if possible in relation with what you did
image

Copy link
Copy Markdown
Contributor

@milas milas left a comment

Choose a reason for hiding this comment

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

LGTM - small comment re: duplicated code

Comment thread cmd/compose/convert.go Outdated
@@ -141,8 +141,9 @@ func runConvert(ctx context.Context, backend api.Service, opts convertOptions, s
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Delete lines 130-141 now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh yes indeed, my bad

@ndeloof ndeloof force-pushed the cli_registry_client branch from c43cb10 to 1f2f68f Compare November 30, 2022 16:09
@thaJeztah
Copy link
Copy Markdown
Member

Not sure if useful, but there's also DistributionInspect, which is (I think) what's used for docker service create to resolve / pin the digest; https://github.com/moby/moby/blob/1907027b7be080b8d5f9239fde26fbbb6aedfc39/client/service_create.go#L102

@ndeloof
Copy link
Copy Markdown
Contributor Author

ndeloof commented Nov 30, 2022

@thaJeztah thanks, this is exactly what I was looking for! 🥰

@ndeloof ndeloof force-pushed the cli_registry_client branch from e25e5be to 8e57c6e Compare November 30, 2022 16:51
@thaJeztah
Copy link
Copy Markdown
Member

Make sure to double check in the cli as well as at some point resolution was moved; check for "no-resolve-image" (I think) on the docker cli (I'm just away from my keyboard right now 😬😅)

@ndeloof ndeloof force-pushed the cli_registry_client branch from 8e57c6e to 1540ddf Compare November 30, 2022 17:06
Copy link
Copy Markdown
Contributor

@milas milas left a comment

Choose a reason for hiding this comment

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

Comment thread pkg/compose/compose.go
return yaml.Marshal(project)
default:
return nil, fmt.Errorf("unsupported format %q", options)
return nil, fmt.Errorf("unsupported format %q", options.Format)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

😅

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

linter suddenly noticed this bug, while it existed before ... weird

@ndeloof ndeloof merged commit 8f2b747 into docker:v2 Nov 30, 2022
@ndeloof ndeloof deleted the cli_registry_client branch November 30, 2022 20:18
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.

3 participants