Skip to content

Let weft_force_redeploy reach the weft deploy templates - #1274

Open
JacobHaig wants to merge 1 commit into
devfrom
fix/weft-door-force-redeploy-survey
Open

JacobHaig wants to merge 1 commit into
devfrom
fix/weft-door-force-redeploy-survey

Conversation

@JacobHaig

@JacobHaig JacobHaig commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

scripts/semaphore-launch.py refuses a --set that the template's survey does not declare (build_task, "Not survey fields of ..."). Neither Deploy weft Front Door nor Deploy weft Staging declared weft_force_redeploy, so tasks/weft-deploy.yml's redeploy switch could not be reached through the launcher. jestyr27 flagged this as unverified on #1255.

What it blocks:

Both surveys gain weft_force_redeploy, a string defaulting to "false", the same shape as force_overwrite. The playbook already reads it as weft_force_redeploy | default(false) | bool. The launcher fills the default, so a launch that doesn't set it behaves as before.

After merge, the two (Dev) surveys still need publishing through Publish Semaphore Template Surveys (Dev).

Checks run locally: yamllint -c .yamllint.yml platform/semaphore/templates.yml (no errors; the three line-length warnings are on existing lines), and pytest over every platform/tests file touching templates, surveys, Semaphore, the launcher and weft (38 files, all passed). Not run locally: ansible-lint, shellcheck and BATS. No playbook or shell changed.

Summary by CodeRabbit

  • New Features
    • Added an optional redeployment setting for Front Door and Staging deployments. Set it to true to request redeployment of hosts already on the selected pin or release; it defaults to false.

scripts/semaphore-launch.py refuses a --set the template's survey does not
declare, and neither Deploy weft Front Door nor Deploy weft Staging declared
weft_force_redeploy. So a host already healthy on its pin could not be
redeployed through the launcher: the #1252 backup settings would never render
on a front door whose pin had not moved, and staging's re-launch after
weft_workspace_id is set (agent-cloud#1255, step 9) would leave a workspace
that had passed its first deploy on the old settings.

Both surveys gain the field, default "false", the same shape as
force_overwrite; the playbook already reads it with `| bool`.
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Front Door and Staging deployment templates add an optional weft_force_redeploy survey field. Both fields default to "false" and describe when to set the value to "true" to request redeployment.

Changes: Weft redeploy inputs

Layer / File(s) Summary
Add force-redeploy survey fields
platform/semaphore/templates.yml
The Front Door and Staging surveys add an optional weft_force_redeploy field with a "false" default. Their descriptions state that "true" requests redeployment of hosts already on the relevant pin or release.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

  • Issue 1255: The new field supports requesting a redeploy when Staging has already run once.

Suggested reviewers: jestyr27

Merge Risk: Minimal · up to 03c21

This adds an optional redeploy switch to the Front Door and Staging surveys. Launches that do not set it behave as before. No concrete merge-blocking risk was found. The two Dev surveys still need publishing after merge, as the author noted.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: the weft_force_redeploy field is added to the survey templates so that launches can pass it through. The raw summary confirms both Deploy weft Front Door and Deploy weft St…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: the weft_force_redeploy field is added to the survey templates so that launches can pass it through. The raw summary confirms both Deploy weft Front Door and Deploy weft Staging gain the optional field, and the objectives describe the launcher rejecting undeclared --set values as the blocker. The title is specific and matches the main change, though it does not mention the Staging/Front Door scope or the default value.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 7808ad5 and 03c21e1.

Files selected for processing: 1

  • platform/semaphore/templates.yml

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant