Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions lib/tracer-config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/tracer-config.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions src/tracer-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,25 +212,25 @@ export async function getCombinedTracerConfig(
);
}
mainTracerConfig = concatTracerConfigs(tracedLanguageConfigs, config);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love how this PR is just moving a brace, but an extremely important one!
This does make me think we should factor the else block into a getLegacyTracerConfig function so that it's easy to spot what's going on. No need in this PR though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also it's good that the internal integration tests caught this, but why didn't the external tests catch this for 2.7.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that refactoring this might be sensible - let's leave that for later though. The tests against the nightly build will start failing soon if this isn't merged and I don't want this to hold up finishing off the 2.7.1 release tomorrow with a merge to v1.

2.7.1 did not include the renaming of the tracing mechanisms which only went into main earlier today and will end up in 2.7.2. So, with 2.7.1 the value of the LD_PRELOAD wasn't really being overwritten since it was just replaced with itself.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a relief. It was overwritten but the value was the same, and we changed that value in 2.7.2. Thank you for explaining!


// Add a couple more variables
mainTracerConfig.env["ODASA_TRACER_CONFIGURATION"] = mainTracerConfig.spec;
const codeQLDir = path.dirname(codeql.getPath());
if (process.platform === "darwin") {
mainTracerConfig.env["DYLD_INSERT_LIBRARIES"] = path.join(
codeQLDir,
"tools",
"osx64",
"libtrace.dylib"
);
} else if (process.platform !== "win32") {
mainTracerConfig.env["LD_PRELOAD"] = path.join(
codeQLDir,
"tools",
"linux64",
"${LIB}trace.so"
);
// Add a couple more variables
mainTracerConfig.env["ODASA_TRACER_CONFIGURATION"] = mainTracerConfig.spec;
const codeQLDir = path.dirname(codeql.getPath());
if (process.platform === "darwin") {
mainTracerConfig.env["DYLD_INSERT_LIBRARIES"] = path.join(
codeQLDir,
"tools",
"osx64",
"libtrace.dylib"
);
} else if (process.platform !== "win32") {
mainTracerConfig.env["LD_PRELOAD"] = path.join(
codeQLDir,
"tools",
"linux64",
"${LIB}trace.so"
);
}
}

// On macos it's necessary to prefix the build command with the runner executable
Expand Down