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

Fix Go tracing on Windows, and fix tests #1209

Merged
merged 7 commits into from Aug 24, 2022

Conversation

henrymercer
Copy link
Contributor

@henrymercer henrymercer commented Aug 23, 2022

Fix Go tracing tests

We're currently supplying CODEQL_EXTRACTOR_GO_BUILD_TRACING=true rather than the expected CODEQL_EXTRACTOR_GO_BUILD_TRACING=on in the PR checks, therefore tracing isn't being tested.

This PR updates the PR checks to the expected CODEQL_EXTRACTOR_GO_BUILD_TRACING=on and also adds an error if it's set to true. Making true a synonym of on is more difficult than it's worth as the Go autobuilder also looks at this environment variable, so whether true is a synonym or not would depend on the version of the CodeQL CLI.

Fix Go tracing on Windows

After fixing the tests, we discovered a bug with Go tracing on Windows with the Lua tracer. We have a fix here: github/codeql#10147. Until this fix is released, we disable Lua tracing on Windows when analyzing Go.

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.

@henrymercer henrymercer requested a review from a team as a code owner August 23, 2022 17:03
@henrymercer henrymercer force-pushed the henrymercer/fix-go-tracing-tests branch 3 times, most recently from 916e4f2 to d14f5c9 Compare August 23, 2022 17:27
@henrymercer henrymercer changed the title Fix Go custom tracing tests Fix Go tracing on Windows, and fix tests Aug 23, 2022
These were supplying CODEQL_EXTRACTOR_GO_BUILD_TRACING=true rather than
CODEQL_EXTRACTOR_GO_BUILD_TRACING=on,
therefore tracing wasn't being tested.
This is currently broken in CLI versions 2.10.3 and earlier.
@henrymercer henrymercer force-pushed the henrymercer/fix-go-tracing-tests branch from bd4e2cc to 569f78c Compare August 23, 2022 19:04
@henrymercer
Copy link
Contributor Author

Rebased on main to address a merge conflict.

src/languages.ts Show resolved Hide resolved
src/languages.ts Outdated Show resolved Hide resolved
src/languages.ts Fixed Show resolved Hide resolved
It is enough to pass the checks now that we only use the runner for PR
checks.
@henrymercer henrymercer force-pushed the henrymercer/fix-go-tracing-tests branch from 972fe28 to 182342c Compare August 24, 2022 10:50
Copy link
Contributor

@edoardopirovano edoardopirovano left a comment

Choose a reason for hiding this comment

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

Seems reasonable. Thanks for the investigation and fix!

@henrymercer henrymercer merged commit e7d4da3 into main Aug 24, 2022
@henrymercer henrymercer deleted the henrymercer/fix-go-tracing-tests branch August 24, 2022 12:34
@github-actions github-actions bot mentioned this pull request Aug 25, 2022
6 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.

None yet

3 participants