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

[release/9.0.1xx] [Containers] Fix insecure registry handling to use the correct port for the HTTP protocol #44235

Merged
merged 4 commits into from
Oct 18, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 16, 2024

Backport of #44050 to release/9.0.1xx

Description/Customer Impact

Users pushing images to 'insecure registries' (which are managed via Docker/Podman configuration) couldn't successfully push to those registries if they used HTTP (as opposed to an untrusted/self-signed/etc HTTPS certificate). This was because when constructing the fallback HTTP url for the registry we used UriBuilder to copy over all parts of Uri and just change the scheme. Due to vagaries of the UriBuilder APIs, this meant that we always used the HTTPS port (443) for these HTTP uris, which results in communication errors. This change updates the way we construct the HTTP Uris for our HTTP fallback logic for insecure registries to allow HTTP communication with these registries by not using the HTTPS port unless the registry configuration explicitly pinned the port to be used.

Regression

No - this is fixing a gap that we didn't have test coverage in on the initial 'insecure registry' support

Risk

Low - we have automated test coverage for this scenario, and this only applies to users of the 'insecure registry' feature (which was only recently released in 8.0.400 and we have not received huge amounts of negative feedback on).

Testing

Automated tests for a wide variety of potential registry names and configurations was added.

/cc @baronfel @dameng324

@github-actions github-actions bot requested a review from a team as a code owner October 16, 2024 17:32
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Oct 16, 2024
@baronfel baronfel changed the title [release/9.0.1xx] fix port error when fallback to http [release/9.0.1xx] [Containers] Fix insecure registry handling to use the correct port for the HTTP protocol Oct 16, 2024
@baronfel baronfel force-pushed the backport/pr-44050-to-release/9.0.1xx branch from 4ae6e05 to 98798f3 Compare October 16, 2024 20:24
@baronfel
Copy link
Member

The failure is an EMSDK workload that needs to flow into 9.0.1xx, not anything related to this PR.

@baronfel baronfel force-pushed the backport/pr-44050-to-release/9.0.1xx branch from 98798f3 to c2a48ee Compare October 17, 2024 14:01
@rbhanda rbhanda added this to the 9.0.0 milestone Oct 17, 2024
@baronfel
Copy link
Member

@dotnet/source-build there's a download failure happening that I don't think is related to this PR - can y'all take a look and see if there's something we need to do?

@mthalman
Copy link
Member

mthalman commented Oct 17, 2024

@dotnet/source-build there's a download failure happening that I don't think is related to this PR - can y'all take a look and see if there's something we need to do?

It was fixed in #44281. I'll merge the tip into this PR to fix.

@baronfel baronfel force-pushed the backport/pr-44050-to-release/9.0.1xx branch from 34deb27 to e35b936 Compare October 18, 2024 13:32
@baronfel baronfel merged commit b46a39a into release/9.0.1xx Oct 18, 2024
31 checks passed
@baronfel baronfel deleted the backport/pr-44050-to-release/9.0.1xx branch October 18, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants