FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Include base database OIDs when bundling database by henrymercer · Pull Request #3404 · github/codeql-action · GitHub

Include base database OIDs when bundling database - #3404

Merged
henrymercer merged 6 commits into
mainfrom
henrymercer/include-oids-in-bundle
Jan 20, 2026
Merged

Include base database OIDs when bundling database#3404
henrymercer merged 6 commits into
mainfrom
henrymercer/include-oids-in-bundle

Conversation

Copy link
Copy Markdown
Contributor

Include the base database OIDs file when bundling the database since this file is required to compute the set of changed files and perform an overlay analysis.

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 and/or GitHub Enterprise Cloud with Data Residency.

How did/will you validate this change?

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

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

  • Feature flags - All new or changed code paths can be fully disabled with corresponding feature flags.

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.

henrymercer requested a review from a team as a code owner January 19, 2026 18:14
Copilot AI review requested due to automatic review settings January 19, 2026 18:14
github-actions Bot added the size/S Should be easy to review label Jan 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

This pull request adds support for including the base database OIDs file when bundling databases, which is required for computing changed files and performing overlay analysis.

Changes:

  • Moved getBaseDatabaseOidsFilePath function from overlay-database-utils.ts to util.ts and made it exported to allow reuse across multiple modules
  • Added BundleSupportsIncludeOption feature flag to conditionally enable the new --include option for the codeql database bundle command
  • Extended the databaseBundle method signature to accept additional files to include in the bundle, with backward compatibility via feature flag checking

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/util.ts Added constant for base database OIDs filename, exported getBaseDatabaseOidsFilePath function, and updated bundleDb to copy and include the base database OIDs file in the bundle
src/tools-features.ts Added BundleSupportsIncludeOption feature flag enum value
src/overlay-database-utils.ts Removed local getBaseDatabaseOidsFilePath function and imported it from util.ts
src/codeql.ts Updated databaseBundle method signature to accept tryAlsoIncludeRelativePaths parameter and conditionally pass --include flags to the CLI
package-lock.json Automated npm lock file updates adding peer dependency markers
lib/*.js Auto-generated JavaScript files from TypeScript compilation

Comment thread src/util.ts
baseDatabaseOidsFilePath,
path.join(databasePath, BASE_DATABASE_OIDS_FILE_NAME),
);
additionalFiles.push(BASE_DATABASE_OIDS_FILE_NAME);

esbena Jan 19, 2026
edited by mbg
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

for reference: we also do this elsewhere

esbena previously approved these changes Jan 19, 2026
mbg previously approved these changes Jan 20, 2026

mbg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Just a few minor questions, otherwise this looks reasonable.

Comment thread src/codeql.ts Outdated
databasePath: string,
outputFilePath: string,
dbName: string,
tryAlsoIncludeRelativePaths: string[],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Does the name start with try because of the feature check? If so, we should probably just call this includeRelativePaths (or extraPathsToInclude).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We could do that, and perform the feature check in the caller. I don't have a strong opinion.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

No, keep the feature check here. My point was that the feature check is essentially a FF check to stop us from trying to use a feature that is not yet supported by the CLI. Our expectation would be that eventually this will always happen. In general, we don't name things try[...] if they are only used if a FF is enabled that we eventually expect to always be true.

Comment thread src/codeql.ts Outdated
Comment thread src/util.ts Outdated
await fs.promises.rm(databaseBundlePath, { force: true });
}
await codeql.databaseBundle(databasePath, databaseBundlePath, dbName);
// Copy the base database OIDs file into the database location if it exists

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think this comment could be improved: right now, it is not super obvious what the difference between databasePath here and config.dbLocation is, and why the file has to be copied from the latter to the former.

henrymercer dismissed stale reviews from mbg and esbena via b880a1a January 20, 2026 13:45
henrymercer requested a review from mbg January 20, 2026 13:54

mbg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks! The changes made in response to my comments look good 👍🏻

henrymercer enabled auto-merge January 20, 2026 14:06
henrymercer merged commit 93a99bf into main Jan 20, 2026
241 checks passed
henrymercer deleted the henrymercer/include-oids-in-bundle branch January 20, 2026 14:13
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

Labels

size/S Should be easy to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL