Skip to content

fix(blueprint): retain scheduled planning failures - #9234

Open
jcamargos wants to merge 1 commit into
apache:mainfrom
jcamargos:codex/blueprint-plan-failure
Open

jcamargos wants to merge 1 commit into
apache:mainfrom
jcamargos:codex/blueprint-plan-failure

Conversation

@jcamargos

@jcamargos jcamargos commented Oct 18, 2026 •

Copy link
Copy Markdown

Summary

A scheduled blueprint whose source plugin fails during plan generation currently leaves only a log entry: no pipeline is created, so pipeline history and status notifications miss the failed attempt.

Record these attempts as terminal FAILED pipelines with the original planning error, timestamps, blueprint identity, sync policy, priority, and labels. Persist the pipeline and labels in one transaction without creating tasks or entering the execution queue. Notify through the existing notification service only after commit. Storage and notification failures are logged without replacing the original planning error.

Manual triggers still return planning errors directly without creating history. Empty-plan handling and normal pipeline creation retain their existing behavior. The developer manual documents recovery: correct the blueprint/connection and trigger a new run, since a planning failure has no tasks to rerun.

Does this close any open issues?

Fixes #9232.

Screenshots

Not applicable: no frontend changes.

Other Information

Validation on Linux with Go 1.26.9 and the repository's generated mocks:

  • The new TestBlueprintJobRecordsPlanFailure regression test fails against the original production files at ee0079ab32d4a80220c9369f899120a98db8db34 (using a Go overlay), because neither persistence nor notification occurs.
  • go test -race -count=1 ./server/services ./core/models ./impls/dalgorm
  • go vet ./server/services ./core/models ./impls/dalgorm
  • golangci-lint v2.14.0 with the repository configuration over ./server/services/... ./core/models/... ./impls/dalgorm/...
  • git diff --check

Regression coverage includes committed terminal records, notification failure, pipeline/label/commit/rollback errors, missing labels, the public manual-trigger path, empty-plan handling, successful creation, pending pipelines, and insertion failure.

No database migration or API schema change is required. Tests use mocked DAL/notification interfaces; live MySQL/PostgreSQL and browser end-to-end tests were not run. Notifications retain the existing delivery semantics. Existing UI task-rerun controls cannot regenerate an absent plan; the persisted error message directs users to trigger a new blueprint run.
Suggested labels: pr-type/bug-fix, component/framework. GitHub rejected applying these labels because the contributor account does not have label permissions in this repository.

Signed-off-by: Jose Camargo <aml.camargo@hotmail.com>
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.

[Bug][Blueprint] Scheduled run fails silently when plan generation errors

1 participant