Skip to content

feat: expose operation graph in progress report - #717

Merged
dmmordvi merged 1 commit into
mainfrom
feat/progress-report-graph
Sep 18, 2026
Merged

dmmordvi merged 1 commit into
mainfrom
feat/progress-report-graph

Conversation

@dmmordvi

@dmmordvi dmmordvi commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

The legacy progress report now exposes the plan as a graph: every operation carries id, category and dependsOn, meta and release operations are included, and all plans of a run are reported as one flat, topologically ordered slice. stageReports and waitingFor are removed. docs/progress-report.md describes the report for library consumers.

Key changes

  • progrep.Operation gains id, category, dependsOn; StageReport and waitingFor are gone, ProgressReport is a single operations slice.
  • Meta (StageStart/StageEnd) and release (CreateRelease/UpdateRelease/DeleteRelease) operations are reported, so cross-stage dependencies are visible.
  • Plans of a run are chained: later plans get an ordinal id prefix, their roots depend on the previous plan's sinks, and never-started operations of a finished plan become Canceled (new status), so the final snapshot has no Pending.
  • Untouched resources are those without plan operations, reported for the first plan only; NoUntouchedResources is removed, UntouchedResourcesOnly covers skipped plans.
  • ReleaseInstall and ReleaseUninstall close LegacyProgressReportCh on every return path, including early errors, so a consumer can range over it.
  • AutoRollback together with LegacyProgressReportCh is rejected; the unreachable rollback reporter plumbing is removed.

Why

The consumer received a flat list with no structure: meta and release operations were filtered out, so waitingFor only worked within a single chain and dependencies between resources in different stages were invisible. The graph lets the consumer render progress and ordering without reconstructing the plan.

Verification

  • task test:unit paths="./pkg/plan ./pkg/action" tags=ai_tests, including a test that builds a real install plan and failure plan via BuildPlan/BuildFailurePlan and checks the reported graph end to end.
  • Manual runs against minikube with a successful chart, a chart skipped as up to date, and two failing charts (with and without resource operations in the failure plan); the reports match the documented shape, Canceled and the 2/ prefix included.

Review focus / risks

  • Breaking JSON shape for the consumer: stageReports and waitingFor disappear, meta and release operations appear in the list, so progress counters must filter by category; must be rolled out together with the consumer side.
  • NoOp/Completed for untouched resources now also covers resources absent from the cluster whose creation a policy skipped; it means "nothing was done", not "resource exists".
  • Rejecting AutoRollback with LegacyProgressReportCh is a user-facing restriction; rollback reporting needs its own design.
  • Closing the channel on every path changes when a consumer sees the close after a Timeout: at return, while the deployment may still be winding down inside nelm.

Operations now carry id, category and dependsOn; waitingFor and
stageReports are removed in favor of a single flat operations slice.
Meta and release operations are included, so cross-stage dependencies
are visible through the stage boundary operations. Operations are
ordered by a stable topological sort with id as the tie-break.

Plans of one run form a single graph: operations of every plan after
the first get an ordinal id prefix and the root operations of a plan
depend on the final operations of the plan before it. Operations of a
finished plan that never started are reported as Canceled, a new
status, instead of staying Pending.

Untouched resources are those without plan operations, including
resources absent from the cluster whose creation a policy skipped;
NoOp/Completed states that nothing was done, not that the resource
exists. They are reported for the first plan only, so the
NoUntouchedResources option is gone. A plan that is skipped reports
its untouched resources alone via UntouchedResourcesOnly.

AutoRollback together with LegacyProgressReportCh is rejected, and the
reporter plumbing of the rollback path is removed as unreachable.
ReleaseInstall and ReleaseUninstall now close LegacyProgressReportCh on
every return path, so a consumer can simply range over it.

The progrep JSON shape changes: stageReports and waitingFor are gone,
operations, id, category, dependsOn and the Canceled status are added.
docs/progress-report.md describes the report for library consumers.

Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com>
@dmmordvi
dmmordvi force-pushed the feat/progress-report-graph branch from 9428d6a to 4d3c2b0 Compare September 18, 2026 15:38
@dmmordvi
dmmordvi marked this pull request as ready for review September 18, 2026 15:40
@dmmordvi
dmmordvi merged commit 7bf3d70 into main Sep 18, 2026
9 checks passed
@dmmordvi
dmmordvi deleted the feat/progress-report-graph branch September 18, 2026 15:56
alexey-igrychev added a commit that referenced this pull request Sep 21, 2026
Ported main's #717 (operation graph in progress report) and #718 (ReleaseInstall
returns a result) onto branch 2's rewritten release API. releaseInstall now
returns (*ReleaseInstallResultV1, error); branch 2's plan-artifact handling,
newReleaseLockManager helper and helmrel.Accessor signatures are kept, and the
result uses helmreleasestatus.Status instead of main's helmrelease.Status.

Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.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.

1 participant