-
Notifications
You must be signed in to change notification settings - Fork 1.2k
workload x can recover from corrupt workload sets
#52434
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
Draft
nagilson
wants to merge
9
commits into
dotnet:release/10.0.1xx
Choose a base branch
from
nagilson:nagilson-recover-manifests-on-install
base: release/10.0.1xx
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
workload x can recover from corrupt workload sets
#52434
nagilson
wants to merge
9
commits into
dotnet:release/10.0.1xx
from
nagilson:nagilson-recover-manifests-on-install
+427
−7
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Plan: (this commit is step 1 of the plan but idk if it works completely yet) - Workload Manifest Reader will always fail with `ManifestFromWorkloadSetNotFound` when calling GetManifests. I considered removing the workload set entirely during workload set search if the manifests didn't exist and it was corrupt but this would prevent the repair from working and still require user interaction. Removing the error is not sufficient because then we never recover from the bad state or detect the bad state. So, 1. Add a function to repair so it can repair missing manifests, because before it called ReinstallWorkloadsBasedOnCurrentManifests which calls install workloads, which calls install packs, which needs to read the manifests to know the packs, so repair would fail. 2. Once repair is able to fix the issue, resolve the other commands to be able to fix the issue by A - detecting corrupt issue, and then calling the repair subcomponent to install missing manifests 3. Make sure repair isn't cyclical and doesn't try to call the sub repair option (should be ok, because we don't get to the missing manifests code until we've already repaired the manifests) 4. Add boolean for manifest reader or whatever to print during info, version or list that there was a corrupt workload set likely from pkg manager but still allow repairing it (or decide if we don't want to do that.)
workload restore is not setup for the injection so didn't add it there but the code is shared between the two so testing like this should be decent
…ommand so it can be shared
6 tasks
…rkload command so it can be shared" This reverts commit a3959ba.
… also fixed this prevents needing to inherit or modify many command files at once
Member
Author
|
I need to test this in a file-based setup and hopefully with an actual repro from homebrew. Doubt we'll have time for the 2nd one. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
context
for #52090
copilot failed attempt #52338
ManifestFromWorkloadSetNotFoundwhen callingGetManifestswhen package managers clean up manifests from older sdk versions.What's this do
I considered removing the workload set entirely during workload manifest search if the manifests didn't exist and it was corrupt but this would prevent the repair from working and still require user interaction.
Removing the error is not sufficient because then we never recover from the bad state or detect the bad state.
So, here's what I did in order:
Add a function to repair so it can repair missing manifests, because before it called ReinstallWorkloadsBasedOnCurrentManifests which calls install workloads, which calls install packs, which needs to read the manifests to know the packs, so repair would fail.
Once repair is able to fix the issue, resolve the other commands to be able to fix the issue by A - detecting corrupt issue, and then calling the repair subcomponent to install missing manifests
Make sure repair isn't cyclical and doesn't try to call the sub repair option (should be ok, because we don't get to the missing manifests code until we've already repaired the manifests)
Add boolean for manifest reader or whatever to print during info, version or list that there was a corrupt workload set likely from pkg manager, so don't repair it.