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

Allow Dashboard application to roll-forward #5540

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

joperezr
Copy link
Member

@joperezr joperezr commented Sep 4, 2024

Description

In order to better support customers that only have the 9.0 SDK/Runtime installed, we will allow the Dashboard application to roll-forward to the next major, which would then not require the 8.0 runtime to also be installed in order to run the Aspire Dashboard. I have manually validated that with these changes I am able to run an Aspire application in a machine that only has .NET 9 installed. Automated tests will require having a setup where the 9.0 SDK is used, which will be added by @radical with the planned template work for 9.0. Once that is in place, we can go ahead and add automation for this.

Fixes #5445

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No. Tests will come in a subsequent PR once 9.0 tests infra is ready.
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
      • Link to aspire-docs issue:
    • No
Microsoft Reviewers: Open in CodeFlow

application is not able to run if the place where it is deployed does not have the .NET 8.0 runtime installed.
Given we want to be able to support people running on environments where they only have the 9.0 SDK/runtime installed,
we allow roll-forward to the next major in order to support these customers.-->
<RollForward>Major</RollForward>
Copy link
Member

Choose a reason for hiding this comment

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

How are we going to test this?

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 wrote in the description, the plan is that once we add 9.0 templates (@radical is working on it) we'll be adding tests specifically for environments with only 9.0 SDK installed (to validate that 9.0 templates can be created and built), so at that time we'll be able to add a test for this by using the 9.0 SDK to create a template, run it, and then validate that the dashboard is loading correctly.

Copy link
Member

Choose a reason for hiding this comment

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

Do we also want to run the Dashboard tests on net9? "validate that the dashboard is loading correctly" is a good first step, but it won't cover all the use cases of the dashboard.

Copy link
Member Author

Choose a reason for hiding this comment

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

We can certainly consider it, but not sure if we would get a lot from it so perhaps we can consider doing it in a format similar to runtime's outerloop runs (run once a day maybe?). Point being those tests would mostly be trying to catch breaking changes between 8.0 and 9.0, which while they are very possible, I'm guessing it is not something that may add a lot of value on testing on each CI run.

Copy link
Member Author

Choose a reason for hiding this comment

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

My above suggestion for "is it loading correctly" was simply to validate that the property is doing it's job and the 9.0 runtime is effectively being able to run the dashboard to begin with.

@joperezr
Copy link
Member Author

joperezr commented Sep 5, 2024

@eerhardt any other comments or is this good to go? It would be good to include in 9.0 preview 4, which is why I ask

@radical
Copy link
Member

radical commented Sep 5, 2024

How can this be tested locally?

@joperezr
Copy link
Member Author

joperezr commented Sep 5, 2024

The way I did it, was:

  1. Build the changes on this PR to generate a new set of packages and workload.
  2. Install 9.0 SDK locally to a folder, and add it to your path at the beginning.
  3. set DOTNET_MULTILEVEL_LOOKUP=0 so that only this SDK/runtime is used
  4. Install the produced workload on this SDK and create a new aspire project (aspire-starter or anything that has an AppHost)
  5. Because we don't yet have 9.0 targeting TFMs, manually open the project and replace all net8.0 TFMs in the projects with net9.0 TFMs for the TargetFramework properties.
  6. Build and Run and make sure the dashboard loads correctly

In the above case, the dashboard would still be targeting 8.0 but the SDK you are using doesn't have that runtime installed, but the dashboard is still able to run due to the rollForward policy.

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.

Let's do it! :shipit:

But let's be sure to get some tests when possible.

@joperezr joperezr merged commit 9a59d12 into dotnet:main Sep 5, 2024
11 checks passed
@joperezr
Copy link
Member Author

joperezr commented Sep 9, 2024

/backport to release/9.0-preview4

Copy link
Contributor

github-actions bot commented Sep 9, 2024

Started backporting to release/9.0-preview4: https://github.com/dotnet/aspire/actions/runs/10778910439

@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2024
@joperezr
Copy link
Member Author

/backport to release/8.2

@github-actions github-actions bot unlocked this conversation Oct 21, 2024
Copy link
Contributor

Started backporting to release/8.2: https://github.com/dotnet/aspire/actions/runs/11448087732

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 21, 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.

Allow Dashboard to roll-forward
3 participants