@@ -693,11 +693,6 @@ pub async fn queue_rebuilds(
693693 SELECT
694694 c.name,
695695 r.version,
696- (
697- SELECT MAX(b.rustc_nightly_date)
698- FROM builds AS b
699- WHERE b.rid = r.id AND b.rustc_nightly_date IS NOT NULL
700- ) AS rustc_nightly_date,
701696 (
702697 SELECT MAX(COALESCE(b.build_finished, b.build_started))
703698 FROM builds AS b
@@ -709,12 +704,8 @@ pub async fn queue_rebuilds(
709704 WHERE
710705 r.rustdoc_status = TRUE
711706 ) as i
712- WHERE i.rustc_nightly_date < $1
713707 ORDER BY i.last_build_attempt ASC
714- LIMIT $2" ,
715- config
716- . rebuild_up_to_date
717- . expect( "config.rebuild_up_to_date not set" ) ,
708+ LIMIT $1" ,
718709 rebuilds_to_queue,
719710 )
720711 . fetch ( & mut * conn) ;
@@ -741,46 +732,14 @@ mod tests {
741732 use crate :: test:: FakeBuild ;
742733
743734 use super :: * ;
744- use chrono:: { NaiveDate , Utc } ;
735+ use chrono:: Utc ;
745736 use std:: time:: Duration ;
746737
747- #[ test]
748- fn test_dont_rebuild_when_new ( ) {
749- crate :: test:: async_wrapper ( |env| async move {
750- env. override_config ( |config| {
751- config. max_queued_rebuilds = Some ( 100 ) ;
752- config. rebuild_up_to_date = Some ( NaiveDate :: from_ymd_opt ( 2020 , 1 , 1 ) . unwrap ( ) ) ;
753- } ) ;
754-
755- env. fake_release ( )
756- . await
757- . name ( "foo" )
758- . version ( "0.1.0" )
759- . builds ( vec ! [
760- FakeBuild :: default ( )
761- . rustc_version( "rustc 1.84.0-nightly (e7c0d2750 2020-10-15)" ) ,
762- ] )
763- . create ( )
764- . await ?;
765-
766- let build_queue = env. async_build_queue ( ) . await ;
767- assert ! ( build_queue. queued_crates( ) . await ?. is_empty( ) ) ;
768-
769- let mut conn = env. async_db ( ) . await . async_conn ( ) . await ;
770- queue_rebuilds ( & mut conn, & env. config ( ) , & build_queue) . await ?;
771-
772- assert ! ( build_queue. queued_crates( ) . await ?. is_empty( ) ) ;
773-
774- Ok ( ( ) )
775- } )
776- }
777-
778738 #[ test]
779739 fn test_rebuild_when_old ( ) {
780740 crate :: test:: async_wrapper ( |env| async move {
781741 env. override_config ( |config| {
782742 config. max_queued_rebuilds = Some ( 100 ) ;
783- config. rebuild_up_to_date = Some ( NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 ) . unwrap ( ) ) ;
784743 } ) ;
785744
786745 env. fake_release ( )
@@ -815,7 +774,6 @@ mod tests {
815774 crate :: test:: async_wrapper ( |env| async move {
816775 env. override_config ( |config| {
817776 config. max_queued_rebuilds = Some ( 1 ) ;
818- config. rebuild_up_to_date = Some ( NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 ) . unwrap ( ) ) ;
819777 } ) ;
820778
821779 let build_queue = env. async_build_queue ( ) . await ;
@@ -858,7 +816,6 @@ mod tests {
858816 crate :: test:: async_wrapper ( |env| async move {
859817 env. override_config ( |config| {
860818 config. max_queued_rebuilds = Some ( 1 ) ;
861- config. rebuild_up_to_date = Some ( NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 ) . unwrap ( ) ) ;
862819 } ) ;
863820
864821 let build_queue = env. async_build_queue ( ) . await ;
0 commit comments