File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
site/src/request_handlers Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 1
1
pub mod next_commit {
2
+ use database:: Commit ;
3
+
2
4
#[ derive( Debug , Clone , serde:: Serialize , serde:: Deserialize ) ]
3
- pub struct Commit {
4
- pub sha : String ,
5
+ pub struct NextCommit {
6
+ pub commit : Commit ,
5
7
pub include : Option < String > ,
6
8
pub exclude : Option < String > ,
7
9
pub runs : Option < i32 > ,
8
10
}
9
11
10
12
#[ derive( Debug , Clone , serde:: Serialize , serde:: Deserialize ) ]
11
13
pub struct Response {
12
- pub commit : Option < Commit > ,
14
+ pub commit : Option < NextCommit > ,
13
15
}
14
16
}
Original file line number Diff line number Diff line change @@ -1008,12 +1008,11 @@ fn main_result() -> anyhow::Result<i32> {
1008
1008
// no missing commits
1009
1009
return Ok ( 0 ) ;
1010
1010
} ;
1011
- let commit = get_commit_or_fake_it ( & next. sha ) ?;
1012
1011
1013
1012
let pool = database:: Pool :: open ( & db. db ) ;
1014
1013
1015
- let sysroot = Sysroot :: install ( commit. sha . to_string ( ) , & target_triple)
1016
- . with_context ( || format ! ( "failed to install sysroot for {:?}" , commit) ) ?;
1014
+ let sysroot = Sysroot :: install ( next . commit . sha . to_string ( ) , & target_triple)
1015
+ . with_context ( || format ! ( "failed to install sysroot for {:?}" , next . commit) ) ?;
1017
1016
1018
1017
let mut benchmarks = get_benchmarks (
1019
1018
& benchmark_dir,
@@ -1025,7 +1024,7 @@ fn main_result() -> anyhow::Result<i32> {
1025
1024
let res = bench (
1026
1025
& mut rt,
1027
1026
pool,
1028
- & ArtifactId :: Commit ( commit) ,
1027
+ & ArtifactId :: Commit ( next . commit ) ,
1029
1028
& Profile :: all ( ) ,
1030
1029
& Scenario :: all ( ) ,
1031
1030
bench_rustc. bench_rustc ,
Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ pub async fn handle_next_commit(ctxt: Arc<SiteCtxt>) -> next_commit::Response {
49
49
commit. sha,
50
50
missing_reason_dbg
51
51
) ;
52
- Some ( next_commit:: Commit {
53
- sha : commit. sha ,
52
+ Some ( next_commit:: NextCommit {
53
+ commit,
54
54
include,
55
55
exclude,
56
56
runs,
You can’t perform that action at this time.
0 commit comments