Fix hardcoded schema in Postgres reschedule query#304
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR removes the last hardcoded "openworkflow"."workflow_runs" reference in the Postgres backend reschedule path, ensuring schema customization is respected, and adds a regression test to prevent this from breaking again.
Changes:
- Update
BackendPostgres.rescheduleWorkflowRunAfterFailedStepAttemptto usethis.workflowRunsTable()instead of a hardcoded schema-qualified table name. - Add a Vitest regression test that verifies rescheduling updates the workflow run row in a custom schema.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/openworkflow/postgres/backend.ts | Uses the schema-aware table helper in the reschedule UPDATE query to support custom schemas. |
| packages/openworkflow/postgres/backend.test.ts | Adds a regression test validating rescheduling works when schema is customized. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jamescmartinez
left a comment
There was a problem hiding this comment.
great find, thank you @thomasjiangcy for finding this and for the PR!
this was my fault - I had #294 going in parallel to your PR #293, so the query didn't support your new configurable schema work.
|
thanks for letting me know! |
|
@thomasjiangcy released in 0.7.1 |
Summary
"openworkflow"."workflow_runs"update target inBackendPostgres.rescheduleWorkflowRunAfterFailedStepAttemptwith the configured schema table helperrescheduleWorkflowRunAfterFailedStepAttemptwith a custom schema to prevent regressionsTesting