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
|
|
@ -5,13 +5,11 @@
|
|||
//! `internal/docs`, are swarm-controller's. Full design:
|
||||
//! `docs/integrations/forge.md`.
|
||||
|
||||
mod pr_comment;
|
||||
mod reader;
|
||||
mod reconcile;
|
||||
mod repos;
|
||||
mod users;
|
||||
|
||||
pub use pr_comment::{config_repo, merged_pr_for_commit, post_pr_comment};
|
||||
pub use reader::reader_token;
|
||||
pub use reconcile::{fetch_forge_main, reconcile_config_apply, reconcile_config_status};
|
||||
pub use repos::{
|
||||
|
|
@ -462,13 +460,13 @@ mod tests {
|
|||
async fn a_request_the_forge_never_answers_errors_at_the_deadline() {
|
||||
let started = tokio::time::Instant::now();
|
||||
let err = bounded(
|
||||
"post PR comment",
|
||||
"pending request",
|
||||
std::future::pending::<Result<(), forgejo_api::ForgejoError>>(),
|
||||
)
|
||||
.await
|
||||
.expect_err("a pending request must hit the deadline");
|
||||
assert_eq!(started.elapsed(), API_TIMEOUT);
|
||||
assert!(err.to_string().contains("post PR comment"), "{err}");
|
||||
assert!(err.to_string().contains("pending request"), "{err}");
|
||||
}
|
||||
|
||||
/// The request's own result passes through for the caller to classify.
|
||||
|
|
|
|||
Loading…
Reference in a new issue