Explain recovery after cleaning up failed function generation - #8490
Closed
amcaplan wants to merge 2 commits into
Closed
Explain recovery after cleaning up failed function generation#8490amcaplan wants to merge 2 commits into
amcaplan wants to merge 2 commits into
Conversation
Assisted-By: devx/d54f9bfe-5e29-4147-aea5-071dbb6add71
Assisted-By: devx/d54f9bfe-5e29-4147-aea5-071dbb6add71
Contributor
Author
|
Closing in favor of #8491 |
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
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.
WHY are these changes introduced?
Related to https://github.com/shop/issues-develop/issues/23837.
When function dependency installation or GraphQL type generation fails, developers need to know that the incomplete extension was removed and how to retry. This is particularly relevant when pnpm blocks dependency build scripts.
WHAT is this pull request doing?
Keep recursive cleanup of the entire failed extension directory, including partial
node_modules. Report the original setup error with confirmation that the directory was removed and instructions to resolve the error and rerunshopify app generate extensionusing the same name. For pnpm projects, include conditional guidance forpnpm approve-builds.Add regression coverage for cleanup and successful regeneration after workspace installation, function runtime installation, and type-generation failures, including npm projects without workspaces. Includes a patch changeset.
The reported leftover
node_modulesdirectory has not been reproduced. Existing recursive cleanup passes the simulated failure tests; this PR improves recovery guidance and protects that cleanup behavior with tests.How to test your changes?
Validated locally:
pnpm test packages/app/src/cli/services/generate/extension.test.ts— 29 tests pass.pnpm exec eslint packages/app/src/cli/services/generate/extension.ts packages/app/src/cli/services/generate/extension.test.ts --fixpnpm exec tsc --noEmitfrompackages/appgit diff --checkTests use real temporary files and simulate dependency/type-generation failures. An actual pnpm build-approval failure has not been reproduced end to end.
Checklist