Skip to content
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

Add support for installing latest build from main to scripts and update docs. #4682

Merged
merged 5 commits into from
Aug 7, 2024

Conversation

joperezr
Copy link
Member

@joperezr joperezr commented Jun 26, 2024

This should make it easier to dogfood latest nightly build by adding this support to our installLatest... scripts. This also updates the dogfooding docs in our repo.

cc: @mitchdenny

Microsoft Reviewers: Open in CodeFlow

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 26, 2024
@joperezr
Copy link
Member Author

FYI @balachir since this can now change the dogfooding instructions your team uses going forward.

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

Script changes look good. Just a suggestion on the document.


As usual this will add the feed to any existing NuGet.config in the directory or above, or else in the global NuGet.config. See [configuring NuGet behavior](https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior) to read more about that.
The [workload installation script](./../eng/installLatestFromReleaseBranch.ps1)) will install the latest .NET Aspire workload from the release branch, but it can also install latest from main (latest nightly build) if the `-FromMain` flag is used (`--fromMain` on Linux/macOS).
Copy link
Member

Choose a reason for hiding this comment

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

How should I choose? Something like "The main branch will generally have the most recent code, while the release branch will generally have been more tested."

Copy link
Member Author

Choose a reason for hiding this comment

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

In reality, nowadays you really only want -FromMain always, as the script doesn't work with stable builds, and since all of the builds out of our release branch are stable now, it means the release branches support doesn't work now. I think the way forward is that the script should be changed such that the default (without params) installs you latest build from main, and if you specify a flag we instead install you the latest GA build.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can either do that in this PR or as a follow up. Since I'll be out for two weeks and some people might benefit from this today, I tempted to push support for main now and then as a follow up fix the scripts to support the above.

@mitchdenny
Copy link
Member

I just tried this out on a devbox and it didn't configure the templates:

Output from command:

PS C:\Code\aspire\eng> .\installLatestFromReleaseBranch.ps1 -FromMain

Advertising manifest not updated. Manifest package for microsoft.net.workload.mono.toolchain.current doesn't exist.
Advertising manifest not updated. Manifest package for microsoft.net.workload.emscripten.current doesn't exist.
Skipping NuGet package signature verification.
Updated advertising manifest microsoft.net.workload.emscripten.net6.
Updated advertising manifest microsoft.net.sdk.android.
Updated advertising manifest microsoft.net.workload.emscripten.net7.
Updated advertising manifest microsoft.net.workload.mono.toolchain.net7.
Updated advertising manifest microsoft.net.workload.mono.toolchain.net6.
Updated advertising manifest microsoft.net.sdk.maui.
Updated advertising manifest microsoft.net.sdk.ios.
Updated advertising manifest microsoft.net.sdk.macos.
Updated advertising manifest microsoft.net.sdk.tvos.
Updated advertising manifest microsoft.net.sdk.aspire.
Updated advertising manifest microsoft.net.sdk.maccatalyst.
The machine has a pending reboot. The workload operation will continue, but you may need to restart.
Downloading microsoft.net.sdk.aspire.manifest-8.0.100.msi.x64 (8.1.0-preview.1.24326.3)
Installing microsoft.net.sdk.aspire.manifest-8.0.100.msi.x64 ...... Done
Downloading Microsoft.Android.Sdk.Windows.Msi.x64 (33.0.95)
Workload installation failed. Rolling back installed packs...
Removing microsoft.net.sdk.aspire.manifest-8.0.100.msi.x64 .... Done
Workload update failed: One or more errors occurred. (Version 33.0.95 of package microsoft.android.sdk.windows.msi.x64 is not found in NuGet feeds https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json".)

Workload(s) 'aspire' are already installed.
Advertising manifest not updated. Manifest package for microsoft.net.workload.mono.toolchain.current doesn't exist.
Advertising manifest not updated. Manifest package for microsoft.net.workload.emscripten.current doesn't exist.
Skipping NuGet package signature verification.
The machine has a pending reboot. The workload operation will continue, but you may need to restart.
Downloading Aspire.Hosting.Sdk.Msi.x64 (8.1.0-preview.1.24326.3)
Installing Aspire.Hosting.Sdk.Msi.x64 .... Done
Downloading Aspire.ProjectTemplates.Msi.x64 (8.1.0-preview.1.24326.3)
Installing Aspire.ProjectTemplates.Msi.x64 .... Done
Downloading Aspire.Hosting.Orchestration.win-x64.Msi.x64 (8.1.0-preview.1.24326.3)
Installing Aspire.Hosting.Orchestration.win-x64.Msi.x64 ...... Done
Downloading Aspire.Hosting.Msi.x64 (8.1.0-preview.1.24326.3)
Installing Aspire.Hosting.Msi.x64 .... Done
Downloading Aspire.Dashboard.Sdk.win-x64.Msi.x64 (8.1.0-preview.1.24326.3)
Installing Aspire.Dashboard.Sdk.win-x64.Msi.x64 ..... Done
Downloading Microsoft.Android.Sdk.Windows.Msi.x64 (33.0.95)
Workload installation failed. Rolling back installed packs...
Removing Aspire.Dashboard.Sdk.win-x64.Msi.x64 ..... Done
Removing Aspire.Hosting.Msi.x64 .... Done
Removing Aspire.Hosting.Orchestration.win-x64.Msi.x64 .... Done
Removing Aspire.ProjectTemplates.Msi.x64 .... Done
Removing Aspire.Hosting.Sdk.Msi.x64 .... Done
Removing microsoft.net.sdk.aspire.manifest-8.0.100.msi.x64 .... Done
Workload installation failed: One or more errors occurred. (Version 33.0.95 of package microsoft.android.sdk.windows.msi.x64 is not found in NuGet feeds https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json".)
Installed Latest version of .NET Aspire produced from the main branch. Version installed was 8.1.0-preview.1.24326.3.

Then I jumped up to a clean parent directory and executed this command to create a starter project:

$ dotnet new aspire -o Dogfood81
No templates or subcommands found matching: 'aspire'.

To list installed templates similar to 'aspire', run:
   dotnet new list aspire
To search for the templates on NuGet.org, run:
   dotnet new search aspire


For details on the exit code, refer to https://aka.ms/templating-exit-codes#103

@joperezr
Copy link
Member Author

I just tried this out on a devbox and it didn't configure the templates

I followed up with @mitchdenny offline about this and he is now in a working state. The issue he was hitting was that he was using an 8.0.400 preview SDK which depended on unreleased packages for other workloads. This was fixed by adding the dotnet7 feed to his sources.

@danmoseley danmoseley added area-engineering-systems and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jul 2, 2024
@joperezr
Copy link
Member Author

joperezr commented Aug 7, 2024

Forgot to merge this PR. Merging as I just validated and scripts still work as expected and it would be good for folks to dogfood.

@joperezr joperezr merged commit 2ce4800 into dotnet:main Aug 7, 2024
9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants