GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add a way to bypass the toolcache for kotlin and swift by aeisenberg · Pull Request #1394 · github/codeql-action

Conversation

@aeisenberg

@aeisenberg aeisenberg commented Nov 23, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This works by moving the logic to check for toolcache bypass out of
creating the codeql instance. The logic now may perform an API request
in order to check what languages are in the repository. This check is
redundant because the same call is being made later in the action when
the actual list of languages is calculated.

Commit-by-commit review is suggested.

Even though it is inefficient to add this extra API call, I am leaning towards leaving it in because refactoring to perform only one API call would make the code messier, I ensure that the extra API call is made only if necessary, and we expect that this workaround will be temporary.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aeisenberg
Add the bypass_toolcache_kotlin_switft_enabled flag
5b7c9da
@aeisenberg
aeisenberg requested a review from a team as a code owner November 23, 2022 23:00
@aeisenberg
aeisenberg requested review from angelapwen and henrymercer November 23, 2022 23:04
@aeisenberg

aeisenberg commented Nov 23, 2022

Copy link
Copy Markdown
Contributor Author

I don't think this requires a change note.

angelapwen reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aeisenberg
Add the feature to bypass the toolcache for kotlin and swift
f79028a
This works by moving the logic to check for toolcache bypass out of
creating the codeql instance. The logic now _may_ perform an API request
in order to check what languages are in the repository. This check is
redundant because the same call is being made later in the action when
the actual list of languages is calculated.
@aeisenberg
aeisenberg force-pushed the aeisenberg/bypass-toolcache-kotlin-swift branch from 476358e to f79028a Compare November 23, 2022 23:11
adityasharad
adityasharad reviewed Nov 23, 2022
View reviewed changes
Comment thread src/config-utils.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/feature-flags.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/feature-flags.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/util.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/languages.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/languages.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@aeisenberg

aeisenberg commented Nov 23, 2022

Copy link
Copy Markdown
Contributor Author

I'm going to add a few more tests here since this logic is getting tricky.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

angelapwen
angelapwen reviewed Nov 24, 2022
View reviewed changes
Comment thread src/testing-utils.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@aeisenberg

aeisenberg commented Nov 24, 2022

Copy link
Copy Markdown
Contributor Author

I think I addressed all comments, added more tests, and fixed the bug I found. Hopefully, all tests will pass.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

github-advanced-security[bot]
github-advanced-security AI found potential problems Nov 24, 2022
View reviewed changes
Comment thread src/config-utils.ts Fixed

Uh oh!

There was an error while loading. Please reload this page.

adityasharad
adityasharad reviewed Nov 24, 2022
View reviewed changes

@adityasharad adityasharad left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

One more suggestion, otherwise looks reasonable. I will let Henry or Angela do a more detailed review however.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aeisenberg
aeisenberg force-pushed the aeisenberg/bypass-toolcache-kotlin-swift branch from b36411b to 99d2473 Compare November 24, 2022 06:14
@aeisenberg
Add some new tests and fix some comments
ad7ca9b
@aeisenberg
aeisenberg force-pushed the aeisenberg/bypass-toolcache-kotlin-swift branch from 99d2473 to ad7ca9b Compare November 24, 2022 06:18
henrymercer
henrymercer reviewed Nov 24, 2022
View reviewed changes

@henrymercer henrymercer left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This generally looks great.

Some questions:

  1. Should we revert this change once the next release is fully rolled out and we no longer need to bypass the toolcache for Kotlin / Swift? It does look like there's some complexity here that we wouldn't want to keep around.
  2. Do we want to add a PR check that runs some integration tests, or are we happy with the unit tests here? Personally I'd be ok with unit tests here plus some manual testing.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/config-utils.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/config-utils.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/config-utils.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/feature-flags.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/feature-flags.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/util.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/util.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/util.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

aeisenberg added 2 commits November 24, 2022 11:06
@aeisenberg
Add API call for languages if java in input
eb19ecb
If a user explicitly includes java in their language inputs, always
make an api call to check for kotlin in the repo.

Also, add some suggestions from code reviews.
@aeisenberg
Small refactoring of shouldBypassToolcache
102e01d
@aeisenberg
aeisenberg force-pushed the aeisenberg/bypass-toolcache-kotlin-swift branch from fede016 to 102e01d Compare November 24, 2022 20:33
henrymercer
henrymercer approved these changes Nov 25, 2022
View reviewed changes
@henrymercer
henrymercer merged commit 7e73ded into main Nov 25, 2022
@henrymercer
henrymercer deleted the aeisenberg/bypass-toolcache-kotlin-swift branch November 25, 2022 09:30
This was referenced Nov 25, 2022
Merge main into releases/v2 #1395
Merged
Merge releases/v2 into releases/v1 #1397
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adityasharad adityasharad adityasharad left review comments
@henrymercer henrymercer henrymercer approved these changes
+1 more reviewer
@angelapwen angelapwen angelapwen left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@aeisenberg @adityasharad @henrymercer @angelapwen @github-advanced-security
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.