Files
windmill/cli/src
Diego ImbertandClaude Opus 5 493d19689c fix(cli): stop sync push from resetting an app's run-as, sandbox and execution mode
A raw app's policy was regenerated from the local sources alone on every push:
raw_app.yaml records only the access mode, so `on_behalf_of` was rewritten to
whoever ran the push, and `sandbox`, `frontend_sdk_scopes` and a `viewer`
execution mode were dropped. A CI job running `wmill sync push` silently
re-permissioned every raw app it touched.

Start the regenerated policy from the deployed one, so the fields nothing local
states carry over, and send `preserve_on_behalf_of` the way the low-code push
already does. Low-code apps went through the same regeneration, so they lost
`sandbox` too; both paths now share `deployedPolicyBase`, which drops the legacy
`triggerables` the backend folds into `triggerables_v2` rather than carrying
stale grants forward.

The deletion-driven re-push (a file removed inside a flow/app/raw-app folder)
also reached `pushObj` without the permissioned-as context, so it reset
ownership even where the normal path preserved it.

Fixes #11046

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MaJ9KHDeaWrWUdVsHeHQ8L
2026-09-09 16:33:25 +02:00
..