config PRs: remove the hive's config-PR webhook, poll and core merge
An operator's merge on the forge deploys a config PR through
swarm-controller's DeployRequest{rev}. The hive-side path that queued a
MergeConfigPr approval and merged the PR as `core` goes:
- the `/webhook/config-pr` receiver, its HMAC secret, the WebhookRegister
boot node and the org-hook registration; the hive vhost's `/webhook/`
location
- the 5-minute config-PR poll
- ApprovalKind::MergeConfigPr, its dashboard card, and the deploy DAG it
drove (DeployWindow, MergeVerify, DeployApply, FinalizeDeploy,
DeployTail), with verify_commit, the two-phase meta deploy, rollback
refs, the PR-failure comment and forge/pr_merge.rs
- `fetched_sha`, `sha_short`/`pr_number` on approval events, and
`sha`/`tag` on HelperEvent::ApprovalResolved: only the merge path set
them
`config_repo`, `merged_pr_for_commit` and `post_pr_comment` move to
forge/pr_comment.rs for the merged-rev deploy's refusal comment.
Approvals v5 drops stored `merge_config_pr` rows; a test reopens a v4
database holding them.
Closes #4850
This commit is contained in:
parent
a5ea015bc6
commit
efbfec6d01
39 changed files with 286 additions and 3199 deletions
|
|
@ -52,7 +52,7 @@ pub enum DashboardEvent {
|
|||
/// enough to render the dashboard row without a `/api/state`
|
||||
/// refetch.
|
||||
///
|
||||
/// The approval's own kind (`"merge_config_pr"` / `"schedule_prompt"`) lives
|
||||
/// The approval's own kind (`"schedule_prompt"` / `"update_meta_inputs"`) lives
|
||||
/// on `approval_kind` rather than `kind` because the latter is taken
|
||||
/// by the serde tag identifying which `DashboardEvent` variant
|
||||
/// this is.
|
||||
|
|
@ -61,15 +61,7 @@ pub enum DashboardEvent {
|
|||
id: i64,
|
||||
agent: String,
|
||||
approval_kind: &'static str,
|
||||
sha_short: Option<String>,
|
||||
description: Option<String>,
|
||||
/// Forge PR number, for `merge_config_pr` approvals only — lets
|
||||
/// the live `applyApprovalAdded` path build the "review PR on
|
||||
/// forge" link without waiting for a cold `/api/state` refresh
|
||||
/// (mirrors `ApprovalView::pr_number`). `None` for every other
|
||||
/// kind.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pr_number: Option<u64>,
|
||||
},
|
||||
/// A pending approval transitioned to a terminal state
|
||||
/// (approved / denied / failed). Clients move the row out of the
|
||||
|
|
@ -79,7 +71,6 @@ pub enum DashboardEvent {
|
|||
id: i64,
|
||||
agent: String,
|
||||
approval_kind: &'static str,
|
||||
sha_short: Option<String>,
|
||||
/// `"approved"` / `"denied"` / `"failed"`.
|
||||
status: &'static str,
|
||||
resolved_at: DateTime<Utc>,
|
||||
|
|
@ -307,17 +298,14 @@ mod tests {
|
|||
seq: 1,
|
||||
id: 1,
|
||||
agent: "x".into(),
|
||||
approval_kind: "merge_config_pr",
|
||||
sha_short: None,
|
||||
approval_kind: "schedule_prompt",
|
||||
description: None,
|
||||
pr_number: None,
|
||||
},
|
||||
DashboardEvent::ApprovalResolved {
|
||||
seq: 1,
|
||||
id: 1,
|
||||
agent: "x".into(),
|
||||
approval_kind: "merge_config_pr",
|
||||
sha_short: None,
|
||||
approval_kind: "schedule_prompt",
|
||||
status: "approved",
|
||||
resolved_at: hive_sh4re::wire_time::from_secs(0),
|
||||
note: None,
|
||||
|
|
|
|||
Loading…
Reference in a new issue