Skip to content

Commit ac12496

Browse files
committed
Rename stalled to failed
1 parent 9775e3e commit ac12496

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

src/bors/handlers/retry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub(super) async fn command_retry(
2222

2323
let pr_model = pr.db;
2424

25-
if matches!(pr_model.queue_status(), QueueStatus::Stalled(_, _)) {
25+
if matches!(pr_model.queue_status(), QueueStatus::Failed(_, _)) {
2626
db.clear_auto_build(pr_model).await?;
2727
merge_queue_tx.notify().await?;
2828
} else {

src/bors/merge_queue.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ async fn process_repository(repo: &RepositoryState, ctx: &BorsContext) -> anyhow
132132
QueueStatus::NotApproved => unreachable!(
133133
"PR {pr:?} is not approved. It should not have been returned by `get_merge_queue_prs`, this is a bug."
134134
),
135-
QueueStatus::Stalled(..) => unreachable!(
136-
"PR {pr:?} is stalled. It should not have been returned by `get_merge_queue_prs`, this is a bug."
135+
QueueStatus::Failed(..) => unreachable!(
136+
"Build of PR {pr:?} has failed. It should not have been returned by `get_merge_queue_prs`, this is a bug."
137137
),
138138
QueueStatus::Pending(..) => {
139139
// Build in progress - stop queue. We can only have one PR being built

src/database/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ pub enum QueueStatus {
187187
/// Approved with running auto build.
188188
Pending(ApprovalInfo, BuildModel),
189189
/// Approved with failed auto build.
190-
Stalled(ApprovalInfo, BuildModel),
190+
Failed(ApprovalInfo, BuildModel),
191191
/// Approved with no auto build started yet or a failed auto build was reset
192192
/// with `@bors retry`.
193193
Approved(ApprovalInfo),
@@ -441,7 +441,7 @@ impl PullRequestModel {
441441
QueueStatus::ReadyForMerge(approval_info.clone(), build.clone())
442442
}
443443
BuildStatus::Failure | BuildStatus::Cancelled | BuildStatus::Timeouted => {
444-
QueueStatus::Stalled(approval_info.clone(), build.clone())
444+
QueueStatus::Failed(approval_info.clone(), build.clone())
445445
}
446446
},
447447
None => QueueStatus::Approved(approval_info.clone()),

src/server/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ pub async fn queue_handler(
294294
QueueStatus::Approved(..) => (1, 0),
295295
QueueStatus::ReadyForMerge(..) => (1, 0),
296296
QueueStatus::Pending(..) => (1, 0),
297-
QueueStatus::Stalled(..) => (0, 1),
297+
QueueStatus::Failed(..) => (0, 1),
298298
QueueStatus::NotApproved => (0, 0),
299299
};
300300

src/templates.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub fn status_text(pr: &PullRequestModel) -> String {
1515
QueueStatus::Approved(_) => "approved".to_string(),
1616
QueueStatus::ReadyForMerge(_, _) => "ready for merge".to_string(),
1717
QueueStatus::Pending(_, _) => "pending".to_string(),
18-
QueueStatus::Stalled(_, _) => "stalled".to_string(),
18+
QueueStatus::Failed(_, _) => "failed".to_string(),
1919
QueueStatus::NotApproved => String::new(),
2020
}
2121
}

src/utils/sort_queue.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ use crate::bors::RollupMode;
22
use crate::database::{MergeableState, PullRequestModel, QueueStatus};
33

44
/// Sorts pull requests according to merge queue priority rules.
5-
/// Ordered by: ready for merge > pending builds > approved > stalled > not approved > mergeability
5+
/// Ordered by: ready for merge > pending builds > approved > failed > not approved > mergeability
66
/// > priority > rollup > age.
77
pub fn sort_queue_prs(mut prs: Vec<PullRequestModel>) -> Vec<PullRequestModel> {
88
prs.sort_by(|a, b| {
9-
// 1. Compare queue status (ready for merge > pending > approved > stalled > not approved)
9+
// 1. Compare queue status (ready for merge > pending > approved > failed > not approved)
1010
get_queue_status_priority(&a.queue_status())
1111
.cmp(&get_queue_status_priority(&b.queue_status()))
1212
// 2. Compare mergeability state (0 = mergeable, 1 = conflicts/unknown)
@@ -33,7 +33,7 @@ fn get_queue_status_priority(status: &QueueStatus) -> u32 {
3333
QueueStatus::ReadyForMerge(_, _) => 0,
3434
QueueStatus::Pending(_, _) => 1,
3535
QueueStatus::Approved(_) => 2,
36-
QueueStatus::Stalled(_, _) => 3,
36+
QueueStatus::Failed(_, _) => 3,
3737
QueueStatus::NotApproved => 4,
3838
}
3939
}

0 commit comments

Comments
 (0)