compliance: Add temporary allowlist (#54644)

To not have another week of failing checks on Preview and until we find
a better way of handling these errors.

Release Notes:

- N/A
This commit is contained in:
Finn Evers authored and GitHub committed 2026-04-23 11:54:16 +00:00
1 parent 68f1d088c1
commit 161ef2e4bf
3 files changed
+24 -2

No files matched your search

+1 -1
View File
@@ -273,7 +273,7 @@ impl CommitDetails {
&self.title
}
pub(crate) fn sha(&self) -> &CommitSha {
pub fn sha(&self) -> &CommitSha {
&self.sha
}
+7 -1
View File
@@ -53,6 +53,12 @@ impl<R: ToString> ReportEntry<R> {
}
}
impl ReportEntry<ReviewResult> {
pub fn is_unknown_error(&self) -> bool {
matches!(self.reason, Err(ReviewFailure::Other(_)))
}
}
impl ReportEntry<ReviewFailure> {
fn issue_kind(&self) -> IssueKind {
match self.reason {
@@ -115,7 +121,7 @@ impl ReportSummary {
.count(),
errors: entries
.iter()
.filter(|entry| matches!(entry.reason, Err(ReviewFailure::Other(_))))
.filter(|entry| entry.is_unknown_error())
.count(),
}
}
+16
View File
@@ -18,6 +18,10 @@ pub(crate) struct ComplianceArgs {
mode: ComplianceMode,
}
const IGNORE_LIST: &[&str] = &[
"75fa566511e3ae7d03cfd76008512080291bd81d", // GitHub nuked this PR out of orbit
];
#[derive(Subcommand)]
pub(crate) enum ComplianceMode {
// Check compliance for all commits between two version tags
@@ -133,6 +137,10 @@ async fn check_compliance_impl(args: ComplianceArgs) -> Result<()> {
summary.prs_with_errors()
);
let all_errors_known = report.errors().all(|error| {
error.is_unknown_error() && IGNORE_LIST.contains(&error.commit.sha().as_str())
});
for report in report.errors() {
if let Some(pr_number) = report.commit.pr_number()
&& let Ok(pull_request) = client.get_pull_request(&Repository::ZED, pr_number).await
@@ -163,6 +171,14 @@ async fn check_compliance_impl(args: ComplianceArgs) -> Result<()> {
"Compliance check failed, found {} commits not reviewed",
summary.not_reviewed
)),
ReportReviewSummary::MissingReviewsWithErrors if all_errors_known => {
println!(
"Compliance check failed with {} unreviewed commits, but all errors are known.",
summary.not_reviewed
);
Ok(())
}
ReportReviewSummary::MissingReviewsWithErrors => Err(anyhow::anyhow!(
"Compliance check failed with {} unreviewed commits and {} other issues",
summary.not_reviewed,