@@ -18,6 +18,7 @@ const pGitconfig = promisify(gitconfig);
1818const logger = require ( "../../helpers/logger" ) . winstonLogger ;
1919const utils = require ( '../../helpers/utils' ) ;
2020const helper = require ( '../../helpers/helper' ) ;
21+ // const { isTurboScaleSession } = require('../../helpers/atsHelper');
2122
2223const CrashReporter = require ( '../crashReporter' ) ;
2324
@@ -100,6 +101,7 @@ exports.printBuildLink = async (shouldStopSession, exitCode = null) => {
100101 supportFileCleanup ( ) ;
101102 await this . stopBuildUpstream ( ) ;
102103 }
104+ logger . info ( `TEMPLOG printBuildLink -- ${ process . env . BS_TESTOPS_BUILD_HASHED_ID } ` )
103105 try {
104106 if ( process . env . BS_TESTOPS_BUILD_HASHED_ID
105107 && process . env . BS_TESTOPS_BUILD_HASHED_ID != "null"
@@ -400,7 +402,11 @@ exports.launchTestSession = async (user_config, bsConfigPath) => {
400402 frameworkName : "Cypress" ,
401403 frameworkVersion : exports . getPackageVersion ( 'cypress' , user_config ) ,
402404 sdkVersion : helper . getAgentVersion ( )
403- }
405+ } ,
406+ // 'product_map': {
407+ // observability: true,
408+ // turboscale: isTurboScaleSession(user_config)
409+ // }
404410 } ;
405411 const config = {
406412 auth : {
@@ -412,10 +418,11 @@ exports.launchTestSession = async (user_config, bsConfigPath) => {
412418 'X-BSTACK-TESTOPS' : 'true'
413419 }
414420 } ;
415-
421+ logger . info ( `TEMPLOG 4` )
416422 const response = await nodeRequest ( 'POST' , 'api/v1/builds' , data , config ) ;
417423 exports . debug ( 'Build creation successfull!' ) ;
418424 process . env . BS_TESTOPS_BUILD_COMPLETED = true ;
425+ logger . info ( `TEMPLOG DATA ${ JSON . stringify ( response . data ) } ` )
419426 setEnvironmentVariablesForRemoteReporter ( response . data . jwt , response . data . build_hashed_id , response . data . allow_screenshots , data . observability_version . sdkVersion ) ;
420427 if ( this . isBrowserstackInfra ( ) ) helper . setBrowserstackCypressCliDependency ( user_config ) ;
421428 } catch ( error ) {
@@ -498,6 +505,7 @@ exports.batchAndPostEvents = async (eventUrl, kind, data) => {
498505 'X-BSTACK-TESTOPS' : 'true'
499506 }
500507 } ;
508+ console . log ( `TEMPLOG -- batchAndPostEvents ${ config } ` ) ;
501509
502510 try {
503511 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) => {
511519 exports . pending_test_uploads . count = Math . max ( 0 , exports . pending_test_uploads . count - data . length ) ;
512520 }
513521 } catch ( error ) {
522+ console . log ( `TEMPLOG -- batchAndPostEvents error ${ util . format ( error ) } ` ) ;
514523 exports . debugOnConsole ( `[Request Error] Error in sending request ${ util . format ( error ) } ` ) ;
515524 if ( error . response ) {
516525 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 = () => {
662671}
663672
664673exports . stopBuildUpstream = async ( ) => {
674+ logger . info ( `TEMPLOG stopBuildUpstream -- ${ process . env . BS_TESTOPS_BUILD_COMPLETED } ` ) ;
665675 if ( process . env . BS_TESTOPS_BUILD_COMPLETED === "true" ) {
666676 if ( process . env . BS_TESTOPS_JWT == "null" || process . env . BS_TESTOPS_BUILD_HASHED_ID == "null" ) {
667677 exports . debug ( 'EXCEPTION IN stopBuildUpstream REQUEST TO TEST OBSERVABILITY : Missing authentication token' ) ;
0 commit comments