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

Test login, push (and authenticated pull) against docker hub #3494

Open
apostasie opened this issue Oct 3, 2024 · 5 comments
Open

Test login, push (and authenticated pull) against docker hub #3494

apostasie opened this issue Oct 3, 2024 · 5 comments
Labels
area/ci e.g., CI failure area/login authentification/ login

Comments

@apostasie
Copy link
Contributor

apostasie commented Oct 3, 2024

What is the problem you're trying to solve

Right now, we do test most of our registry operations against a locally started distribution registry + cesanta token auth server.

This is good, but has limits. Specifically, Docker Hub resolution mechanisms are "special", be it the way the credentials are stored in the store, or how short names resolve to fully qualified url - and also their token auth server is proprietary IIRC, which might entail some specific behaviors.

We do not currently test that, and have seen a couple of regression recently (#3484, #3485) that could have been caught if we did.

Testing against Hub comes with challenges:

  • we would need a dummy account, and a pair of access tokens
  • it is doubtful we could keep these secrets (as obviously PRs would have access to it) if that was enabled on PR testing
  • hub is notorious for 429-ing when things heat up a little bit - failing the build because of that is a royal PITA

A possible solution would be to run these tests against Hub solely on master (after merge).

This ticket is related to #3257 - and also testing against Gitlab.

Describe the solution you'd like

na

Additional context

No response

@AkihiroSuda AkihiroSuda added area/ci e.g., CI failure area/login authentification/ login and removed kind/feature labels Oct 4, 2024
@AkihiroSuda
Copy link
Member

Probably those tests should be only executed on a laptop outside the CI

@apostasie
Copy link
Contributor Author

Probably those tests should be only executed on a laptop outside the CI

That would be a good start - and we can re-evaluate later.

@fahedouch
Copy link
Member

Good point but as open source product our first target is to fill the oci distribution requirement. Hard to satisfy all oci distribution implemention (Hub, harbor..). Otherwise fork nerdctl and statisfy specific distribution implem is a nice solution ( this is what private organization does)

@apostasie
Copy link
Contributor Author

Good point but as open source product our first target is to fill the oci distribution requirement. Hard to satisfy all oci distribution implemention (Hub, harbor..). Otherwise fork nerdctl and statisfy specific distribution implem is a nice solution ( this is what private organization does)

Fair.
I like Akihiro suggestion: we could have some tests in there that can only be ran if a certain token env var is set and we do not run it on the CI

@apostasie
Copy link
Contributor Author

Good point but as open source product our first target is to fill the oci distribution requirement. Hard to satisfy all oci distribution implemention (Hub, harbor..). Otherwise fork nerdctl and statisfy specific distribution implem is a nice solution ( this is what private organization does)

As I see it, (one of) the problem with open-source is that people do reap the benefits and do not contribute back.
I have seen so many projects wither and die, because they told people they should just "fork and satisfy [their use case]".
Then people do that - and before you know it, these forks are so far removed from upstream that it makes it impossible to contribute back - further reducing an incentive that was already low to start with.

My point being: we should make nerdctl such a compelling proposal that people should feel enticed to contribute here, and we should encourage that by giving them the means to do so.

I hope I am making sense :-).

Anyhow, philosophizing here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci e.g., CI failure area/login authentification/ login
Projects
None yet
Development

No branches or pull requests

3 participants