Home: Make static graph restore the default experience.

Created on 16 Jul 2020  路  11Comments  路  Source: NuGet/Home

This is an epic tracking all things relevant to static graph restore and whether there are any blockers/concerns to making it the default.

For readers, you'll need Zenhub to see the linked issues.

Currently this contains all potential issues tagged as static graph.

This doesn't mean they all need to be fixed, just analyzed :)

Note

For customers moving to static graph

  • If you want to ensure that your restore is equivalent across static graph and regular restore consider running:
  1. Restore with static graph.
  2. Restore without static graph

When you run this, at the end of the second restore you should see something like:
All projects are up-to-date for restore.

RestoreStaticGraph Epic Restore MSBuild Backlog 2 dotnet.exe Performance

Most helpful comment

We are spinning up automation to make it the default for all 1ES customers by sending PRs to their repos. I'll update this issue with the problems we have getting people to adopt it.

All 11 comments

One potential issue is that static graph evaluation based restore doesn't call any of the older targets like _GenerateRestoreProjectPathItemsPerFramework. People shouldn't be using them as extension points since we prefixed them with _ but there's no enforcement. So if the default switches, these targets won't run any more and people's builds can start failing in very weird ways.

Telemetry would help us greatly here to know how many people are doing this. We might even be able to add a warning in a future release telling people that the targets are going away.

That's a great point.
Definitely a smaller concern, but a possibility.

Think advertising the existence of the feature more broadly before making it a default is a good idea.

1ES repos will probably catch a large majority of the scenarios, but you can never have too many dogfooders :)

We are spinning up automation to make it the default for all 1ES customers by sending PRs to their repos. I'll update this issue with the problems we have getting people to adopt it.

What's the trigger, criteria before we make this default?

The plan is to make it default in the next major release given that it's a big change.

The main criteria is correctness. We need static graph to not regress current functional scenarios.

Perf gains are something we'll look into (we have) as well, but numbers there have been overwhelmingly positive for large project counts, and on par for lesser project counts.

Note for other readers.

Static graph is pretty safe to use.
We've found a very limited set of issues and most of those fail fast.
Unless you are customizing restore somehow, switching to static graph should just work.

FWIW you may break others who have custom Project Types wherein static graph does not work, I have filed a bug report at #10019

@aolszowka The dup of the issue you linked in tracked here.

Oh @jeffkl is already on it!

I have updated the issue body calling out the way to test for the equivalence of these 2 experiences.

If you see a problem, do let us know by filling an issue.

What was the status on dog-fooding this? I can't believe we're this unique to have two issues found by just us #10307

Was this page helpful?
0 / 5 - 0 ratings