Skip to content

Conversation

@nagilson
Copy link
Member

@nagilson nagilson commented Jan 13, 2026

context

for #52090
copilot failed attempt #52338

  • Workload Manifest Reader will always fail with ManifestFromWorkloadSetNotFound when calling GetManifests when 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:

  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, so don't repair it.

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
…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
@nagilson
Copy link
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant