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

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

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

CarstonSchilds
Copy link
Contributor

@CarstonSchilds CarstonSchilds commented Jun 25, 2024

- 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)

@CarstonSchilds CarstonSchilds changed the title support non-standard port numbers in docker registry url re-introduced support for port numbers in docker registry URL Jun 25, 2024
@CarstonSchilds CarstonSchilds marked this pull request as ready for review June 25, 2024 22:38
@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2024

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
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
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;

return net.JoinHostPort(u.Hostname(), u.Port())

Comment on lines +170 to +171
// should support non-standard port in registry url
{
Copy link
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
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

Copy link
Member

@thaJeztah thaJeztah left a comment

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
Member

@vvoland @laurazard PTAL

@thaJeztah thaJeztah added this to the 28.0.0 milestone Jun 26, 2024
Copy link
Collaborator

@vvoland vvoland left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to 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