Skip to content

flowey: migrate nuget package restore from nuget.exe to dotnet restore#2907

Draft
benhillis wants to merge 6 commits intomicrosoft:mainfrom
benhillis:user/benhill/dotnet_restore
Draft

flowey: migrate nuget package restore from nuget.exe to dotnet restore#2907
benhillis wants to merge 6 commits intomicrosoft:mainfrom
benhillis:user/benhill/dotnet_restore

Conversation

@benhillis
Copy link
Member

@benhillis benhillis commented Mar 6, 2026

Replace nuget.exe with dotnet restore for all NuGet package downloads. Authentication on local builds uses az CLI session tokens passed via VSS_NUGET_EXTERNAL_FEED_ENDPOINTS. CI builds use the UseDotNet ADO task and pipeline-level auth.

Also removes the Azure Credential Provider module and external_nuget_auth plumbing, which are no longer needed.

Adds install_dotnet_cli and ado_task_use_dotnet flowey nodes. Updates getting started docs with az CLI login instructions and dotnet-sdk-8.0 as a WSL dependency.

There will be a follow-up change that removes the nuget install node, which is currently used on some internal pipelines that can be migrated over to use the ADO nuget task.

@benhillis benhillis requested a review from a team as a code owner March 6, 2026 23:45
Copilot AI review requested due to automatic review settings March 6, 2026 23:45
@benhillis benhillis marked this pull request as draft March 6, 2026 23:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates Flowey’s NuGet package restore path from nuget.exe-based installs to dotnet restore, adding Flowey nodes to provision the .NET SDK and removing Azure Credential Provider plumbing that is no longer needed.

Changes:

  • Reworked nuget_install_package to generate a synthetic .csproj and download packages via dotnet restore, with local auth using an az-derived Azure DevOps session token.
  • Added Flowey nodes to install/locate dotnet (install_dotnet_cli) and to emit the ADO UseDotNet@2 task (ado_task_use_dotnet).
  • Removed local CLI flags and nodes related to nuget.exe/mono and Azure Credential Provider installation; updated pipeline parameter wiring accordingly.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
flowey/flowey_lib_hvlite/src/_jobs/cfg_common.rs Drops nuget/credential-provider wiring; adds dotnet CLI auto-install request for local runs.
flowey/flowey_lib_common/src/nuget_install_package.rs Switches NuGet downloads to dotnet restore; adds local ADO session-token injection into a per-restore nuget.config.
flowey/flowey_lib_common/src/lib.rs Exposes new dotnet-related modules and removes the credential provider module export.
flowey/flowey_lib_common/src/install_nuget_azure_credential_provider.rs Removes the Azure Artifacts Credential Provider installer node.
flowey/flowey_lib_common/src/install_dotnet_cli.rs New node to resolve/install dotnet across Local/ADO/GitHub backends.
flowey/flowey_lib_common/src/download_nuget_exe.rs Simplifies nuget.exe download logic; removes install-platform and WSL mono forcing.
flowey/flowey_lib_common/src/ado_task_use_dotnet.rs New ADO task wrapper for UseDotNet@2.
flowey/flowey_lib_common/src/ado_task_nuget_tool_installer.rs Removes the ADO NuGetToolInstaller@1 wrapper.
flowey/flowey_hvlite/src/pipelines_shared/cfg_common_params.rs Removes local flags for nuget mono/auth and stops passing them into cfg_common.
flowey/flowey_hvlite/src/pipelines/vmm_tests.rs Stops populating removed cfg_common local nuget fields.
flowey/flowey_hvlite/src/pipelines/restore_packages.rs Stops populating removed cfg_common local nuget fields.
flowey/flowey_hvlite/src/pipelines/custom_vmfirmwareigvm_dll.rs Stops populating removed cfg_common local nuget fields.
flowey/flowey_hvlite/src/pipelines/build_igvm.rs Stops populating removed cfg_common local nuget fields.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.


You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.


You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.


You can also share your feedback on Copilot code review. Take the survey.

@benhillis benhillis force-pushed the user/benhill/dotnet_restore branch 2 times, most recently from 43d636a to 7af08bf Compare March 7, 2026 21:32
@benhillis benhillis requested a review from Copilot March 7, 2026 21:33
@@ -6,23 +6,10 @@
use flowey::node::prelude::*;
Copy link
Member Author

Choose a reason for hiding this comment

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

This is only used by a few internal pipelines that I will be changing over in a follow-up change.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.


You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated 5 comments.


You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.


You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated no new comments.


You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.


You can also share your feedback on Copilot code review. Take the survey.

OpenVMM Team and others added 5 commits March 10, 2026 20:57
Replace nuget.exe with dotnet restore for all NuGet package downloads.
Authentication on local builds uses az CLI session tokens injected into
nuget.config. CI builds use the UseDotNet ADO task and pipeline-level
auth.

Also removes the Azure Credential Provider module and external_nuget_auth
plumbing, which are no longer needed.

Adds install_dotnet_cli and ado_task_use_dotnet flowey nodes. Updates
getting started docs with az CLI login instructions and dotnet-sdk-8.0
as a WSL dependency.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.


You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.


You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +131 to +135
let dotnet_bin_name = rt.platform().binary("dotnet");
let dotnet_bin_path = install_dir.join(&dotnet_bin_name);

if !dotnet_bin_path.exists() {
log::info!(
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

When auto_install is enabled, this code skips running dotnet-install as soon as the dotnet binary exists in the persistent install dir. That can leave an outdated SDK in place (or ignore a different requested Version channel), and later dotnet restore may fail if the required SDK isn’t actually installed. Consider either always re-running dotnet-install (it’s idempotent) for the requested channel, or validating the installed SDKs (e.g. via dotnet --list-sdks) before deciding to skip installation.

Copilot uses AI. Check for mistakes.
Comment on lines +433 to +440
fn move_dir(src: &Path, dest: &Path) -> anyhow::Result<()> {
match fs_err::rename(src, dest) {
Ok(()) => Ok(()),
Err(e) => {
// rename(2) fails with EXDEV (errno 18 on Linux, error 17 on
// Windows) when src and dest are on different filesystems.
// Fall back to a recursive copy + delete.
log::debug!(
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

move_dir falls back to recursive copy+delete on any rename error. That can mask real failures (e.g. permissions, dest exists) and potentially do extra work before failing. It’s safer to only fall back when the error is an actual cross-filesystem move (EXDEV) and otherwise return the original error.

Copilot uses AI. Check for mistakes.
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.

2 participants