@@ -18,7 +18,6 @@ const archiver = require("../helpers/archiver"),
1818 { initTimeComponents, instrumentEventTime, markBlockStart, markBlockEnd, getTimeComponents} = require ( '../helpers/timeComponents' ) ,
1919 downloadBuildArtifacts = require ( '../helpers/buildArtifacts' ) . downloadBuildArtifacts ,
2020 downloadBuildStacktrace = require ( '../helpers/downloadBuildStacktrace' ) . downloadBuildStacktrace ,
21- updateNotifier = require ( 'update-notifier' ) ,
2221 pkg = require ( '../../package.json' ) ,
2322 packageDiff = require ( '../helpers/package-diff' ) ;
2423const { getStackTraceUrl } = require ( '../helpers/sync/syncSpecsLogs' ) ;
@@ -249,6 +248,9 @@ module.exports = function run(args, rawArgs) {
249248 utils . setProcessHooks ( data . build_id , bsConfig , bs_local , args , buildReportData ) ;
250249 let message = `${ data . message } ! ${ Constants . userMessages . BUILD_CREATED } with build id: ${ data . build_id } ` ;
251250 let dashboardLink = `${ Constants . userMessages . VISIT_DASHBOARD } ${ data . dashboard_url } ` ;
251+ if ( turboScaleSession ) {
252+ dashboardLink = `${ Constants . userMessages . VISIT_ATS_DASHBOARD } ${ data . dashboard_url } ` ;
253+ }
252254 buildReportData = { 'build_id' : data . build_id , 'parallels' : userSpecifiedParallels , ...buildReportData }
253255 utils . exportResults ( data . build_id , `${ config . dashboardUrl } ${ data . build_id } ` ) ;
254256 if ( ( utils . isUndefined ( bsConfig . run_settings . parallels ) && utils . isUndefined ( args . parallels ) ) || ( ! utils . isUndefined ( bsConfig . run_settings . parallels ) && bsConfig . run_settings . parallels == Constants . cliMessages . RUN . DEFAULT_PARALLEL_MESSAGE ) ) {
@@ -311,6 +313,8 @@ module.exports = function run(args, rawArgs) {
311313 logger . info ( Constants . userMessages . BUILD_FAILED_ERROR )
312314 process . exitCode = Constants . BUILD_FAILED_EXIT_CODE ;
313315 } ) ;
316+ } else {
317+ utils . handleSyncExit ( exitCode , data . dashboard_url ) ;
314318 }
315319 } ) ;
316320 } else if ( utils . nonEmptyArray ( bsConfig . run_settings . downloads && ! turboScaleSession ) ) {
@@ -452,23 +456,27 @@ module.exports = function run(args, rawArgs) {
452456 utils . sendUsageReport ( bsJsonData , args , err . message , Constants . messageTypes . ERROR , utils . getErrorCodeFromErr ( err ) , null , rawArgs ) ;
453457 process . exitCode = Constants . ERROR_EXIT_CODE ;
454458 } ) . finally ( function ( ) {
455- const notifier = updateNotifier ( {
456- pkg,
457- updateCheckInterval : 1000 * 60 * 60 * 24 * 7 ,
458- } ) ;
459+ import ( 'update-notifier' ) . then ( ( { default : updateNotifier } ) => {
460+ const notifier = updateNotifier ( {
461+ pkg,
462+ updateCheckInterval : 1000 * 60 * 60 * 24 * 7 ,
463+ } ) ;
459464
460- // Checks for update on first run.
461- // Set lastUpdateCheck to 0 to spawn the check update process as notifier sets this to Date.now() for preventing
462- // the check untill one interval period. It runs once.
463- if ( ! notifier . disabled && Date . now ( ) - notifier . config . get ( 'lastUpdateCheck' ) < 50 ) {
464- notifier . config . set ( 'lastUpdateCheck' , 0 ) ;
465- notifier . check ( ) ;
466- }
465+ // Checks for update on first run.
466+ // Set lastUpdateCheck to 0 to spawn the check update process as notifier sets this to Date.now() for preventing
467+ // the check untill one interval period. It runs once.
468+ if ( ! notifier . disabled && Date . now ( ) - notifier . config . get ( 'lastUpdateCheck' ) < 50 ) {
469+ notifier . config . set ( 'lastUpdateCheck' , 0 ) ;
470+ notifier . check ( ) ;
471+ }
467472
468- // Set the config update as notifier clears this after reading.
469- if ( notifier . update && notifier . update . current !== notifier . update . latest ) {
470- notifier . config . set ( 'update' , notifier . update ) ;
471- notifier . notify ( { isGlobal : true } ) ;
472- }
473+ // Set the config update as notifier clears this after reading.
474+ if ( notifier . update && notifier . update . current !== notifier . update . latest ) {
475+ notifier . config . set ( 'update' , notifier . update ) ;
476+ notifier . notify ( { isGlobal : true } ) ;
477+ }
478+ } ) . catch ( ( error ) => {
479+ logger . debug ( 'Got error loading update-notifier: ' , error ) ;
480+ } ) ;
473481 } ) ;
474482}
0 commit comments