Skip to content

Rust: Bulk model generator #19499

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 3 commits into
base: main
Choose a base branch
from

Conversation

paldepind
Copy link
Contributor

@paldepind paldepind commented May 15, 2025

This PR adds a Python script for generating models for a list of projects in bulk. The script imports the existing model runner script.

My thinking is that the script can eventually become language-agnostic and shared, but since it's still experimental and subject to change I've put "rust" in the name (rust_bulk_generate_mad.py) to make it clear that as of now it's only intended for Rust. I'm thinking we can drop the rust prefix at some point if/when we become more confident that it's useful and a decent approach.

This PR commits the output of running the script, but it makes no changes to the quality of the generated models. I hence think that we don't have to inspect the models closely in order to merge this, but instead fix any issues in follow up work when we notice imprecisions or missing models.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label May 15, 2025
@paldepind paldepind force-pushed the rust-bulk-model-generator branch from 204eb1c to 68d2961 Compare May 16, 2025 11:39
@paldepind paldepind force-pushed the rust-bulk-model-generator branch from 68d2961 to 41e76e2 Compare May 16, 2025 12:08
@paldepind paldepind marked this pull request as ready for review May 16, 2025 12:26
@paldepind paldepind requested a review from a team as a code owner May 16, 2025 12:26
Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

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

Looks great!

This PR commits the output of running the script, but it makes no changes to the quality of the generated models. I hence think that we don't have to inspect the models closely in order to merge this, but instead fix any issues in follow up work when we notice imprecisions or missing models.

Sounds reasonable.

It's a bit odd that taint reach drops for one project in the DCA run, despite only new models being added. Do you have any idea what's going on there?

)
print(f"Completed cloning {name}")
else:
print(f"Skipping cloning {name} as it already exists at {target_dir}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally at some point we should handle the case that the specified git_tag has been updated (by fetching the new version).

else:
print(
f"Skipping database creation for {name} as it already exists at {database_dir}"
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, it would be nice to determine if we should update the database either because the project or codeql version has been changed. This probably isn't a feature we strictly need in the initial version mind you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants