Skip to content

fix(sdk): reconcile TailorDB migration label after deploy --no-schema-check#1179

Draft
toiroakr wants to merge 1 commit into
mainfrom
fix/tailordb-migration-label-drift
Draft

fix(sdk): reconcile TailorDB migration label after deploy --no-schema-check#1179
toiroakr wants to merge 1 commit into
mainfrom
fix/tailordb-migration-label-drift

Conversation

@toiroakr
Copy link
Copy Markdown
Contributor

Summary

  • Force the TailorDB sdk-migration label to the working tree's latest migration number when tailor-sdk deploy --no-schema-check completes, so the invariant label ≤ working_tree_max is preserved after a rollback-style deploy.
  • Previously the --no-schema-check path applied types but never updated the migration label. Deploying with --no-schema-check from a revision whose working tree was older than the remote left the remote label stale; the next regular deploy then reconstructed a snapshot at a label that no longer existed in the working tree and aborted with a false Remote schema drift detected error.
  • Reconciliation runs unconditionally (only gated on --no-schema-check), and the reconciliation step is logged when the label actually changes.
  • Covered by new unit tests in deploy/tailordb/index.test.ts and exercised by the existing --no-schema-check e2e in e2e/deploy.test.ts.

…-check

Previously, running `tailor-sdk deploy --no-schema-check` from a revision
whose working tree was older than the remote left the remote migration
label stale. The next `deploy` then reconstructed a snapshot at a label
that no longer existed in the working tree and aborted with a false
"Remote schema drift detected" error.

Force the migration label to the working tree's latest migration number
when `--no-schema-check` is in effect, restoring the invariant that the
label is always reachable from the working tree.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2026

🦋 Changeset detected

Latest commit: f72ffe1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@tailor-platform/sdk Patch
@tailor-platform/create-sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

⚡ pkg.pr.new

@tailor-platform/sdk

pnpm add https://pkg.pr.new/@tailor-platform/sdk@f72ffe1
pnpm dlx https://pkg.pr.new/@tailor-platform/sdk@f72ffe1 --help

@tailor-platform/create-sdk

pnpm add https://pkg.pr.new/@tailor-platform/create-sdk@f72ffe1
pnpm dlx https://pkg.pr.new/@tailor-platform/create-sdk@f72ffe1 my-app

commit: f72ffe1

@github-actions
Copy link
Copy Markdown

Code Metrics Report (packages/sdk)

main (0cee9fb) #1179 (da2cf23) +/-
Coverage 61.8% 61.9% +0.0%
Code to Test Ratio 1:0.4 1:0.4 +0.0
Details
  |                    | main (0cee9fb) | #1179 (da2cf23) |  +/-  |
  |--------------------|----------------|-----------------|-------|
+ | Coverage           |          61.8% |           61.9% | +0.0% |
  |   Files            |            362 |             362 |     0 |
  |   Lines            |          12638 |           12647 |    +9 |
+ |   Covered          |           7818 |            7834 |   +16 |
+ | Code to Test Ratio |          1:0.4 |           1:0.4 |  +0.0 |
  |   Code             |          82717 |           82876 |  +159 |
+ |   Test             |          34475 |           34605 |  +130 |

Code coverage of files in pull request scope (38.9% → 40.9%)

Files Coverage +/- Status
packages/sdk/src/cli/commands/deploy/tailordb/index.ts 40.9% +1.9% modified

SDK Configure Bundle Size

main (0cee9fb) #1179 (da2cf23) +/-
configure-index-size 17KB 17KB 0KB
dependency-chunks-size 34.43KB 34.43KB 0KB
total-bundle-size 51.43KB 51.43KB 0KB

Runtime Performance

main (0cee9fb) #1179 (da2cf23) +/-
Generate Median 2,566ms 2,678ms 112ms
Generate Max 2,735ms 2,710ms -25ms
Apply Build Median 2,603ms 2,685ms 82ms
Apply Build Max 2,623ms 2,716ms 93ms

Type Performance (instantiations)

main (0cee9fb) #1179 (da2cf23) +/-
tailordb-basic 35,130 35,130 0
tailordb-optional 3,841 3,841 0
tailordb-relation 7,428 7,428 0
tailordb-validate 2,566 2,566 0
tailordb-hooks 5,767 5,767 0
tailordb-object 12,136 12,136 0
tailordb-enum 2,462 2,462 0
resolver-basic 9,424 9,424 0
resolver-nested 26,111 26,111 0
resolver-array 18,187 18,187 0
executor-schedule 4,234 4,234 0
executor-webhook 873 873 0
executor-record 8,166 8,166 0
executor-resolver 4,369 4,369 0
executor-operation-function 869 869 0
executor-operation-gql 869 869 0
executor-operation-webhook 888 888 0
executor-operation-workflow 1,714 1,714 0

Reported by octocov

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.

1 participant