[BUG] 2.45.0 CE: manual git redeploy permanently degrades GitOps workflow to 'unknown' and stops auto-update drift sync; only stack recreation restores it
Before you start please confirm the following.
- Yes, I've searched similar issues on GitHub.
- Yes, I've checked whether this issue is covered in the Portainer documentation.
Problem Description
On Portainer CE 2.45.0, a GitOps workflow (stack created from a git repository) that is manually redeployed after creation gets permanently degraded: its file-validation statuses flip to unknown and, more importantly, the workflow appears to be skipped by the source's polling scan afterwards — normal branch-push auto-updates no longer apply until the stack is deleted and recreated.
This looks like a functional regression in the same family that was fixed in 2.42.0 ("Fixed GitOps auto-update skipping re-deployment when the commit hash was persisted before the deployment attempt"), resurfacing via the manual-redeploy path in the 2.45 Source/Workflow scheduler.
Observed on 5 independent workflows across 4 environments (Docker Standalone + Portainer Agent connected over tunnels), private GitHub repo, compose file at repository root, source polling interval 30m.
Expected Behavior
After a manual redeploy, the workflow keeps (or re-runs) its file validation and stays visible to the source scan, so subsequent pushes to the bound branch continue to trigger automatic drift-sync deployments.
Actual Behavior
- After the manual redeploy:
artifact.status->unknown,files[0].refStatus/pathStatus->unknown, whilestatus.sourceandstatus.targetremain healthy. - The state never self-heals (observed >48h across dozens of 30m poll cycles). The parent source's own
lastSyncstays fresh while the workflow-levellastSyncDateis frozen at the redeploy timestamp. - Calling the git redeploy / reconcile endpoints (
PUT /api/stacks/{id}/git/redeploy, Reconcile) does not restore the statuses. - Functional impact, not just telemetry: after a subsequent commit was pushed to the bound branch, the workflow did not auto-update across multiple poll windows; the change had to be applied manually on the host (equivalent of
docker compose up -d). Control group: workflows from the same batch that were only created (no manual redeploy) remain fully green and continue to sync correctly. - The only known workaround is deleting and recreating the stack from the same source (pure-created workflow goes green again) — for production deployments that means a real service interruption just to restore CI/CD drift detection.
Steps to reproduce the behavior
- Create a stack via
POST /api/stacks/create/standalone/repositoryfrom a git repo (compose at repository root) with AutoUpdate (e.g. 30m). After the first scan the workflow showsartifact=healthy,refStatus=healthy,pathStatus=healthy. - Trigger one manual redeploy (UI "Redeploy" button, or
PUT /api/stacks/{id}/git/redeploy). - Workflow statuses flip to
unknown(source/target stay healthy); workflowlastSyncDatefreezes. - Wait past several 30m poll cycles — status never recovers, scheduler log shows no error for the affected workflow.
- Push a new commit to the bound branch — no auto-update deployment happens.
- Delete + recreate the stack from the same source — green again, auto-update restored.
Portainer logs / portainer info
- Portainer CE 2.45.0 (Docker, Linux, behind reverse proxy).
GET /api/gitops/workflowsfor an affected workflow:artifact.status = "unknown",files[0].refStatus = "unknown",files[0].pathStatus = "unknown",status.source = healthy,status.target = healthy;lastSyncDatefrozen at the redeploy moment while the source'slastSynccontinues to advance.- Related but distinct issues: #13288 (false "git reference could not be found" for subdirectory compose), #13258 (AutoUpdate.Interval never persisted), #13291 (orphaned workflow refs after 2.43 migration). None covers the manual-redeploy -> permanent skip path.
Source: portainer/portainer