Java/Ruby/Rust/QL: add `overlayChangedFiles` relation to dbscheme by nickrolfe · Pull Request #19896 · github/codeql · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Java/Ruby/Rust/QL: add overlayChangedFiles relation to dbscheme #19896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

nickrolfe
Copy link
Contributor

This PR will be synchronised with a CLI change that emits overlayChangedFiles tuples, which will let us write more robust discard predicates (including discarding tuples from files that have been deleted in the overlay).

Also, bump the overlay_support_version tag for Ruby, since the updated version will be used to indicate that the dbscheme contains the overlayChangedFiles relation.

@nickrolfe nickrolfe added the depends on internal PR This PR should only be merged in sync with an internal Semmle PR label Jun 26, 2025
@github-actions github-actions bot added Java Ruby QL-for-QL Rust Pull requests that update Rust code labels Jun 26, 2025
@nickrolfe nickrolfe force-pushed the nickrolfe/overlay-deleted-files branch 2 times, most recently from 3a6fe71 to b6d49dc Compare June 30, 2025 09:04
@nickrolfe nickrolfe marked this pull request as ready for review June 30, 2025 09:10
@Copilot Copilot AI review requested due to automatic review settings June 30, 2025 09:10
@nickrolfe nickrolfe requested review from a team as code owners June 30, 2025 09:10
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@nickrolfe nickrolfe added the no-change-note-required This PR does not need a change note label Jun 30, 2025
@nickrolfe nickrolfe force-pushed the nickrolfe/overlay-deleted-files branch from b6d49dc to 2ac7bf8 Compare July 3, 2025 11:32
@nickrolfe nickrolfe force-pushed the nickrolfe/overlay-deleted-files branch from 2ac7bf8 to d8574a6 Compare July 3, 2025 11:44
Copy link
Contributor

@aibaars aibaars left a comment

Choose a reason for hiding this comment

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

Looks fine to me. Just make sure to coordinate with @redsun82 to avoid conflicts with another PR that adds upgrade/downgrade scripts for Rust.

@@ -114,6 +114,10 @@ databaseMetadata(
string value: string ref
);

overlayChangedFiles(
string path: string ref
Copy link
Contributor

Choose a reason for hiding this comment

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

Why string and not @file ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because this will be populated by the CLI from the list of changed files calculated by the CodeQL Action, which in turn uses git to diff against the base branch, and it seems quite possible that there will be paths for files that aren't in the database and therefore don't have a @file entity.

If we wanted to use @file, we'd have to consider making the CLI also emit files tuples to ensure db consistency. It seems simpler just to use strings, at the low cost of adding an extra join in the discard predicates.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok makes sense.

@nickrolfe
Copy link
Contributor Author

Looks fine to me. Just make sure to coordinate with @redsun82 to avoid conflicts with another PR that adds upgrade/downgrade scripts for Rust.

Sure. Thankfully, git will complain about conflicts if that happens (it already did once since I opened this PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends on internal PR This PR should only be merged in sync with an internal Semmle PR Java no-change-note-required This PR does not need a change note QL-for-QL Ruby Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.