-
-
Notifications
You must be signed in to change notification settings - Fork 746
GH2028: Adding credential support for inprocess nuget client #4473
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
base: develop
Are you sure you want to change the base?
GH2028: Adding credential support for inprocess nuget client #4473
Conversation
@TrymBeast please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement ( “Agreement” ) is agreed to by the party signing below ( “You” ), 1. Definitions. “Code” means the computer software code, whether in human-readable or machine-executable form, “Project” means any of the projects owned or managed by .NET Foundation and offered under a license “Submit” is the act of uploading, submitting, transmitting, or distributing code or other content to any “Submission” means the Code and any other copyrightable material Submitted by You, including any 2. Your Submission. You must agree to the terms of this Agreement before making a Submission to any 3. Originality of Work. You represent that each of Your Submissions is entirely Your 4. Your Employer. References to “employer” in this Agreement include Your employer or anyone else 5. Licenses. a. Copyright License. You grant .NET Foundation, and those who receive the Submission directly b. Patent License. You grant .NET Foundation, and those who receive the Submission directly or c. Other Rights Reserved. Each party reserves all rights not expressly granted in this Agreement. 6. Representations and Warranties. You represent that You are legally entitled to grant the above 7. Notice to .NET Foundation. You agree to notify .NET Foundation in writing of any facts or 8. Information about Submissions. You agree that contributions to Projects and information about 9. Governing Law/Jurisdiction. This Agreement is governed by the laws of the State of Washington, and 10. Entire Agreement/Assignment. This Agreement is the entire agreement between the parties, and .NET Foundation dedicates this Contribution License Agreement to the public domain according to the Creative Commons CC0 1. |
@TrymBeast in the absence of tests in the code for this, we will need to have a set of manual tests that can be ran to verify this functionality. Can you please update the description of this PR to include all the test steps that you have done to validate this functionality. Please assume that someone reviewing this PR has no knowledge of how Azure DevOps works, and provide explicit steps on how to set things up, and how to verify functionality. Does this change have any adverse affects on traditional authentication mechanisms, for example, standard username/password authentication within a nuget.config file? |
@TrymBeast it would also be great to see some additional information being added to the commit message for this change. i.e. what is it doing under the hood, is there documentation around its usage that you can link to in the commit message? Are there any pieces of information that you found while investigating and implementing this, that would be good to capture for our "future" selves? |
Oh, and since I forgot to mention this on my first comment here... Thank you very much for your contribution to Cake! We really appreciate it! |
@gep13 Thanks for your comments, I will add information on how to test and I will link documentation on how this searches for the credential providers. Meanwhile, I've discovered that this is breaking the logger when using level diagnostic.
Because of the curly braces it throws a FormatException: Input string was not in a correct format. Should I implement a wrapper logger that fixes the format so in the Payload it uses the curly escape sequence? Or should I change the NuGetLogger to just print the curly braces and what's inside as is? I think the latter would be safest. |
@TrymBeast, the correct fix would be to adjust NuGetLogger's calls to Something like - public void LogDebug(string data) => _log.Debug(data);
+ public void LogDebug(string data) => _log.Debug("{0}", data);
- public void LogVerbose(string data) => _log.Debug(data);
+ public void LogVerbose(string data) => _log.Debug("{0}", data);
- public void LogInformation(string data) => _log.Debug(data);
+ public void LogInformation(string data) => _log.Debug("{0}", data);
- public void LogMinimal(string data) => _log.Information(data);
+ public void LogMinimal(string data) => _log.Information("{0}", data);
- public void LogWarning(string data) => _log.Warning(data);
+ public void LogWarning(string data) => _log.Warning("{0}", data);
- public void LogError(string data) => _log.Error(data);
+ public void LogError(string data) => _log.Error("{0}", data);
- public void LogInformationSummary(string data) => _log.Information(data);
+ public void LogInformationSummary(string data) => _log.Information("{0}", data);
- public void LogErrorSummary(string data) => _log.Error(data);
+ public void LogErrorSummary(string data) => _log.Error("{0}", data);
+ public void Log(LogLevel level, string data) => _log.Write(GetVerbosity(level), GetLogLevel(level), data);
- public void Log(LogLevel level, string data) => _log.Write(GetVerbosity(level), GetLogLevel(level), "{0}", data); |
Solution:
I don't know how to implement any test on this, but I've tested loading a recipe from an Azure DevOps Artifacts NuGet feed.
Fixes #2028