Skip to content

bug: handle errors when SyncMode is set to DryRun#1885

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:dry-run-error
Jul 23, 2026
Merged

bug: handle errors when SyncMode is set to DryRun#1885
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:dry-run-error

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

DryRun ClusterReports were left unpopulated whenever a resource's dry-run apply failed (e.g. a StatefulSet update rejected with Forbidden: updates to statefulset spec for fields other than ... are forbidden). The failure surfaced correctly on ClusterSummary.Status.FeatureSummaries[].FailureMessage, but ClusterReport.Status.ResourceReports never got written, because postProcessDeployedResources returned early on deployError before reaching the call that persists the report.

This fixes both:

  • deployUnstructured now records an Error-action ResourceReport (with the apply error as the message) for a resource whose dry-run apply fails, but only in SyncMode: DryRun
  • postProcessDeployedResources now persists whatever ResourceReports were gathered before returning the deploy error, instead of skipping the ClusterReport update entirely.

DryRun ClusterReports were left unpopulated whenever a resource's dry-run apply failed (e.g. a StatefulSet
update rejected with `Forbidden: updates to statefulset spec for fields other than ... are forbidden`).
The failure surfaced correctly on `ClusterSummary.Status.FeatureSummaries[].FailureMessage`, but
`ClusterReport.Status.ResourceReports` never got written, because `postProcessDeployedResources` returned
early on `deployError` before reaching the call that persists the report.

This fixes both:
- `deployUnstructured` now records an `Error`-action `ResourceReport` (with the apply error as the message) for
a resource whose dry-run apply fails, but only in `SyncMode: DryRun`
- `postProcessDeployedResources` now persists whatever `ResourceReports` were gathered before returning the deploy
error, instead of skipping the ClusterReport update entirely.
@gianlucam76
gianlucam76 merged commit 49d7666 into projectsveltos:main Jul 23, 2026
18 of 20 checks passed
@gianlucam76
gianlucam76 deleted the dry-run-error branch July 23, 2026 09:20
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