Skip to content

Commit 577493b

Browse files
committed
PR Feedback: Use execute and row count, change zulip link to infra
1 parent c17be95 commit 577493b

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

database/src/pool/postgres.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,9 +1634,9 @@ where
16341634
&self,
16351635
benchmark_request: &BenchmarkRequest,
16361636
) -> anyhow::Result<BenchmarkRequestInsertResult> {
1637-
let rows = self
1637+
let row_insert_count = self
16381638
.conn()
1639-
.query(
1639+
.execute(
16401640
r#"
16411641
INSERT INTO benchmark_request(
16421642
tag,
@@ -1650,8 +1650,7 @@ where
16501650
commit_date
16511651
)
16521652
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
1653-
ON CONFLICT DO NOTHING
1654-
RETURNING id;
1653+
ON CONFLICT DO NOTHING;
16551654
"#,
16561655
&[
16571656
&benchmark_request.tag(),
@@ -1667,7 +1666,7 @@ where
16671666
)
16681667
.await
16691668
.context("Failed to insert benchmark request")?;
1670-
if rows.is_empty() {
1669+
if row_insert_count == 0 {
16711670
// Allows us to handle duplicated cases without the database auto
16721671
// erroring
16731672
Ok(BenchmarkRequestInsertResult::NothingInserted)

site/src/request_handlers/github.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ async fn record_try_benchmark_request_without_artifacts(
108108
Ok(BenchmarkRequestInsertResult::Inserted) => get_awaiting_on_bors_message(),
109109
Err(e) => {
110110
log::error!("Failed to insert release benchmark request: {e}");
111-
"Something went wrong! This is most likely an internal failure, please let us know on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/247081-t-compiler.2Fperformance)".to_string()
111+
"Something went wrong! This is most likely an internal failure, please let us know on [Zulip]( https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra)".to_string()
112112
}
113113
}
114114
}

0 commit comments

Comments
 (0)