Skip to content

Comments

Fix hardcoded schema in Postgres reschedule query#304

Merged
jamescmartinez merged 1 commit intoopenworkflowdev:mainfrom
thomasjiangcy:fix/custom-schema-reschedule
Feb 14, 2026
Merged

Fix hardcoded schema in Postgres reschedule query#304
jamescmartinez merged 1 commit intoopenworkflowdev:mainfrom
thomasjiangcy:fix/custom-schema-reschedule

Conversation

@thomasjiangcy
Copy link
Contributor

@thomasjiangcy thomasjiangcy commented Feb 14, 2026

Summary

  • replace the remaining hardcoded "openworkflow"."workflow_runs" update target in BackendPostgres.rescheduleWorkflowRunAfterFailedStepAttempt with the configured schema table helper
  • add a regression test that exercises rescheduleWorkflowRunAfterFailedStepAttempt with a custom schema to prevent regressions

Testing

  • npm run ci

@codecov
Copy link

codecov bot commented Feb 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.rescheduleWorkflowRunAfterFailedStepAttempt to use this.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.

Copy link
Contributor

@jamescmartinez jamescmartinez left a comment

Choose a reason for hiding this comment

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

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.

@jamescmartinez jamescmartinez merged commit c8e2025 into openworkflowdev:main Feb 14, 2026
9 checks passed
@thomasjiangcy
Copy link
Contributor Author

thanks for letting me know!

@thomasjiangcy thomasjiangcy deleted the fix/custom-schema-reschedule branch February 14, 2026 16:14
@jamescmartinez
Copy link
Contributor

@thomasjiangcy released in 0.7.1

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