dotnet / docker-tools

This is a repo to house some common tools for our various docker repos.
MIT License
122 stars 46 forks source link

Define common API for querying registries #1262

Closed mthalman closed 4 months ago

mthalman commented 5 months ago

This provides a common API, IRegistryContentClient, that provides an interface for querying container registries. This provides a common interface for both the ACR that we own as well as 3rd party registries. For our ACR, it uses the Azure library which provides the Azure auth implementation we require. The logic for determining which implementation to use is in RegistryClientFactory. For now, this uses a hardcoded registry name to determine which implementation it should use. This is temporary. Once I get signoff on these changes, I'll replace that so that the value can be passed in via the command call. That will modify a whole bunch of files so I want to wait until the end to make that change.

dotnet-issue-labeler[bot] commented 5 months ago

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

mthalman commented 4 months ago

I was able to revert all the changes which flowed RegistryAuthContext all over the place and replaced it with a DI solution: https://github.com/dotnet/docker-tools/pull/1262/commits/02e1e8c3ed34f200488474dade29bc90491862ad.

mthalman commented 4 months ago

I'm going to hold off on merging this until https://github.com/dotnet/docker-tools/pull/1260 is merged and rolled out.