Skip to content
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

Disable validation for subquery to prevent error #8297

Merged
merged 2 commits into from
Jun 25, 2024
Merged

Conversation

stnguyen90
Copy link
Contributor

@stnguyen90 stnguyen90 commented Jun 20, 2024

What does this PR do?

If there are more than 100 targets, the validation throws an error. This change skips the validation so no error is thrown.

Fixes #8299

Test Plan

Added new test case which should pass

Related PRs and Issues

Parent PR:

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@stnguyen90 stnguyen90 changed the title fix(messaging): disable validation for subquery to prevent error Disable validation for subquery to prevent error Jun 20, 2024
@stnguyen90 stnguyen90 requested a review from abnegate June 20, 2024 23:35
@stnguyen90 stnguyen90 marked this pull request as ready for review June 20, 2024 23:35
app/init.php Outdated Show resolved Hide resolved
app/init.php Outdated
Query::equal('$internalId', $targetIds)
]);
try {
$database->disableValidation();
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use the new skip here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@stnguyen90 stnguyen90 force-pushed the fix-subscribers branch 3 times, most recently from 4b69b0e to a0c0e97 Compare June 24, 2024 18:56
@stnguyen90 stnguyen90 requested a review from abnegate June 24, 2024 19:31
utopia-php/database version 0.50.0 includes a new skipValidation()
function we can use to skip validation when making queries.
If there are more than 100 targets, the validation throws an error. This
change skips the validation so no error is thrown.
@stnguyen90 stnguyen90 changed the base branch from 1.5.x to fix-flaky-function-test June 24, 2024 23:39
Base automatically changed from fix-flaky-function-test to 1.5.x June 25, 2024 01:35
@abnegate abnegate merged commit ef203dc into 1.5.x Jun 25, 2024
21 checks passed
@abnegate abnegate deleted the fix-subscribers branch June 25, 2024 01:38
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.

None yet

2 participants