Skip to content

[Blueprints] Allow skipping plugin install failures - #3853

Merged
adamziel merged 1 commit into
trunkfrom
add/plugin-install-on-error
Jul 1, 2026
Merged

[Blueprints] Allow skipping plugin install failures#3853
adamziel merged 1 commit into
trunkfrom
add/plugin-install-on-error

Conversation

@adamziel

@adamziel adamziel commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

What?

Adds installPlugin.options.onError with two modes:

Value Behavior
throw Default. Installation or activation failures abort the Blueprint, matching existing behavior.
skip-plugin Logs a warning and lets the Blueprint continue when plugin installation or activation fails.

Also adds installPlugin.options.humanReadableName so skipped plugin warnings and progress text can use a useful display name when the source filename or URL is not readable.

Why?

Some Blueprints install optional plugins, especially compatibility-testing Blueprints that target nightly or beta WordPress/PHP combinations. In those cases, one incompatible plugin should be visible in logs without preventing the rest of the environment from booting.

This keeps the default behavior strict and only changes execution when the Blueprint explicitly opts in with skip-plugin.

Consumers

Consumer Benefit
Blueprint v2 runner Can map plugin-level onError: "skip-plugin" from the v2 spec to the existing installPlugin step.
Compatibility/testing Blueprints Can continue setting up the site when an optional plugin fails against a target WP/PHP version.
CLI and browser Playground users Get a warning for skipped plugins instead of a hard setup failure when the Blueprint author marked the plugin optional.
Existing v1 Blueprint consumers No behavior change unless they opt in through installPlugin.options.onError.

Tests

  • npm exec nx run playground-blueprints:build:blueprint-schema
  • npm exec nx run playground-blueprints:test:vite -- --testFiles=packages/playground/blueprints/src/tests/steps/install-plugin.spec.ts
  • npm exec nx run playground-blueprints:test:vite -- --testFiles=packages/playground/blueprints/src/tests/v1/compile.spec.ts
  • npm exec nx run playground-blueprints:lint
  • npm exec nx run playground-blueprints:typecheck
  • git diff --check
@adamziel
adamziel force-pushed the add/plugin-install-on-error branch from 0f358ec to d06d498 Compare July 1, 2026 12:57
@adamziel
adamziel marked this pull request as ready for review July 1, 2026 13:53
Base automatically changed from add/plugin-activation-options to trunk July 1, 2026 13:54
@adamziel
adamziel requested review from a team and brandonpayton July 1, 2026 13:54
@adamziel
adamziel force-pushed the add/plugin-install-on-error branch from d06d498 to d3c1c16 Compare July 1, 2026 13:55
@adamziel
adamziel merged commit 045b09f into trunk Jul 1, 2026
51 checks passed
@adamziel
adamziel deleted the add/plugin-install-on-error branch July 1, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment