You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I was tired and used Gemini to assist with rewriting some code for a recent fix. Unsurprisingly Gemini had no idea what I meant and I missed it.
Expected behavior
Cached packages with the least recent checks are sent up to fill any requests sent to remote vulnerability sources when we would have a request with less than the maximum allowed by that service.
Additional context
Untested, but this looks more correct:
var rescanCount = Math.Min(128 - modUncached, cachedPackages.Length);
for (var i = cachedPackages.Length - 1; i >= 0; i--)
{
uncachedPkgs.Add(cachedPackages[i]);
}
cachedPackages = cachedPackages[..^rescanCount];
The text was updated successfully, but these errors were encountered:
I've been trying to find time to put this fix in since Last Friday. If anyone wants to open a PR, I'd be happy to approve it as soon as I have time to review and publish. Hoping to get to this really soon either way.
Describe the bug
I was tired and used Gemini to assist with rewriting some code for a recent fix. Unsurprisingly Gemini had no idea what I meant and I missed it.
Expected behavior
Cached packages with the least recent checks are sent up to fill any requests sent to remote vulnerability sources when we would have a request with less than the maximum allowed by that service.
Additional context
Untested, but this looks more correct:
var rescanCount = Math.Min(128 - modUncached, cachedPackages.Length);
for (var i = cachedPackages.Length - 1; i >= 0; i--)
{
uncachedPkgs.Add(cachedPackages[i]);
}
cachedPackages = cachedPackages[..^rescanCount];
The text was updated successfully, but these errors were encountered: