Skip to content

Unify model generation query execution#3043

Merged
koesie10 merged 5 commits intomainfrom
koesie10/generate-model-unify
Nov 3, 2023
Merged

Unify model generation query execution#3043
koesie10 merged 5 commits intomainfrom
koesie10/generate-model-unify

Conversation

@koesie10
Copy link
Copy Markdown
Member

@koesie10 koesie10 commented Nov 1, 2023

This unifies the two code paths for model generation (flow model generation/generate model) by moving it to the language definition. There are some user-visible changes:

  • The notification now shows CaptureSinkModels.ql instead of sink. Same for the other queries.
  • There is no hard error if multiple queries are found for Ruby. This shouldn't be possible in theory since we're resolving a specific path.
  • There shouldn't really be any other user-visible changes.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@koesie10 koesie10 force-pushed the koesie10/generate-model-unify branch from e2729f3 to 693adb5 Compare November 1, 2023 13:56
@koesie10 koesie10 marked this pull request as ready for review November 1, 2023 14:15
@koesie10 koesie10 requested review from a team as code owners November 1, 2023 14:15
@koesie10 koesie10 requested a review from starcke November 1, 2023 14:15
Copy link
Copy Markdown
Contributor

@starcke starcke left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just a question.

const maxStep = filteredQueryPaths.length * 1000;

for (let i = 0; i < filteredQueryPaths.length; i++) {
const queryPath = filteredQueryPaths[i];
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.

I dont think this is a problem, but would this just ignore it if one of the queries wasnt found whereas before it would error?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, that's another difference that I forgot to mention. It should still error if it doesn't find any queries, so I think this is fine.

@koesie10 koesie10 enabled auto-merge November 3, 2023 10:09
@koesie10 koesie10 merged commit 4673bf5 into main Nov 3, 2023
@koesie10 koesie10 deleted the koesie10/generate-model-unify branch November 3, 2023 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants