Skip to content

Conversation

@aeisenberg
Copy link
Contributor

@aeisenberg aeisenberg commented Sep 5, 2023

Before this change and starting with CLI v2.14.3, if you wanted to run a variant analysis query and the pack it is contained in has at least one query that contains an extensible predicate, this would be an error.

The reason is that v2.14.3 introduced deep validation for data extensions. We are not copying the query that contains an extensible predicate to the synthetic pack we are generating. This means that deep validation will fail because there will be extensions that target the missing extensible predicate.

This change avoids the problem by copying any query files that contain extensible predicates to the synthetic pack. It uses the internal generate extensible-predicate-metadata command to discover which query files contain extensible predicates and copies them.

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.
  • [n/a] [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.

Before this change and starting with CLI v2.14.3, if you wanted to run
a variant analysis query and the pack it is contained in has at least
one query that contains an extensible predicate, this would be an error.

The reason is that v2.14.3 introduced deep validation for data
extensions. We are not copying the query that contains an extensible
predicate to the synthetic pack we are generating. This means that deep
validation will fail because there will be extensions that target the
missing extensible predicate.

This change avoids the problem by copying any query files that contain
extensible predicates to the synthetic pack. It uses the internal
`generate extensible-predicate-metadata` command to discover which
query files contain extensible predicates and copies them.
@aeisenberg aeisenberg requested review from a team as code owners September 5, 2023 20:30
@aeisenberg aeisenberg force-pushed the aeisenberg/extensible-predicate-metadata branch from 9166e6a to d8fb227 Compare September 5, 2023 21:49
@aeisenberg
Copy link
Contributor Author

@robertbrignull would you be able to look at this?

Copy link
Contributor

@robertbrignull robertbrignull left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me. I don't know as much as some about what effects could happen by including a query file in the pack, but I trust you it's the right thing to do. I did manage to reproduce the error and verify that this branch fixes it.

@aeisenberg
Copy link
Contributor Author

Thanks for looking into this.

The only (mildly) negative effect is that because we are including more query files in the synthetic query pack, we will need to compile more queries and generating the pack will take slightly longer. However, these queries are ignored since they are not part of the default query suite that is run by the variant analysis runner.

@aeisenberg aeisenberg merged commit 3a8028c into main Sep 8, 2023
@aeisenberg aeisenberg deleted the aeisenberg/extensible-predicate-metadata branch September 8, 2023 16:38
@shati-patel shati-patel mentioned this pull request Sep 11, 2023
3 tasks
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.

3 participants