Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect value of LD_PRELOAD given by the CLI #817

Merged
merged 1 commit into from
Nov 16, 2021

Conversation

edoardopirovano
Copy link
Contributor

When implementing its own version of sandwiched tracing, the Action was setting a value of LD_PRELOAD. This code stayed outside of the condition for using the new style of tracing (i.e. using sandwiched tracing form the CLI). So, the Action would try to overwrite the value of LD_PRELOAD given by the CLI. This should not have been the case - when using the CLI's sandwiched tracing we should use the value of LD_PRELOAD provided by the CLI so that the CLI is free to move/rename the libraries as it pleases.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@edoardopirovano edoardopirovano requested a review from a team as a code owner November 15, 2021 22:20
@@ -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!

@edoardopirovano edoardopirovano merged commit 2ecc17d into github:main Nov 16, 2021
@github-actions github-actions bot mentioned this pull request Nov 16, 2021
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants