feat(bench): Trigger install of SSH command guard on benches#6718
Draft
regdocs wants to merge 1 commit into
Draft
feat(bench): Trigger install of SSH command guard on benches#6718regdocs wants to merge 1 commit into
regdocs wants to merge 1 commit into
Conversation
Pairs with the agent-side bench wrapper that blocks destructive commands (drop-site, migrate, restore, etc.) run directly over SSH on production benches, which would put a site's state out of sync with Frappe Cloud. Press owns the blocklist (BLOCKED_BENCH_COMMANDS) and sends it to the agent, so it can change without rebuilding the bench image. The guard lives on the container filesystem rather than the image, so it is (re)installed every time a bench turns Active - covering both new benches and fresh containers from a redeploy. backfill_command_guard_on_active_benches covers benches already running; it is left out of patches.txt so it does not fire jobs before the agent endpoint is deployed. The enforcement can't live in the bench CLI (pinned/immutable in prod), hence routing it through press > agent.
Contributor
|
fixes #6208 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pairs with the agent-side bench wrapper that blocks destructive commands (drop-site, migrate, restore, etc.) run directly over SSH on production benches, which would put a site's state out of sync with Frappe Cloud.
Press owns the blocklist (BLOCKED_BENCH_COMMANDS) and sends it to the agent, so it can change without rebuilding the bench image. The guard lives on the container filesystem rather than the image, so it is (re)installed every time a bench turns Active - covering both new benches and fresh containers from a redeploy. backfill_command_guard_on_active_benches covers benches already running; it is left out of patches.txt so it does not fire jobs before the agent endpoint is deployed.
The enforcement can't live in the bench CLI (pinned/immutable in prod), hence routing it through press > agent.