Skip to content

Commit 46bfc92

Browse files
authored
Merge pull request #737 from flashcatcloud/feat/change-c3-test3
docs(scalr): cancel and discard send no webhook delivery (test)
2 parents 5ac55e7 + 18b5002 commit 46bfc92

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

  • en/on-call/integration/change-integration
  • zh/on-call/integration/change-integration

‎en/on-call/integration/change-integration/scalr.mdx‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords: ["change integration", "Scalr", "Terraform", "OpenTofu", "Run", "Webho
66

77
<Tip>**Plan requirement**: This feature requires an On-call Standard or higher subscription. [Learn more](https://flashcat.cloud/flashduty/price/)</Tip>
88

9-
Use Scalr webhooks to sync Terraform and OpenTofu runs to Flashduty On-call. Each run becomes one Flashduty change: the change is created when a run waits for a person to confirm it, and the same change is updated when the run applies, errors, is canceled, or is discarded.
9+
Use Scalr webhooks to sync Terraform and OpenTofu runs to Flashduty On-call. Each run becomes one Flashduty change: the change is created when a run waits for a person to confirm it, and the same change is updated when the run applies or errors.
1010

1111
<div className="hide">
1212

@@ -38,7 +38,7 @@ At account scope, go to **Integrations → Events Forwarding → Webhook** and c
3838

3939
<Step title="Assign it to environments">
4040

41-
In the webhook's Environments, select the environments you want to connect.
41+
A new webhook is created with **Allow all current and future environments to have access to this webhook** turned on, so no assignment is needed. To limit it, turn that switch off in the webhook's **Environments access** tab and select the environments you want to connect.
4242

4343
</Step>
4444
</Steps>
@@ -50,19 +50,18 @@ In the webhook's Environments, select the environments you want to connect.
5050
|---|---|---|
5151
| Run | `run.id`, for example `run-v0oe5ki1pnaptv123` | Every delivery of one run updates the same change; two runs of the same workspace are two changes |
5252

53-
Scalr sends a delivery at only three moments: a run needs a person's confirmation, a run finishes successfully, and a run errors or is canceled. A change therefore has no Ready or Processing state; its first state is Planned (waiting for confirmation) or an end state. A run that applies automatically produces one record, when it ends.
53+
Scalr sends a delivery at only three moments: a run needs a person's confirmation, a run finishes successfully, and a run errors. Canceling a run or discarding it at the confirmation step sends nothing, so such a run's change stays Planned (or is never created). A change therefore has no Ready or Processing state; its first state is Planned (waiting for confirmation) or an end state. A run that applies automatically produces one record, when it ends.
5454

5555
## Status mapping
5656
---
5757

58-
| Delivery event (event-name) | Run status (run.status) | Flashduty change status |
58+
| Delivery event (event_name) | Run status (run.status) | Flashduty change status |
5959
|---|---|---|
6060
| run:needs_attention | any, for example planned or policy_override (waiting for confirmation or a policy override) | Planned |
6161
| run:completed | applied | Done |
6262
| run:errored | errored | Failed |
63-
| run:errored | canceled, discarded | Canceled |
6463

65-
End events are mapped by run status: `applied` is Done, `errored` is Failed, and `canceled` and `discarded` (a run abandoned at the confirmation step) are Canceled. Done, Failed, and Canceled are end states, and Flashduty records the change's end time.
64+
End events are mapped by run status: `applied` is Done and `errored` is Failed (a `canceled` or `discarded` status in an end event would be Canceled, but Scalr does not send one). Done and Failed are end states, and Flashduty records the change's end time.
6665

6766
These deliveries return success and create no change: an end event whose run status is `planned_and_finished` (a plan-only or no-change run, nothing was applied), and any event outside the `run:` family.
6867

‎zh/on-call/integration/change-integration/scalr.mdx‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords: ["变更集成", "Scalr", "Terraform", "OpenTofu", "Run", "Webhook", "
66

77
<Tip>**版本要求**:此功能需要 On-call 标准版及以上订阅。[了解更多](https://flashcat.cloud/flashduty/price/)</Tip>
88

9-
通过 Scalr 的 Webhook 将 Terraform / OpenTofu Run 同步到 Flashduty On-call。每一次 Run 对应一条 Flashduty 变更:Run 等待人工确认时创建变更,Apply 成功、出错、被取消或被放弃时更新同一条变更。
9+
通过 Scalr 的 Webhook 将 Terraform / OpenTofu Run 同步到 Flashduty On-call。每一次 Run 对应一条 Flashduty 变更:Run 等待人工确认时创建变更,Apply 成功或出错时更新同一条变更。
1010

1111
<div className="hide">
1212

@@ -38,7 +38,7 @@ Webhook 在 Account 范围创建,再分配给 Environment;分配后,该 En
3838

3939
<Step title="分配给 Environment">
4040

41-
在 Webhook 的 Environments 中,选择需要接入的 Environment。
41+
新建的 Webhook 默认开启 **Allow all current and future environments to have access to this webhook**,无需再分配。如需限定范围,在 Webhook 的 **Environments access** 页签关闭该开关,再选择需要接入的 Environment。
4242

4343
</Step>
4444
</Steps>
@@ -50,19 +50,18 @@ Webhook 在 Account 范围创建,再分配给 Environment;分配后,该 En
5050
|---|---|---|
5151
| Run | `run.id`,例如 `run-v0oe5ki1pnaptv123` | 同一个 Run 的所有推送更新同一条变更;同一 Workspace 的两次 Run 是两条变更 |
5252

53-
Scalr 只在三种时刻推送:Run 需要人工确认、Run 成功结束、Run 出错或被取消。因此变更没有 Ready、Processing 状态,最早出现的状态是 Planned(等待确认)或结束状态。自动 Apply 的 Run 只会在结束时产生一条记录。
53+
Scalr 只在三种时刻推送:Run 需要人工确认、Run 成功结束、Run 出错。取消 Run、或在确认步骤放弃(Discard)Run 不会推送任何内容,这样的 Run 变更会停留在 Planned(或根本不会创建)。因此变更没有 Ready、Processing 状态,最早出现的状态是 Planned(等待确认)或结束状态。自动 Apply 的 Run 只会在结束时产生一条记录。
5454

5555
## 状态映射
5656
---
5757

58-
| 推送事件(event-name) | Run 状态(run.status) | Flashduty 变更状态 |
58+
| 推送事件(event_name) | Run 状态(run.status) | Flashduty 变更状态 |
5959
|---|---|---|
6060
| run:needs_attention | 任意,例如 planned、policy_override(等待确认或策略覆盖) | Planned |
6161
| run:completed | applied | Done |
6262
| run:errored | errored | Failed |
63-
| run:errored | canceled、discarded | Canceled |
6463

65-
结束事件按 Run 状态映射:`applied` 为 Done,`errored` 为 Failed,`canceled` 与 `discarded`(在确认步骤被放弃)为 Canceled。Done、Failed 和 Canceled 是结束状态,Flashduty 会记录变更结束时间。
64+
结束事件按 Run 状态映射:`applied` 为 Done,`errored` 为 Failed(结束事件若携带 `canceled` 或 `discarded` 状态则为 Canceled,但 Scalr 不会推送)。Done 和 Failed 是结束状态,Flashduty 会记录变更结束时间。
6665

6766
以下推送返回成功但不生成变更:Run 状态为 `planned_and_finished` 的结束事件(只做了 Plan 或没有资源变更,没有内容被应用),以及不属于 `run:` 系列的其他事件。
6867

0 commit comments

Comments
 (0)