hive-c0re: a refused rev is an error log + Grafana alert, not a PR comment
A deploy request whose rev hive-c0re refuses (fetch failed, or the rev does not descend from applied/main) no longer tries to comment on the PR that merged it. Off the forge host that attempt always failed with "forge core token absent". The refusal now logs at ERROR, message unchanged, and the new `hh-config-rev-refused` Grafana rule fires on it. Deleted with the posting: actions::post_rev_deploy_failure_to_pr, the whole forge/pr_comment.rs (config_repo, merged_pr_for_commit, post_pr_comment), and ReaderToken::value, whose only caller was merged_pr_for_commit. Refs #4851
This commit is contained in:
parent
3d81266483
commit
8c222f8910
9 changed files with 27 additions and 106 deletions
|
|
@ -318,8 +318,9 @@ async fn handle_deploy_request(
|
|||
/// rebuild with it. The exception is `hivectl forge reconcile-config`, which
|
||||
/// does not deploy, so a rev it put in place is skipped too.
|
||||
///
|
||||
/// A refusal is commented on the PR that merged `rev`. A failed rebuild is
|
||||
/// not: it surfaces where every rebuild failure does, on this hive.
|
||||
/// The refusal's message is matched verbatim by the `hh-config-rev-refused`
|
||||
/// alert rule in `nix/host-modules/swarm-grafana.nix`; change both together.
|
||||
/// A failed rebuild surfaces where every rebuild failure does, on this hive.
|
||||
async fn apply_rev(agent: &str, rev: &str) -> bool {
|
||||
match crate::actions::advance_applied_to_rev(agent, rev).await {
|
||||
Ok(crate::actions::RevAdvance::Advanced) => true,
|
||||
|
|
@ -328,8 +329,7 @@ async fn apply_rev(agent: &str, rev: &str) -> bool {
|
|||
false
|
||||
}
|
||||
Err(e) => {
|
||||
tracing::warn!(%agent, %rev, error = %format!("{e:#}"), "swarm events: rev not applied; nothing queued");
|
||||
crate::actions::post_rev_deploy_failure_to_pr(agent, rev, &e).await;
|
||||
tracing::error!(%agent, %rev, error = %format!("{e:#}"), "swarm events: rev not applied; nothing queued");
|
||||
false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue