feat: add constraints for input patterns and improve cascade skip tests#611
feat: add constraints for input patterns and improve cascade skip tests#611jumski wants to merge 1 commit into02-14-fix_missing_skip_archivalfrom
Conversation
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
View your CI Pipeline Execution ↗ for commit 4adfb3e
☁️ Nx Cloud last updated this comment at |
| 20260120205547_pgflow_requeue_stalled_tasks.sql h1:4wCBBvjtETCgJf1eXmlH5wCTKDUhiLi0uzsFG1V528E= | ||
| 20260124113408_pgflow_auth_secret_support.sql h1:i/s1JkBqRElN6FOYFQviJt685W08SuSo30aP25lNlLc= | ||
| 20260214181656_pgflow_step_conditions.sql h1:uLPoOD/hPrerMACS6CThb7t7T5LKLpMMrdFXXi4ZQ5s= | ||
| 20260216114523_pgflow_step_conditions.sql h1:TzZx6MqoNysxGaHHNSPvlRzvOJczEtv95jKM9yHy4o8= |
There was a problem hiding this comment.
This line references a migration file '20260216114523_pgflow_step_conditions.sql' that doesn't exist in the repository. Either rename the existing file '20260214181656_pgflow_step_conditions.sql' to '20260216114523_pgflow_step_conditions.sql', or update this line to reference the correct filename. Then run 'atlas migrate hash' to regenerate the checksums.
Spotted by Graphite Agent (based on CI logs)
Is this helpful? React 👍 or 👎 to let us know.
565b7a8 to
a0602c5
Compare
|
|
||
| -- Test 1: required_input_pattern as array should fail | ||
| select throws_ok( | ||
| $$ select pgflow.add_step('step_array', required_input_pattern => '[]'::jsonb) $$, |
There was a problem hiding this comment.
Missing flow_slug parameter. Change to: $$ select pgflow.add_step('invalid_pattern_test', 'step_array', required_input_pattern => '[]'::jsonb) $$
Spotted by Graphite Agent (based on CI logs)
Is this helpful? React 👍 or 👎 to let us know.
|
|
||
| -- Test 4: forbidden_input_pattern as string should fail | ||
| select throws_ok( | ||
| $$ select pgflow.add_step('step_forbidden_string', forbidden_input_pattern => '"invalid"'::jsonb) $$, |
There was a problem hiding this comment.
Missing flow_slug parameter. Change to: $$ select pgflow.add_step('invalid_pattern_test', 'step_forbidden_string', forbidden_input_pattern => '"invalid"'::jsonb) $$
Spotted by Graphite Agent (based on CI logs)
Is this helpful? React 👍 or 👎 to let us know.
a0602c5 to
4adfb3e
Compare

Add constraints and improve cascade skip functionality
This PR adds database constraints to ensure
required_input_patternandforbidden_input_patternare always JSON objects, preventing invalid pattern types. It also enhances the_cascade_force_skip_stepsfunction to:The changes include:
stepstable to validate pattern types_cascade_force_skip_stepsreturn the number of steps skipped_cascade_force_skip_stepsThese changes improve data integrity and make the cascade skip functionality more robust and predictable.