Send new per-query alert count event reports for QA telemetry#1741
Merged
angelapwen merged 6 commits intogithub:mainfrom Jun 30, 2023
Merged
Send new per-query alert count event reports for QA telemetry#1741angelapwen merged 6 commits intogithub:mainfrom
angelapwen merged 6 commits intogithub:mainfrom
Conversation
46b340a to
b84eeb1
Compare
b84eeb1 to
c5f557c
Compare
c5f557c to
5156052
Compare
henrymercer
reviewed
Jun 29, 2023
henrymercer
previously approved these changes
Jun 30, 2023
Contributor
Author
|
I've set the feature to |
henrymercer
approved these changes
Jun 30, 2023
6 tasks
Contributor
I can see that in your test run. But it does not look like the data enters the database. Is that intentional? Results in 34035006 reports with length 0 event_reports, and nothing else. |
Contributor
Author
|
@esbena Thank you for pointing this out. I looked at the debug logs of the run more closely and it looks like the request returned an error because I had sent the date/times for the |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change sends a list of event reports representing the per-query alert counts from a run, appended as a field to the
analyzestatus report, when theqa_telemetryfeature flag is set. Theevent_reportschema in the data warehouse is mimicked in theEventReportinterface here.We generate an event report just after
codeql database-interpret resultsis run for each language, so the event reports are language-specific. Thepropertiesfield of the event report is an object representing the per-query alert counts processed from a single SARIF file.I have manually tested this by setting the environment variable
CODEQL_ACTION_QA_TELEMETRY: truein a test run (GitHub internal only link) to confirm that the event report and alert counts are being generated appropriately. I have also modified the existingrunQueriestest to confirm that the appropriateevent_reportstatus report field is set with event propertycodeql database interpret-results.Merge / deployment checklist