| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
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:
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 |
Sorry, something went wrong.
| baseDatabaseOidsFilePath, | ||
| path.join(databasePath, BASE_DATABASE_OIDS_FILE_NAME), | ||
| ); | ||
| additionalFiles.push(BASE_DATABASE_OIDS_FILE_NAME); |
There was a problem hiding this comment.
for reference: we also do this elsewhere
Sorry, something went wrong.
There was a problem hiding this comment.
Just a few minor questions, otherwise this looks reasonable.
Sorry, something went wrong.
| databasePath: string, | ||
| outputFilePath: string, | ||
| dbName: string, | ||
| tryAlsoIncludeRelativePaths: string[], |
There was a problem hiding this comment.
Does the name start with try because of the feature check? If so, we should probably just call this includeRelativePaths (or extraPathsToInclude).
Sorry, something went wrong.
There was a problem hiding this comment.
We could do that, and perform the feature check in the caller. I don't have a strong opinion.
Sorry, something went wrong.
There was a problem hiding this comment.
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.
Sorry, something went wrong.
| 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 |
There was a problem hiding this comment.
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.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks! The changes made in response to my comments look good 👍🏻
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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:
Which use cases does this change impact?
Workflow types:
Products:
Environments:
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist