@@ -18,6 +18,7 @@ const pGitconfig = promisify(gitconfig);
18
18
const logger = require ( "../../helpers/logger" ) . winstonLogger ;
19
19
const utils = require ( '../../helpers/utils' ) ;
20
20
const helper = require ( '../../helpers/helper' ) ;
21
+ // const { isTurboScaleSession } = require('../../helpers/atsHelper');
21
22
22
23
const CrashReporter = require ( '../crashReporter' ) ;
23
24
@@ -100,6 +101,7 @@ exports.printBuildLink = async (shouldStopSession, exitCode = null) => {
100
101
supportFileCleanup ( ) ;
101
102
await this . stopBuildUpstream ( ) ;
102
103
}
104
+ logger . info ( `TEMPLOG printBuildLink -- ${ process . env . BS_TESTOPS_BUILD_HASHED_ID } ` )
103
105
try {
104
106
if ( process . env . BS_TESTOPS_BUILD_HASHED_ID
105
107
&& process . env . BS_TESTOPS_BUILD_HASHED_ID != "null"
@@ -400,7 +402,11 @@ exports.launchTestSession = async (user_config, bsConfigPath) => {
400
402
frameworkName : "Cypress" ,
401
403
frameworkVersion : exports . getPackageVersion ( 'cypress' , user_config ) ,
402
404
sdkVersion : helper . getAgentVersion ( )
403
- }
405
+ } ,
406
+ // 'product_map': {
407
+ // observability: true,
408
+ // turboscale: isTurboScaleSession(user_config)
409
+ // }
404
410
} ;
405
411
const config = {
406
412
auth : {
@@ -412,10 +418,11 @@ exports.launchTestSession = async (user_config, bsConfigPath) => {
412
418
'X-BSTACK-TESTOPS' : 'true'
413
419
}
414
420
} ;
415
-
421
+ logger . info ( `TEMPLOG 4` )
416
422
const response = await nodeRequest ( 'POST' , 'api/v1/builds' , data , config ) ;
417
423
exports . debug ( 'Build creation successfull!' ) ;
418
424
process . env . BS_TESTOPS_BUILD_COMPLETED = true ;
425
+ logger . info ( `TEMPLOG DATA ${ JSON . stringify ( response . data ) } ` )
419
426
setEnvironmentVariablesForRemoteReporter ( response . data . jwt , response . data . build_hashed_id , response . data . allow_screenshots , data . observability_version . sdkVersion ) ;
420
427
if ( this . isBrowserstackInfra ( ) ) helper . setBrowserstackCypressCliDependency ( user_config ) ;
421
428
} catch ( error ) {
@@ -498,6 +505,7 @@ exports.batchAndPostEvents = async (eventUrl, kind, data) => {
498
505
'X-BSTACK-TESTOPS' : 'true'
499
506
}
500
507
} ;
508
+ console . log ( `TEMPLOG -- batchAndPostEvents ${ config } ` ) ;
501
509
502
510
try {
503
511
const eventsUuids = data . map ( eventData => `${ eventData . event_type } :${ eventData . test_run ? eventData . test_run . uuid : ( eventData . hook_run ? eventData . hook_run . uuid : null ) } ` ) . join ( ', ' ) ;
@@ -511,6 +519,7 @@ exports.batchAndPostEvents = async (eventUrl, kind, data) => {
511
519
exports . pending_test_uploads . count = Math . max ( 0 , exports . pending_test_uploads . count - data . length ) ;
512
520
}
513
521
} catch ( error ) {
522
+ console . log ( `TEMPLOG -- batchAndPostEvents error ${ util . format ( error ) } ` ) ;
514
523
exports . debugOnConsole ( `[Request Error] Error in sending request ${ util . format ( error ) } ` ) ;
515
524
if ( error . response ) {
516
525
exports . debug ( `EXCEPTION IN ${ kind } REQUEST TO TEST OBSERVABILITY : ${ error . response . status } ${ error . response . statusText } ${ JSON . stringify ( error . response . data ) } ` , true , error ) ;
@@ -662,6 +671,7 @@ exports.shouldReRunObservabilityTests = () => {
662
671
}
663
672
664
673
exports . stopBuildUpstream = async ( ) => {
674
+ logger . info ( `TEMPLOG stopBuildUpstream -- ${ process . env . BS_TESTOPS_BUILD_COMPLETED } ` ) ;
665
675
if ( process . env . BS_TESTOPS_BUILD_COMPLETED === "true" ) {
666
676
if ( process . env . BS_TESTOPS_JWT == "null" || process . env . BS_TESTOPS_BUILD_HASHED_ID == "null" ) {
667
677
exports . debug ( 'EXCEPTION IN stopBuildUpstream REQUEST TO TEST OBSERVABILITY : Missing authentication token' ) ;
0 commit comments