Skip to content

re-introduced support for port numbers in docker registry URL - #5195

Merged
vvoland merged 1 commit into
docker:masterfrom
CarstonSchilds:master
Jun 26, 2024
Merged

re-introduced support for port numbers in docker registry URL#5195
vvoland merged 1 commit into
docker:masterfrom
CarstonSchilds:master

Conversation

@CarstonSchilds

@CarstonSchildsCarstonSchilds commented Jun 25, 2024

Copy link
Copy Markdown
Contributor

- What I did

- How to verify it

  • added new test cases and ran docker buildx bake test

- Description for the changelog

Fix a regression that caused port numbers to be ignored when parsing a Docker registry URL.

- A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Carston Schilds <Carston.Schilds@visier.com>
@CarstonSchildsCarstonSchilds changed the title support non-standard port numbers in docker registry urlre-introduced support for port numbers in docker registry URLJun 25, 2024
@CarstonSchilds
CarstonSchilds marked this pull request as ready for review June 25, 2024 22:38
@codecov-commenter

codecov-commenter commented Jun 26, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.43%. Comparing base (ffb8425) to head (2380481).

Additional details and impacted files
@@ Coverage Diff @@## master #5195 +/- ##
==========================================
+ Coverage 60.96% 61.43% +0.46% 
==========================================
Files 295 298 +3 Lines 20789 20799 +10 ==========================================
+ Hits 12674 12777 +103 + Misses 7198 7109 -89 + Partials 917 913 -4 

@thaJeztah

Copy link
Copy Markdown
Member

🤦 Thanks! I missed that #3599 was merged, and looking at my last push there, I suspect I found some local changes that may have been WIP 😞

if u.Port() == "" {
return u.Hostname()
}
return u.Hostname() + ":" + u.Port()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can expect IPv6 addresses, we should probably use netJoinHostPort() here;

returnnet.JoinHostPort(u.Hostname(), u.Port())

Comment on lines +170 to +171
// should support non-standard port in registry url
{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably add some test-cases here for IP-addresses

@thaJeztah

Copy link
Copy Markdown
Member

Actually, ignore my comments for now; I guess we didn't do this in the old code, so we can make those fixes in a follow-up; I opened a follow-up PR; #5196

@thaJeztahthaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if CI is happy, thanks!

@thaJeztah

Copy link
Copy Markdown
Member

@vvoland@laurazard PTAL

@thaJeztahthaJeztah added this to the 28.0.0 milestone Jun 26, 2024

@vvolandvvoland left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v26.1.4 -> 27.0.1: "docker login https://myregistry:444/" loses port

4 participants

@CarstonSchilds@codecov-commenter@thaJeztah@vvoland