Skip to content

Commit 91f6595

Browse files
committed
chore: temp log lines
1 parent e3f7ea2 commit 91f6595

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

bin/commands/runs.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,11 @@ module.exports = function run(args, rawArgs) {
114114

115115
// Send build start to Observability
116116
if(isTestObservabilitySession) {
117+
logger.info('TEMPLOG 1')
117118
await launchTestSession(bsConfig, bsConfigPath);
119+
logger.info('TEMPLOG 2')
118120
utils.setO11yProcessHooks(null, bsConfig, args, null, buildReportData);
121+
logger.info('TEMPLOG 3')
119122
}
120123

121124
// accept the system env list from bsconf and set it

bin/testObservability/helper/helper.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const pGitconfig = promisify(gitconfig);
1818
const logger = require("../../helpers/logger").winstonLogger;
1919
const utils = require('../../helpers/utils');
2020
const helper = require('../../helpers/helper');
21+
// const { isTurboScaleSession } = require('../../helpers/atsHelper');
2122

2223
const 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

664673
exports.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

Comments
 (0)