Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing name of repository in GitLab Docker Registry #1643

Closed
danielgospodinow opened this issue Feb 21, 2020 · 11 comments · Fixed by #1651
Closed

Missing name of repository in GitLab Docker Registry #1643

danielgospodinow opened this issue Feb 21, 2020 · 11 comments · Fixed by #1651

Comments

@danielgospodinow
Copy link
Contributor

I'm using the GitLab registry and I noticed that the name of the current repository from a given registry is missing.

And this behavior can be observed only for GitLab, DockerHub works like a charm.

I'll provide some images so that it's more clear.

Observation:
Image of observed defect

Current state in GitLab:
Current state in GitLab

The same thing, but in DockerHub:
Current state in GitLab

@bwateratmsft
Copy link
Contributor

Definitely looks like a bug, we'll look into it. Thanks for reporting it @danielgospodinow!

@bwateratmsft
Copy link
Contributor

bwateratmsft commented Feb 21, 2020

@BigMorty I think we should take this for 0.11.0 as it essentially makes GitLab unusable in our Registries view.

Only one of these blank repositories can exist in a given namespace--its name is the same as the namespace--so that mitigates the problem somewhat. You won't see a field of blank repositories with no context or hint as to what is what.

@bwateratmsft
Copy link
Contributor

bwateratmsft commented Feb 21, 2020

I'm able to reproduce:

By tagging and pushing to registry.gitlab.com/username/project/repo:latest, it will show up as repository something with tag latest, like this:
docker push registry.gitlab.com/bwateratmsft/vscode-extension-testing/webworkspace:latest
image

But if you tag and push with registry.gitlab.com/username/project:latest, it shows up as repository blank:
docker push registry.gitlab.com/bwateratmsft/vscode-extension-testing:latest
image

I'll check to see what Docker Hub is doing differently...

@bwateratmsft
Copy link
Contributor

So Docker Hub does not allow pushes to the namespace itself. i.e. I can push bwateratmsft/webworkspace:latest but not bwateratmsft:latest.

@dbreshears dbreshears added this to the 0.12.0 milestone Feb 21, 2020
@danielgospodinow
Copy link
Contributor Author

It's good that you managed to reproduce the issue and I'm happy that you even figured out what's going on exactly! 😄 Good luck, guys!

@bwateratmsft
Copy link
Contributor

bwateratmsft commented Feb 21, 2020

Thank you! We were trying to decide exactly what text should go in that spot. Technically, it's another repository altogether. Some of our ideas include:

  1. Give the full name, e.g. in my example it would be bwateratmsft/vscode-extension-testing. This would be the exact same text as the parent node.
  2. Show <root>
  3. Show <default>

Do you have any preference or is there different text that makes sense to show there?

@danielgospodinow
Copy link
Contributor Author

I think option 1 seems quite reasonable. In fact, that's the behavior that I expect as a user. 😄

I got familiar with the source code and I'll also do my best to help resolving this issue. I would love to contribute to this project. 😄

@bwateratmsft
Copy link
Contributor

I looked further into the code, and it seems like this is a quirk of GitLab itself. Their API returns a name value that is blank. Still, I think the fix is essentially the same--when constructing the repository node, we can just give a default name like the project name if there's nothing from the request.

@danielgospodinow
Copy link
Contributor Author

Yes, I absolutely agree! 😄 This fix should do the trick.
I managed to apply the fix locally.
Can I try and make a pull request for this, even though it's just a single line of code? 😄

@bwateratmsft
Copy link
Contributor

Yes, please do! We welcome user contributions. 😄

@danielgospodinow
Copy link
Contributor Author

I've made a pull request. 😄 I'll try to continue contributing as much as I can! ✌️ And thank you for the wonderful discussion, It was a wonderful opportunity for me!

@bwateratmsft bwateratmsft removed their assignment Feb 26, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants