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

Go extraction reconciliation: Ensure backwards compatibility for multi-language builds #1242

Merged
merged 5 commits into from Sep 16, 2022

Conversation

henrymercer
Copy link
Contributor

Additionally autobuild Go in the autobuild Action to ensure backwards compatibility for users performing a multi-language build within a single job. For example, consider a user with the following workflow file:

- uses: github/codeql-action/init@v2
  with:
    languages: go, java
- uses: github/codeql-action/autobuild@v2
- uses: github/codeql-action/analyze@v2
  • With Go extraction disabled, we will run the Java autobuilder in the autobuild Action, ensuring we extract both Java and Go code.
  • With Go extraction enabled, taking the previous behavior we'd run the Go autobuilder, since Go is first on the list of languages. We wouldn't run the Java autobuilder at all and so we'd only extract Go code.

We therefore introduce a special case here such that we'll autobuild Go in addition to the primary non-Go traced language in the autobuild Action. This special case behavior should be removed as part of the next major version of the CodeQL Action.

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.

Copy link
Contributor

@angelapwen angelapwen left a comment

Choose a reason for hiding this comment

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

Overall this makes sense to me. Seems unavoidable if we want to maintain full backwards compatibility. Happy to re-review/approve when out of draft mode.

src/autobuild.ts Outdated Show resolved Hide resolved
src/autobuild.ts Outdated Show resolved Hide resolved
@henrymercer henrymercer marked this pull request as ready for review September 13, 2022 15:53
@henrymercer henrymercer requested a review from a team as a code owner September 13, 2022 15:53
Copy link
Contributor

@angelapwen angelapwen left a comment

Choose a reason for hiding this comment

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

Looks good to me! Approving for now, but I believe we are waiting until the latest release to go in before merging.

@henrymercer henrymercer merged commit 34aa5a5 into main Sep 16, 2022
@henrymercer henrymercer deleted the henrymercer/go-more-backwards-compat branch September 16, 2022 10:05
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

2 participants