I was working on Azure/azure-sdk-for-java#40388 when I noticed the following, azurite full image is mcr.microsoft.com/azure-storage/azurite:latest, however I should register azure-storage/azurite as connection name, see the implementation in order to make it work.
Looking at the code, I found that the connection name only considers the repository from the full image (as you can see in the link below), ignoring the registry. Meanwhile implementing Service Connections I thought the connection name is always the image name, which in most cases only considers the repository. When I was working on the PR mentioned at the beginning I used the full image (registry + repository) as connection name and it was not working.
|
return imageName.getRepository(); |
If this is not expected then in order to fix it, should be replaced by imageName.asCanonicalNameString().