-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
codeql-action/init prevents bazel from reading version information #17704
Comments
👋 @werkt thanks for notifying us of this. Indeed, I can reproduce this behaviour with the following commands on an empty directory:
Oddly enough, this seems to only affect the version command, with other bazel commands working as expected. We're having a look at this. |
Hi @werkt , could you elaborate on
Do you have a link to the rule source code? Is this calling a starlark API, or do the protobuf rules shell out to |
@werkt I found the root cause of this, where a In the meantime, if you can't wait, you could work around this by removing that file from that internal jar. To do so you could add the following workflow step right after - name: Remove file to work around bazel version not working under CodeQL
run: |
zip -d build-data.properties "$CODEQL_EXTRACTOR_JAVA_ROOT/tools/codeql-java-agent.jar" If you do so, be advised that this will start to fail when the proper fix lands in the CodeQL release |
@criemen the full route of this failure is convoluted. tl;dr: No, it doesn't shell out to Bazel reads the properties and populates backing referenced to create a WorkspaceFactory which binds into native bazel_features through a MODULES binding that I'll spare you, populates The protobuf rule implementation here, through here reads the This only matters when mixing |
Prevents github/codeql#17704 Should be removed when CodeQL is >= 2.19.3
Prevents github/codeql#17704 Should be removed when CodeQL is >= 2.19.3
@redsun82 that doesn't seem to do the trick per https:/buildfarm/buildfarm/actions/runs/11255637377/job/31295652785?pr=1889 (your step with an || message, and a I'll poke around a bit more now that I see what you're doing here. EDIT: zip does things backwards-ish. Flipped the args around to make it work. Workaround will be landed soon, looking forward to the release. |
Prevents github/codeql#17704 Should be removed when CodeQL is >= 2.19.3
Prevents github/codeql#17704 Should be removed when CodeQL is >= 2.19.3
Prevents github/codeql#17704 Should be removed when CodeQL is >= 2.19.3
ah, my bad, indeed the command needed to be |
Before calling github/codeql-action/init@v3 in my job that uses bazel to build,
bazel version
reports:After calling the init step, with a fresh bazel daemon start after shutdown, it reports:
I would like to continue using codeql, but this will be impossible if it breaks this feature, as it is used by external rules definitions (protobuf) to determine how to function based on version at runtime in their starlark definitions, causing issues that are unique to the codeql environment.
An example of this is available at https:/buildfarm/buildfarm/actions/runs/11245576544/job/31265839492?pr=1887
The text was updated successfully, but these errors were encountered: