{
  "slug": "pulumi-deployment-fails-when-an-after-hook-fails-0dc435849d66",
  "title": "Pulumi deployment fails when an after hook fails",
  "tools": [
    "pulumi"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-05-13T21:23:27.000Z",
  "announced_at": "2026-05-13T21:23:27.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a Pulumi after hook fails, the deployment fails by default after the provider operation succeeds and its result is recorded in state. Set the hook’s `ignoreErrors` option to log a warning and continue, or run `pulumi up --continue-on-error` to keep processing other resources.",
    "examples": [
      "pulumi up --continue-on-error"
    ],
    "gotchas": [
      "Version: 3.238.0",
      "ignoreErrors: Set on a hook to log a warning and continue instead of failing the deployment when the hook returns an error.",
      "--continue-on-error: Continue updating resources when an error is encountered; can also be set with `PULUMI_CONTINUE_ON_ERROR`. Applies to the whole deployment.",
      "Prerequisite: Use Pulumi CLI v3.238.0 or later for the documented after-hook failure behavior.",
      "When an after hook runs, the provider operation has succeeded and its result is recorded in state before the deployment is canceled.",
      "With `--continue-on-error`, the deployment keeps going."
    ]
  },
  "why_it_matters": "Configure or run a deployment with after hooks and handle a hook failure.",
  "before": "Before v3.238.0, an after hook that returned an error logged a warning and the deployment continued.",
  "sources": [
    "https://github.com/pulumi/pulumi/releases/tag/v3.238.0",
    "https://github.com/pulumi/pulumi/pull/22935",
    "https://www.pulumi.com/docs/iac/cli/commands/pulumi_up",
    "https://www.pulumi.com/docs/iac/concepts/resources/options/hooks/"
  ],
  "rank": 0.93021,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave1b-20261016",
    "verdict_id": "wave1b-20261016:wave1b-20261016-aa1abae45a4ef153-10:gate",
    "evidence_hash": "78e9baaa7c1f1a6ba2d30dec2ccd9748ec0743b44cf45b541e100ae3362ef734"
  },
  "review": {
    "draft_hash": "35aa3c5527e5d8490f180df653699f277fe96286b2a895f8f0c59fd7753b312f",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-20261016:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.93 >= 0.9; 2 needed) and Jev gave 0.69 (>= 0.6 needed)."
  }
}
