@@ -391,18 +391,6 @@ class Scheduler {
391391 unlockMergeGroup = true ;
392392 }
393393
394- // Both the author and label should be checked to make sure that no one is
395- // attempting to get a pull request without check through.
396- if (pullRequest.user! .login == _config.autosubmitBot &&
397- pullRequest.labels! .any (
398- (element) => element.name == Config .revertOfLabel,
399- )) {
400- log.info (
401- 'Skipping generating the full set of checks for revert request.' ,
402- );
403- unlockMergeGroup = true ;
404- break ;
405- }
406394 // Feature request: skip engine builds and tests in monorepo if the PR only contains framework related
407395 // files.
408396 // NOTE: This creates an empty staging doc for the engine builds as staging is handled on check_run completion
@@ -1415,84 +1403,73 @@ detailsUrl: $detailsUrl
14151403 required _FlutterRepoTestsToRun testsToRun,
14161404 }) async {
14171405 try {
1418- // Both the author and label should be checked to make sure that no one is
1419- // attempting to get a pull request without check through.
1420- if (pullRequest.user! .login == _config.autosubmitBot &&
1421- pullRequest.labels! .any (
1422- (element) => element.name == Config .revertOfLabel,
1423- )) {
1424- log.info (
1425- '$logCrumb : skipping generating the full set of checks for revert request.' ,
1426- );
1427- } else {
1428- // Schedule the tests that would have run in a call to triggerPresubmitTargets - but for both the
1429- // engine and the framework.
1430- var presubmitTargets = await _getTestsForStage (
1431- pullRequest,
1432- CiStage .fusionTests,
1433- skipEngine:
1434- testsToRun != _FlutterRepoTestsToRun .engineTestsAndFrameworkTests,
1435- );
1436-
1437- // Create the document for tracking test check runs.
1438- final List <String > tasks;
1439- if (testsToRun == _FlutterRepoTestsToRun .frameworkFlutterAnalyzeOnly) {
1440- const linuxAnalyze = 'Linux analyze' ;
1441- final singleTarget = presubmitTargets.firstWhereOrNull (
1442- (t) => t.name == linuxAnalyze,
1443- );
1444- if (singleTarget == null ) {
1445- log.warn ('No target found named "$linuxAnalyze "' );
1446- tasks = [];
1447- presubmitTargets = [];
1448- } else {
1449- log.info ('Only running target "$linuxAnalyze "' );
1450- tasks = [linuxAnalyze];
1451- presubmitTargets = [singleTarget];
1452- }
1453- } else {
1454- tasks = [...presubmitTargets.map ((t) => t.name)];
1455- }
1406+ // Schedule the tests that would have run in a call to triggerPresubmitTargets - but for both the
1407+ // engine and the framework.
1408+ var presubmitTargets = await _getTestsForStage (
1409+ pullRequest,
1410+ CiStage .fusionTests,
1411+ skipEngine:
1412+ testsToRun != _FlutterRepoTestsToRun .engineTestsAndFrameworkTests,
1413+ );
14561414
1457- await UnifiedCheckRun .initializeCiStagingDocument (
1458- firestoreService: _firestore,
1459- slug: pullRequest.base ! .repo! .slug (),
1460- sha: pullRequest.head! .sha! ,
1461- stage: CiStage .fusionTests,
1462- tasks: tasks,
1463- config: _config,
1464- pullRequest: pullRequest,
1465- checkRun: checkRunGuard,
1415+ // Create the document for tracking test check runs.
1416+ final List <String > tasks;
1417+ if (testsToRun == _FlutterRepoTestsToRun .frameworkFlutterAnalyzeOnly) {
1418+ const linuxAnalyze = 'Linux analyze' ;
1419+ final singleTarget = presubmitTargets.firstWhereOrNull (
1420+ (t) => t.name == linuxAnalyze,
14661421 );
1467-
1468- // Here is where it gets fun: how do framework tests* know what engine
1469- // artifacts to fetch and use on CI? For presubmits on flutter/flutter;
1470- // see https://github.com/flutter/flutter/issues/164031.
1471- //
1472- // *In theory, also engine tests, but engine tests build from the engine
1473- // from source and rely on remote-build execution (RBE) for builds to
1474- // fast and cached.
1475- final EngineArtifacts engineArtifacts;
1476- if (testsToRun != _FlutterRepoTestsToRun .engineTestsAndFrameworkTests) {
1477- // Use the engine that this PR was branched off of.
1478- engineArtifacts = EngineArtifacts .usingExistingEngine (
1479- commitSha: pullRequest.base ! .sha! ,
1480- );
1422+ if (singleTarget == null ) {
1423+ log.warn ('No target found named "$linuxAnalyze "' );
1424+ tasks = [];
1425+ presubmitTargets = [];
14811426 } else {
1482- // Use the engine that was built from source *for* this PR.
1483- engineArtifacts = EngineArtifacts .builtFromSource (
1484- commitSha: pullRequest.head! .sha! ,
1485- );
1427+ log.info ('Only running target "$linuxAnalyze "' );
1428+ tasks = [linuxAnalyze];
1429+ presubmitTargets = [singleTarget];
14861430 }
1431+ } else {
1432+ tasks = [...presubmitTargets.map ((t) => t.name)];
1433+ }
14871434
1488- await _luciBuildService.scheduleTryBuilds (
1489- targets: presubmitTargets,
1490- pullRequest: pullRequest,
1491- engineArtifacts: engineArtifacts,
1492- checkRunGuard: checkRunGuard,
1493- stage: CiStage .fusionTests,
1435+ await UnifiedCheckRun .initializeCiStagingDocument (
1436+ firestoreService: _firestore,
1437+ slug: pullRequest.base ! .repo! .slug (),
1438+ sha: pullRequest.head! .sha! ,
1439+ stage: CiStage .fusionTests,
1440+ tasks: tasks,
1441+ config: _config,
1442+ pullRequest: pullRequest,
1443+ checkRun: checkRunGuard,
1444+ );
1445+
1446+ // Here is where it gets fun: how do framework tests* know what engine
1447+ // artifacts to fetch and use on CI? For presubmits on flutter/flutter;
1448+ // see https://github.com/flutter/flutter/issues/164031.
1449+ //
1450+ // *In theory, also engine tests, but engine tests build from the engine
1451+ // from source and rely on remote-build execution (RBE) for builds to
1452+ // fast and cached.
1453+ final EngineArtifacts engineArtifacts;
1454+ if (testsToRun != _FlutterRepoTestsToRun .engineTestsAndFrameworkTests) {
1455+ // Use the engine that this PR was branched off of.
1456+ engineArtifacts = EngineArtifacts .usingExistingEngine (
1457+ commitSha: pullRequest.base ! .sha! ,
1458+ );
1459+ } else {
1460+ // Use the engine that was built from source *for* this PR.
1461+ engineArtifacts = EngineArtifacts .builtFromSource (
1462+ commitSha: pullRequest.head! .sha! ,
14941463 );
14951464 }
1465+
1466+ await _luciBuildService.scheduleTryBuilds (
1467+ targets: presubmitTargets,
1468+ pullRequest: pullRequest,
1469+ engineArtifacts: engineArtifacts,
1470+ checkRunGuard: checkRunGuard,
1471+ stage: CiStage .fusionTests,
1472+ );
14961473 } on FormatException catch (e, s) {
14971474 log.warn (
14981475 '$logCrumb : FormatException encountered when scheduling presubmit '
0 commit comments