Skip to content

Fail restore when floating version needs cooldown - #7694

Merged
zivkan merged 5 commits into
devfrom
dev-zivkan-floating-version-cooldown
Sep 17, 2026
Merged

zivkan merged 5 commits into
devfrom
dev-zivkan-floating-version-cooldown

Conversation

@zivkan

@zivkan zivkan commented Sep 10, 2026

Copy link
Copy Markdown
Member

Bug

Fixes: NuGet/Home#15035

Description

Fail restore with NU1020 when a floating version needs to use cooldown.

Since no-op doesn't take nuget.config settings into account, it's possible to enable cooldown, do a restore and have no-op succeed, therefore hiding the configuration error. And therefore later (perhaps in CI, or later when a different package is installed/removed/upgraded) find out about the configuration error. But there are existing scenarios with a similar outcome, for example if package source mapping doesn't map a required package to any source, but the package already exists in the global packages folder on the computer being tested on. Floating version usage is very low, so that's very few customers who are at risk of being affected. Other work is higher priority than improving the no-op calculations at this time.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc. cooldown: update docs Home#15036

@zivkan
zivkan requested a review from a team as a code owner September 10, 2026 23:11
@zivkan
zivkan requested review from donnie-msft and jebriede and removed request for a team September 10, 2026 23:11
@Frulfump

Copy link
Copy Markdown

Are the other no-op calculations that could be improved documented somewhere or is there an issue to track for it?

@zivkan
zivkan marked this pull request as draft September 15, 2026 10:35
@zivkan
zivkan changed the base branch from feature-cooldown to dev September 15, 2026 23:39
@zivkan
zivkan force-pushed the dev-zivkan-floating-version-cooldown branch from b83acab to 19eacc7 Compare September 16, 2026 00:11
@zivkan
zivkan marked this pull request as ready for review September 16, 2026 00:14
@zivkan
zivkan requested a review from jebriede September 16, 2026 00:14

@nkolev92 nkolev92 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only concern is around the RestoreRequest API change.

I'm ok with making a breaking change here.

@zivkan
zivkan requested a review from nkolev92 September 16, 2026 22:11
@zivkan
zivkan merged commit b2be1e3 into dev Sep 17, 2026
17 of 18 checks passed
@zivkan
zivkan deleted the dev-zivkan-floating-version-cooldown branch September 17, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cooldown: block restore when using floating versions

4 participants