-
Notifications
You must be signed in to change notification settings - Fork 696
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
Do not warn http sources in push/delete scenarios when allowInsecureConnections is set to true. #5381
Do not warn http sources in push/delete scenarios when allowInsecureConnections is set to true. #5381
Conversation
(packageSource.ProtocolVersion == 3 || packageSource.Source.EndsWith("json", StringComparison.OrdinalIgnoreCase))) | ||
{ | ||
logger.LogWarning(string.Format(CultureInfo.CurrentCulture, Strings.Warning_HttpServerUsage, "delete", packageSource.Source)); | ||
} | ||
var packageUpdateResource = await CommandRunnerUtility.GetPackageUpdateResource(sourceProvider, packageSource); | ||
|
||
bool allowInsecureConnections = packageSource.AllowInsecureConnections; |
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.
Suggestion: just pass packageSource.AllowInsecureConnections directly in line 46 without new variable allowInsecureConnections
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.
Thanks! Fixed.
string expectedSymbolWarning = $"WARNING: You are running the 'push' operation with an 'HTTP' source, '{pushSymbolsUri}/'"; | ||
if (isHttpWarningExpected) |
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.
NIT: Could we add an empty line before this line?
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.
Added an empty line. Thanks!
…onnections is set to true. (#5381)
…onnections is set to true. (#5381)
Bug
Fixes: NuGet/Home#12789
Regression? Last working version:
Description
When
allowInsecureConnections
property in packageSources section is set to true in NuGet.Config files, do not warn for HTTP sources in push/delete scenarios.For push scenario, set
allowInsecureConnections
property to true for push source will opt out the http warning for both package and symbol source.The PR enable the HTTP warnings in this scenario is: #4552
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation