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 — Run ML-powered query pack `~0.3.0` on v2.9.3+ of the CLI by TomBolton · Pull Request #1087 · github/codeql-action

Conversation

@TomBolton

@TomBolton TomBolton commented Jun 1, 2022

Copy link
Copy Markdown
Contributor

This PR starts running the following versions of the ML-powered query pack:

  • Version ~0.3.0 of the query pack on v2.9.3+ of the CLI
  • Version ~0.2.0 of the query pack on v2.8.4 <= CLI < v2.9.3
  • Version ~0.1.0 of the query pack on CLI < v2.8.4

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
@TomBolton

TomBolton commented Jun 1, 2022

Copy link
Copy Markdown
Contributor Author

@henrymercer is this how we would like to start running ~0.3.0?

Specifically, I've assumed in this PR that if the CLI is below 2.9.3, but above 2.8.4, we use ~0.2.0; otherwise we use ~0.1.0. Is this correct?

All reactions

Sorry, something went wrong.

Uh oh!

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

henrymercer
henrymercer reviewed Jun 1, 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 logic looks right to me, however to merge it we'll need to do two things:

  1. Compile the TypeScript files to JavaScript — there are instructions for that here: https://github.com/github/codeql-action/blob/main/CONTRIBUTING.md#development-and-testing. You should end up checking in a src/util.ts and corresponding lib/util.js and lib/util.js.map files. Let me know if you have any problems!

  2. Add some tests for this functionality in config-utils.test.ts to verify that the right pack gets loaded for 2.9.3. This commit shows how we did this for 0.2.0: e26813c

Sorry, something went wrong.

Uh oh!

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

All reactions
aeisenberg
aeisenberg reviewed Jun 1, 2022
View reviewed changes

@aeisenberg aeisenberg left a comment •
edited
Loading

Uh oh!

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

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 looks generally sensible. And you'll also need to do what Henry suggests.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/util.ts Resolved

Uh oh!

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

@TomBolton

TomBolton commented Jun 13, 2022

Copy link
Copy Markdown
Contributor Author

This PR is almost ready for another look, but one of the Basic Checks and Runner tests is failing with a duplicate test title and I'm not sure how to fix it, as the tests I added appear to be unique.

Screenshot 2022-06-13 at 17 28 41

All reactions

Sorry, something went wrong.

Uh oh!

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

@aeisenberg

aeisenberg commented Jun 13, 2022

Copy link
Copy Markdown
Contributor

There is an undefined in the test title. It probably means that the test macro isn't sufficient for the new tests you have written. The test macro is the thing that allows you to generate variants of a single test with some slight changes. In this case, we are using mlPoweredQueriesMacro on line 1712. The title property is what generates the title. You need to make sure that all generated titles are distinct.

You will need to change how the title is generated to ensure this is how it works. You can run the tests locally to ensure the titles are unique before pushing up a change.

TomBolton 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.

@TomBolton
TomBolton force-pushed the tombolton/update-ml-pack branch 2 times, most recently from 18563f4 to 602d5a3 Compare June 14, 2022 14:44
@TomBolton
TomBolton marked this pull request as ready for review June 14, 2022 15:36
@TomBolton
TomBolton requested a review from a team as a code owner June 14, 2022 15:36
@TomBolton

TomBolton commented Jun 14, 2022

Copy link
Copy Markdown
Contributor Author

Thanks for the help @aeisenberg!

All reactions

Sorry, something went wrong.

Uh oh!

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

aeisenberg
aeisenberg approved these changes Jun 14, 2022
View reviewed changes

@aeisenberg aeisenberg 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.

Looks reasonable, assuming all the tests pass.

Sorry, something went wrong.

Uh oh!

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

All reactions
henrymercer
henrymercer requested changes Jun 15, 2022
View reviewed changes
Comment thread src/config-utils.test.ts Resolved

Uh oh!

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

TomBolton added 5 commits June 15, 2022 11:42
@TomBolton
add ml query pack 0.3.0
0ece1d1
@TomBolton
fix lint errors
79d8e4a
@TomBolton
compile the modified TypeScript to Javascript
f8f4c0b
@TomBolton
add tests for ML powered queries 0.3.0 and CLI 2.9.3
a568674
@TomBolton
update security extended test for all platforms
a27dc4f
@TomBolton
TomBolton force-pushed the tombolton/update-ml-pack branch from 04a23ec to a27dc4f Compare June 15, 2022 10:42
@TomBolton
TomBolton requested a review from henrymercer June 15, 2022 10:42
@TomBolton

TomBolton commented Jun 15, 2022

Copy link
Copy Markdown
Contributor Author

@henrymercer these two PR checks (here and here), involving a multi-language repo on mac, keep getting cancelled during the go extraction.

I restarted each check to see if it was a transient problem, but it happened again. Any ideas why this might be happening?

All reactions

Sorry, something went wrong.

Uh oh!

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

henrymercer
henrymercer approved these changes Jun 15, 2022
View reviewed changes
@henrymercer

henrymercer commented Jun 15, 2022

Copy link
Copy Markdown
Contributor

I've raised the flaky tests internally. It seems that another rerun has sorted things with one of the jobs, so I've kicked off another run of the other job too.

All reactions

Sorry, something went wrong.

Uh oh!

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

@TomBolton

TomBolton commented Jun 15, 2022

Copy link
Copy Markdown
Contributor Author

Thanks for looking into it @henrymercer and doing the reruns!

All reactions

Sorry, something went wrong.

Uh oh!

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

@TomBolton
TomBolton merged commit df05122 into main Jun 15, 2022
@TomBolton
TomBolton deleted the tombolton/update-ml-pack branch June 15, 2022 14:55
This was referenced Jun 21, 2022
Merge main into releases/v2 #1107
Merged
Merge releases/v2 into releases/v1 #1109
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aeisenberg aeisenberg aeisenberg approved these changes
@henrymercer henrymercer henrymercer approved these changes

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.

3 participants

@TomBolton @aeisenberg @henrymercer
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.