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 status report for uploading databases to API by henrymercer · Pull Request #3358 · github/codeql-action

Conversation

@henrymercer

@henrymercer henrymercer commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

This PR adds a status report for uploading databases. This contains:

  • The DB language
  • The size of the zipped DB
  • Whether the DB is an overlay base database
  • How long the upload took
  • Error information, if there was an error uploading the database.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Workflow types:

  • Advanced setup - Impacts users who have custom CodeQL workflows.
  • Managed - Impacts users with dynamic workflows (Default Setup, CCR, ...).

Products:

  • Code Scanning - The changes impact analyses when analysis-kinds: code-scanning.

Environments:

  • Dotcom - Impacts CodeQL workflows on github.com.

How did/will you validate this change?

  • Test repository - This change will be tested on a test repository before merging.

See https://github.com/henrymercer-test-org/overlay-testing/actions/runs/20233483858/job/58082003115#step:5:5392

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Rollback - Change can only be disabled by rolling back the release or releasing a new version with a fix.

How will you know if something goes wrong after this change is released?

  • Telemetry - I rely on existing telemetry or have made changes to the telemetry.
    • Dashboards - I will watch relevant dashboards for issues after the release. Consider whether this requires this change to be released at a particular time rather than as part of a regular release.
    • Alerts - New or existing monitors will trip if something goes wrong with this change.

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have 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 December 15, 2025 12:55
@henrymercer
Return status report from cleanupAndUploadDatabases
8e921c3
@henrymercer
Populate database upload results telemetry
5d063dd
Copilot AI review requested due to automatic review settings December 15, 2025 13:22
@henrymercer
henrymercer requested a review from a team as a code owner December 15, 2025 13:22
@github-actions github-actions Bot added the size/S Should be easy to review label Dec 15, 2025
Copilot started reviewing on behalf of henrymercer December 15, 2025 13:22
View session
Copilot AI reviewed Dec 15, 2025
View reviewed changes

Copilot AI 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.

Pull request overview

This PR adds telemetry reporting for database upload operations to provide better observability into the upload process. The changes introduce a structured way to track upload success, failure, and performance metrics.

Key Changes

  • Adds DatabaseUploadResult interface to capture upload metadata including language, size, timing, overlay base status, and error information
  • Changes cleanupAndUploadDatabases to return upload results instead of void
  • Integrates database upload results into the status reporting system

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
src/database-upload.ts Introduces DatabaseUploadResult interface and modifies cleanupAndUploadDatabases to collect and return upload telemetry for each language
src/analyze-action.ts Updates status report interfaces and threading to include database upload results throughout the analyze action workflow
package-lock.json Automatic npm metadata updates adding peer dependency markers
lib/analyze-action.js Generated JavaScript code corresponding to TypeScript changes (not reviewed per guidelines)

Sorry, something went wrong.

Uh oh!

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

All reactions
mbg
mbg previously approved these changes Dec 16, 2025
View reviewed changes

@mbg mbg left a comment

Copy link
Copy Markdown
Member

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.

Broadly looks good, just a couple of questions I had looking over the changes and one naming suggestion.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/database-upload.ts Outdated
actionsUtil.getRequiredInput("checkout_path"),
);
try {
const startTime = Date.now();

@mbg mbg Dec 16, 2025

Copy link
Copy Markdown
Member

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.

Any particular reason for using Date.now() for the measurement here rather than performance.now() that we use elsewhere?

Sorry, something went wrong.

Uh oh!

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

All reactions

@henrymercer henrymercer Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

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.

performance.now() would be better 👍

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/database-upload.ts
Comment on lines 116 to +144
logger.warning(`Failed to upload database for ${language}: ${e}`);
reports.push({
language,
error: util.getErrorMessage(e),

@mbg mbg Dec 16, 2025

Copy link
Copy Markdown
Member

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.

If getErrorMessage(e) is useful here, would it also make sense in the log message above rather than just e?

Sorry, something went wrong.

Uh oh!

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

henrymercer reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread src/database-upload.ts Outdated

const cleanupLevel =
// If config.overlayDatabaseMode is OverlayBase, then we have overlay base databases for all languages.
const isOverlayBase =

@mbg mbg Dec 16, 2025

Copy link
Copy Markdown
Member

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.

I think this name is slightly misleading, because it also depends on the FF. Perhaps uploadOverlayDb would be a better name?

Sorry, something went wrong.

Uh oh!

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

henrymercer reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
henrymercer added 3 commits December 16, 2025 15:38
@henrymercer
Prefer performance.now()
0cb8633
@henrymercer
Use getErrorMessage in log too
ae5de9a
@henrymercer
Rename isOverlayBase
19c7f96
@henrymercer
henrymercer dismissed mbg’s stale review via 19c7f96 December 16, 2025 15:41
@henrymercer
henrymercer requested a review from mbg December 16, 2025 15:42
mbg
mbg previously approved these changes Dec 16, 2025
View reviewed changes

@mbg mbg left a comment

Copy link
Copy Markdown
Member

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.

Thanks for addressing all the suggestions!

Sorry, something went wrong.

Uh oh!

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

All reactions
@henrymercer
Merge branch 'main' into henrymercer/database-upload-telemetry
e962687
@henrymercer
henrymercer dismissed mbg’s stale review via e962687 December 16, 2025 15:53
@henrymercer

henrymercer commented Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

Fixed a merge conflict.

All reactions

Sorry, something went wrong.

Uh oh!

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

@henrymercer
henrymercer requested a review from mbg December 16, 2025 15:53
mbg
mbg approved these changes Dec 16, 2025
View reviewed changes
@henrymercer
henrymercer enabled auto-merge December 16, 2025 16:02
@henrymercer
henrymercer merged commit 5eb7519 into main Dec 16, 2025
@henrymercer
henrymercer deleted the henrymercer/database-upload-telemetry branch December 16, 2025 16:18
This was referenced Dec 16, 2025
Merge main into releases/v4 #3371
Merged
Merge releases/v4 into releases/v3 #3373
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@mbg mbg mbg approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

size/S Should be easy to review

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