sdk-container-builds icon indicating copy to clipboard operation
sdk-container-builds copied to clipboard

Investigate using mthalman/DockerRegistryClient instead of our own APIs

Open baronfel opened this issue 2 years ago • 0 comments

Valleysoft.DockerRegistryClient is an established library for communicating to registry APIs, and it includes data models for the expected data types. It also includes an implementation of the auth handshake.

We should evaluate moving to it (which would require source-build support) in order to increase the amount of reuse and minimize the amount of unique code in this repo.

Areas of concern:

  • dependencies - it depends on Microsoft.Rest.ClientRuntime, which I'm not sure is available in source-build
  • caching token lookups - it doesn't look like Valleysoft.DockerRegistryClient does this currently
  • authoring per-registry-endpoint customizations (like we have for AWS today) - the library allows for registering custom delegating handlers
  • no write operations are supported - we'd likely need to contribute and test them
  • Valleysoft.DockerRegistryClient uses Newtonsoft instead of System.Text.Json, and out of the box the models it provides don't deserialize correctly with System.Text.Json.
  • DockerREgistryClient seems to hard-code https - in order to support #314 and #338 we might need to contribute a feature/flag.

baronfel avatar Feb 28 '23 19:02 baronfel