microsoft / vscode-docker

Docker Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker
Other
1.19k stars 508 forks source link

Unable to view all repositories in docker registry #4192

Closed UntestedEngineer closed 5 months ago

UntestedEngineer commented 6 months ago

Version: 1.27.0 and 1.28.0

When logging into a Docker registry the UI seems to cut off a bunch of repositories in the list. Also, it appears the ordering of visible tags within a repository has changed to alphabetical order instead of by age.

Reverting back to version 1.26.1 seems to fix the above two issues. All repositories are visible once again and ordering of tags is by age.

Troubleshooting steps (none work):

Issue can be reproduced across two different client PCs using version 1.27.0 and 1.28.0. Rolling back to 1.26.1 fixes the issues.

bwateratmsft commented 6 months ago

Which registry are you using? Can you share a screenshot of the issue?

UntestedEngineer commented 6 months ago

Using standard Docker Hub.

Extension v1.26.1

image image

Extension v1.27.0 and v1.28.0

image
bwateratmsft commented 6 months ago

Is there anything obvious in common about the repositories that aren't being shown vs. the ones that are? e.g. is one group public and one group private?

UntestedEngineer commented 6 months ago

Besides the "private" on on the list they are all public and all the same. settings I even created a brand new public repository in dockerhub and it did not show up when I refreshed the list.

It is very clear that when I roll back to 1.26.1 from 1.27.0 or 1.28.0 the full list of repositories becomes visible again. Re-upgrade again and most of them go missing. I can replicate the same problem across two different client PCs. I use the Windows Version with a WSL2 backend where I create and build all containers in the WSL2 remote instance.

danegsta commented 6 months ago

There was a pretty major refactor of the registry implementation between 1.26.1 and 1.27.0; it looks like it introduced a regression following some pagination links for the Docker Hub registry API, which is why you're only seeing a subset of results.

UntestedEngineer commented 6 months ago

I am not sure if it's related, however the tags under the visible repositories seem to have changed to ordering by alphabetical/numerical instead of by standard age.

bwateratmsft commented 6 months ago

I am not sure if it's related, however the tags under the visible repositories seem to have changed to ordering by alphabetical/numerical instead of by standard age.

That part at least was intentional. VSCode's tree view API is somewhat restricting. The Docker V2 registry API doesn't give the dates as part of the tag listing, you have to request details about each tag, which means a request for every tag which is slow. We opted to do that asynchronously and sort alphabetically instead of by date. We could go back to date but it would require making those requests synchronously, and the user experience there is slower performance. We could also make an option to allow users to choose.

UntestedEngineer commented 6 months ago

I think offering an option to chose how one wants to sort their tags under the Docker remote repository would be ideal. While I do understand programming constraints it is also sometimes inefficient from a user experience.

Example: In a long list of tags I like to copy the most recent tag (by age) and paste it into the docker build/buildx command while modifying only one character in some cases. Sorting by alphabetical order becomes more of an annoyance where I need to scroll to the bottom of the tag list to copy the desired tag for a quick paste into the build/buildx command.

bwateratmsft commented 5 months ago

Looks like the default page size for Docker Hub is a mere 10. Our old code pushed it to the max, 100, and I think I'll do that again, in addition to fixing paging to actually work.

bwateratmsft commented 5 months ago

Fix depends on https://github.com/microsoft/vscode-docker-extensibility/issues/219

bwateratmsft commented 4 months ago

This has been released in Docker extension version 1.29.0.