-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Containers: insecure registries: allow https (ignore cert errors), and accept config from envvar. #41506
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
Conversation
…d accept config from envvar.
b09505b
to
70a2773
Compare
src/Containers/Microsoft.NET.Build.Containers/FallbackToHttpMessageHandler.cs
Show resolved
Hide resolved
src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultRegistryAPI.cs
Outdated
Show resolved
Hide resolved
a33f5b6
to
b21f93b
Compare
2d5cde2
to
b457f5e
Compare
src/Containers/Microsoft.NET.Build.Containers/Registry/RegistrySettings.cs
Show resolved
Hide resolved
@baronfel @dotnet/sdk-container-builds-maintainers this is up for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM. Thanks for expanding this functionality and bringing us more into alignment with the container ecosystem tooling!
I'll log an issue to expand the docs around insecure registries on the docs repo.
src/Containers/Microsoft.NET.Build.Containers/FallbackToHttpMessageHandler.cs
Show resolved
Hide resolved
We should also backport this to 8.0.4xx since the initial insecure registry support was backported there as well. |
This failing test is killing me 😓 |
I see a failure of:
The way it fails tells me that when an https connection is made on .NET framework and the peer does an abortive TCP close, then HttpClient isn't throwing The http fallback doesn't kick in, and the auth handler throws One option is to extend wdyt @baronfel? |
Actually, the fallback shouldn't kick in when isInsecureRegistry: False. |
There's definitely a bug in the test in that it doesn't account for the |
Head branch was pushed to by a user without write access
The test bug is fixed. The test for this feature was more challenging than the implementation. Fortunately, the logging from the test provided a good understanding of why it failed. |
Lovely work. Thank you for the effort! |
/backport to release/8.04xx |
Started backporting to release/8.04xx: https://github.com/dotnet/sdk/actions/runs/9583676452 |
@baronfel an error occurred while backporting to release/8.04xx, please check the run log for details! Error: The specified backport target branch release/8.04xx wasn't found in the repo. |
/backport to release/8.0.4xx |
Started backporting to release/8.0.4xx: https://github.com/dotnet/sdk/actions/runs/9583690663 |
@baronfel backporting to release/8.0.4xx failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Containers: insecure registries: allow https (ignore cert errors), and accept config from envvar.
Using index info to reconstruct a base tree...
M src/Containers/Microsoft.NET.Build.Containers/ContainerHelpers.cs
M src/Containers/Microsoft.NET.Build.Containers/LocalDaemons/DockerCli.cs
M src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs
A test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs
A test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Tests/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs
Auto-merging src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs
Auto-merging src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs
Auto-merging src/Containers/Microsoft.NET.Build.Containers/LocalDaemons/DockerCli.cs
Auto-merging src/Containers/Microsoft.NET.Build.Containers/ContainerHelpers.cs
Applying: Add tests.
Using index info to reconstruct a base tree...
M src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs
A test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Tests/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs
Auto-merging src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs
Applying: Fix Windows test issue.
Using index info to reconstruct a base tree...
A test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Tests/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs
Applying: Try fix tests on Windows.
Using index info to reconstruct a base tree...
A test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Tests/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs
Applying: PR feedback.
Applying: Fix EnsureRegistryLoaded.
Using index info to reconstruct a base tree...
A test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs
Applying: Update WriteToPrivateBasicRegistry test.
Using index info to reconstruct a base tree...
A test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs
CONFLICT (content): Merge conflict in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0007 Update WriteToPrivateBasicRegistry test.
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@baronfel an error occurred while backporting to release/8.0.4xx, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
…d accept config from envvar. (dotnet#41506)
Co-authored-by: Tom Deseyn <[email protected]>
Implements dotnet/sdk-container-builds#338 (comment), dotnet/sdk-container-builds#576.
@dotnet/sdk-container-builds-maintainers ptal.