parsing repository urls - not yet fixed?

Hi,

the recent changes regarding the repository strings with private registry urls seem to be missing a detail. Looking at the changes for https://github.com/ansible/ansible/issues/8983 only the trailing tag seems to be recognized, but no “username” infix.
Please have a look at https://github.com/docker/docker/blob/master/pkg/parsers/parsers.go#L72 where the “official” logic for parsing a canonical repository url is implemented.

Did anyone have a chance to try a repository url like below?

localhost.localdomain:5000/samalba/hipache:latest

Thanks for your feedback!

Hi,

the recent changes regarding the repository strings with private registry
urls seem to be missing a detail. Looking at the changes for
https://github.com/ansible/ansible/issues/8983 only the trailing tag
seems to be recognized, but no "username" infix.
Please have a look at
https://github.com/docker/docker/blob/master/pkg/parsers/parsers.go#L72
where the "official" logic for parsing a canonical repository url is
implemented.

Did anyone have a chance to try a repository url like below?

localhost.localdomain:5000/samalba/hipache:latest

That gets parsed into:

('localhost.localdomain:5000/samalba/hipache', 'latest')

Is that not what it's supposed to be?

(Note: there's been several commits fixing bugs and then fixing bugs
introduced by fixes in recent days so if you're just looking at issues,
make sure that you also have had a chance to look at the latest version of
the code in the devel tree).

-Toshio

You guys should really start unit testing this stuff! I think it would save a lot of pain.

You guys should really start unit testing this stuff! I think it would save a lot of pain.

Unfortunately, this code is in a module so it can’t be unittested as is. Because of just how much I’ve had to touch this piece of code I’ve been thinking about whether we should design a way to either make modules unittestable or splitting out the chunks of code that are ripe for unittesting.

Stay tuned :slight_smile:

-Toshio