-
Notifications
You must be signed in to change notification settings - Fork 693
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
Fix license display when it comes from a File #5296
Conversation
@martinrrm can you check if there is any telemetry emit before your change to let us know that getting an embedded licence has failed? If not, please add some, because if the cache decides its too full and decides to evict the data in the short time between adding it to the cache and then reading it from the cache, we're still going to have problems. If we're not going to fix the fundamental design flaw, we should at least have telemetry. |
@zivkan Sorry for the late response, we do emit telemetry for faults here. Lines 126 to 128 in 629ec93
|
629ec93
to
acf0051
Compare
Since this change is to the utilities, might the PR also fix NuGet/Home#10670 ? NuGet.Client/src/NuGet.Clients/NuGet.PackageManagement.UI/Models/DetailedPackageMetadata.cs Line 116 in 636dfa5
|
@donnie-msft Confirmed that this PR also fixes that issue, added a gif to demonstrate. |
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 for checking on the other bug. "2 bugs with 1 PR"!
I left some comments which I believe are techdebt. Ideally, fix them in this PR. Otherwise, please create a follow-up issue to address them.
test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/PackageLicenseUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/PackageLicenseUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/PackageLicenseUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
src/NuGet.Clients/NuGet.PackageManagement.UI/PackageLicenseUtilities.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/PackageLicenseUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
src/NuGet.Clients/NuGet.PackageManagement.UI/PackageLicenseUtilities.cs
Outdated
Show resolved
Hide resolved
src/NuGet.Clients/NuGet.PackageManagement.UI/PackageLicenseUtilities.cs
Outdated
Show resolved
Hide resolved
28d8626
Bug
Fixes: NuGet/Home#12060
Fixes: NuGet/Home#10670
Regression? Last working version:
Description
NuGetPackageFileService.GetEmbeddedLicenseAsync tries to get a URI from an in-memory cache, but the cache is never updated. With this change, I'm adding the correct information to the cache when the link is being created. This issue only occurs when the License comes from a file.
Fix for NuGet/Home#10670:
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation