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 — Report ML-powered query enablement in the `init` status report by henrymercer · Pull Request #907 · github/codeql-action

Conversation

@henrymercer

@henrymercer henrymercer commented Feb 3, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Adds information about whether ML-powered JS queries are enabled to the init status report. This will improve our observability by allowing us to compare metrics between runs with ML-powered JS queries on and off.

Specifically, we add a ml_powered_js_queries field to the init status report that contains:

  • The version string if the analysis will use a specific version of the pack
  • "latest" if the analysis will use the latest version of the pack
  • "false" if the analysis won't run any ML-powered JS queries, or if the analysis will run multiple ML-powered JS query packs

We report this information in the init status report rather than the analyze status report so we can gather data about timeouts.

Example status report:

{
  "workflow_run_id": 1790730464,
  "workflow_name": "Code Scanning - Action",
  "job_name": "CodeQL-Build",
  "analysis_key": ".github/workflows/codeql-analysis.yml:CodeQL-Build",
  "commit_oid": "6a99ab511b076566d0b9259a4102ac7f5c4b3e0c",
  "ref": "refs/heads/main",
  "action_name": "init",
  "action_ref": "1cddec9558c522dd219349d2149a48c46e203a8a",
  "action_oid": "unknown",
  "started_at": "2022-02-03T17:08:30.984Z",
  "action_started_at": "2022-02-03T17:08:30.984Z",
  "status": "success",
  "completed_at": "2022-02-03T17:08:37.758Z",
  "matrix_vars": "null",
  "disable_default_queries": "",
  "languages": "javascript",
  "ml_powered_js_queries": "~0.0.2" /* NEW */,
  "paths": "",
  "paths_ignore": "",
  "queries": "security-extended",
  "tools_input": "latest",
  "tools_resolved_version": "20220120",
  "workflow_languages": "javascript"
}

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
henrymercer added 2 commits February 3, 2022 11:52
@henrymercer
Convert status report comments to documentation
a005206
@henrymercer
Add ML-powered queries enablement to init status report
1cddec9
We report this information in the `init` status report rather than the
`analyze` status report so we can gather data about timeouts.
@henrymercer
henrymercer marked this pull request as ready for review February 3, 2022 17:15
@henrymercer
henrymercer requested a review from a team as a code owner February 3, 2022 17:15
aeisenberg
aeisenberg reviewed Feb 3, 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.

Just a minor thing, otherwise looks good.

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.

Comment thread src/util.test.ts Resolved

Uh oh!

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

@edoardopirovano

edoardopirovano commented Feb 3, 2022

Copy link
Copy Markdown
Contributor

I believe you also need a PR such as https://github.com/github/hydro-schemas/pull/1845 to add the new field to the database and also a github/github PR to propagate the fields?

All reactions

Sorry, something went wrong.

Uh oh!

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

@henrymercer

henrymercer commented Feb 3, 2022

Copy link
Copy Markdown
Contributor Author

I believe you also need a PR such as github/hydro-schemas#1845 to add the new field to the database and also a github/github PR to propagate the fields?

Thanks, these are in the works (see the internal tracking issue)!

All reactions

Sorry, something went wrong.

Uh oh!

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

henrymercer added 2 commits February 4, 2022 16:34
@henrymercer
Only add ML-powered queries pack if the user didn't manually request it
9f32fc9
@henrymercer
Add "multiple" report for ML-powered JS query enablement
537b2f8
When multiple ML-powered JS packs are in scope (an unsupported
scenario), the status report is "multiple".
@henrymercer
henrymercer requested a review from aeisenberg February 4, 2022 16:38
henrymercer added 2 commits February 4, 2022 16:38
@henrymercer
Merge branch 'main' into henrymercer/report-ml-powered-query-enablement
ad40e4a
@henrymercer
Update getMlPoweredJsQueriesStatus doc
501fe7f
aeisenberg
aeisenberg reviewed Feb 4, 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/util.ts Resolved

Uh oh!

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

henrymercer added 3 commits February 7, 2022 14:24
@henrymercer
Nit: Simplify code with optional chaining
f888be7
@henrymercer
Limit cardinality of ML-powered JS queries status report
c95a3d8
Some platforms that ingest this status report charge based on the
cardinality of the fields, so here we restrict the version strings we
support to a fixed set.
@henrymercer
Merge branch 'main' into henrymercer/report-ml-powered-query-enablement
cc622a0
@henrymercer
henrymercer requested a review from aeisenberg February 7, 2022 15:10
aeisenberg
aeisenberg approved these changes Feb 7, 2022
View reviewed changes
@henrymercer
Add more documentation for ML-powered JS queries status report
03c64ef
Also be more explicit about which version strings are reportable in
the code.
@henrymercer
henrymercer merged commit 4eb03fb into main Feb 7, 2022
@henrymercer
henrymercer deleted the henrymercer/report-ml-powered-query-enablement branch February 7, 2022 17:16
@github-actions github-actions Bot mentioned this pull request Feb 7, 2022
Merge main into v1 #913
Merged
5 tasks done
@henrymercer henrymercer mentioned this pull request Feb 15, 2022
Add ML-powered query enablement info to analyze finish status report #928
Merged
3 tasks done
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

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

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