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

Enable bypassing the cached CodeQL bundle via a feature flag #1185

Merged
merged 8 commits into from
Aug 17, 2022

Conversation

henrymercer
Copy link
Contributor

@henrymercer henrymercer commented Aug 16, 2022

In the case that a broken bundle makes its way through the release process, and we only make a rollback decision after that bundle has already made it into the toolcache, this gives us a mechanism to easily perform that rollback in a timely way. See the internal issue for more details.

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 force-pushed the henrymercer/bypass-toolcache-feature-flag branch from da8b28b to e1cd41a Compare August 16, 2022 15:19
@edoardopirovano
Copy link
Contributor

Could we get pr-checks/sync.py to add in TEST_MODE to the environment for all the tests so we don't have to remember to add it on every individual one? Or is there some tests for which it shouldn't be set? Also, I would weakly prefer it to be set at a higher level on the whole job rather than in individual steps, although again I guess this might not be possible if some steps shouldn't have it.

@henrymercer henrymercer changed the title Add capability to bypass the cached CodeQL bundle via a feature flag Enable bypassing the cached CodeQL bundle via a feature flag Aug 16, 2022
@henrymercer
Copy link
Contributor Author

henrymercer commented Aug 16, 2022

Could we get pr-checks/sync.py to add in TEST_MODE to the environment for all the tests so we don't have to remember to add it on every individual one? Or is there some tests for which it shouldn't be set? Also, I would weakly prefer it to be set at a higher level on the whole job rather than in individual steps, although again I guess this might not be possible if some steps shouldn't have it.

Hmm, we could modify the workflow generator to look for patterns like uses: ./../action/init and add a TEST_MODE env variable. It would be nice if that was a bit more robust though.

We have one workflow that explicitly doesn't set TEST_MODE, but it's not autogenerated. My main concern with setting TEST_MODE across the whole workflow is that this is a fairly generic environment variable name, and could potentially change the behaviour of other actions. Perhaps we should look at renaming TEST_MODE to something more specific like CODEQL_ACTION_TEST_MODE first?

@henrymercer henrymercer marked this pull request as ready for review August 16, 2022 16:02
@henrymercer henrymercer requested a review from a team as a code owner August 16, 2022 16:02
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.

Looks good! Thanks for doing a bit of drive-by cleaning up on the code as well 👍🏼

@henrymercer
Copy link
Contributor Author

I'll hold off on merging this until we've deployed the feature flag and I can do a final manual test in our internal testing org.

@henrymercer
Copy link
Contributor Author

henrymercer commented Aug 17, 2022

Manual testing ✅

@henrymercer henrymercer merged commit 7d94bb8 into main Aug 17, 2022
@henrymercer henrymercer deleted the henrymercer/bypass-toolcache-feature-flag branch August 17, 2022 12:21
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.

3 participants