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

[release/7.0-staging] Check for <framework_name>.deps.json when enumerating framework paths #92033

Merged

Conversation

elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Sep 13, 2023

This adds a check for the framework's .deps.json instead of just the existence of the directory. To avoid extra file checks in the normal/happy path (where all framework version folder are valid), when resolving, it only does the check after resolving the best version match. And if that version directory isn't valid, it tries resolving again without it.

Backport of #90035

Customer Impact

The host treats the existence of a framework folder as a valid framework path. We've seen this cause issues as users can end up in this state without their knowledge - for example, uninstall leaves an empty folder, which would normally be harmless, except when we try to use it as a valid framework. This results in applications failing to run because we try to use that path as a framework. When users get into this state, it is not clear what is wrong and how to address it. They also remain in this broken state - typically until the framework is reinstalled or a newer version is installed.

See #91806, #48180

Testing

Automated tests added. Manual validation.

Risk

Low. The fix itself is fairly surgical - however, the change is on a path that every application will hit.

This adds a check for the framework's .deps.json instead of just the existence of the directory. To avoid extra file checks in the normal/happy path (where all framework version folder are valid), when resolving, it only does the check after resolving the best version match. And if that version directory isn't valid, it tries resolving again without it.

Backport of dotnet#90035
@ghost
Copy link

ghost commented Sep 13, 2023

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

Issue Details

This adds a check for the framework's .deps.json instead of just the existence of the directory. To avoid extra file checks in the normal/happy path (where all framework version folder are valid), when resolving, it only does the check after resolving the best version match. And if that version directory isn't valid, it tries resolving again without it.

Backport of #90035

Author: elinor-fung
Assignees: -
Labels:

area-Host

Milestone: -

@elinor-fung elinor-fung added the Servicing-consider Issue for next servicing release review label Sep 14, 2023
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

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

approved. we will take for consideration in 7.0.x

@jeffschwMSFT jeffschwMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 14, 2023
@elinor-fung elinor-fung merged commit db56d40 into dotnet:release/7.0-staging Sep 18, 2023
174 of 178 checks passed
@elinor-fung elinor-fung deleted the backport90035-rel7 branch September 18, 2023 16:35
@ghost ghost locked as resolved and limited conversation to collaborators Oct 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Host Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants