Skip to content

Commit f57b126

Browse files
Vikhyath Mondreticlaude
andcommitted
revert(deploy): stop tolerating a block-data shape that never shipped
The flag's stint inside `data` began and ended on this branch: `main` and `staging` have zero mentions of `errorEnabled`, and `ci.yml` gates every deploy job on a push to main/staging/dev, so opening a PR deploys nothing. No released version ever wrote the key, which means no production row and no production deployment snapshot can hold one. That makes the exclusion permanent code apologizing for a shape that cannot reach the database it defends. Migration 0287 already strips the key from the live tables, which is where a one-time data fix belongs; in production it matches zero rows, and on a developer database it makes the next deploy write a clean snapshot. Reverts 5ece9f9. That fix was correct about the mechanism and wrong about the scope: it read a local database as evidence about production. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 5ece9f9 commit f57b126

2 files changed

Lines changed: 0 additions & 39 deletions

File tree

‎apps/sim/lib/workflows/comparison/compare.test.ts‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -388,33 +388,6 @@ describe('hasWorkflowChanged', () => {
388388
})
389389
})
390390

391-
/**
392-
* The flag lived in `data` before it had a column. `0287` moves it, but a migration
393-
* only reaches the live tables — every deployment version already written is frozen
394-
* jsonb that keeps the old key, and the wire schema no longer declares it, so Zod
395-
* strips it from the live side. Compared, that read as a change no deploy could
396-
* resolve: the next snapshot came from rows that still carried it.
397-
*/
398-
describe('Legacy error flag in block data', () => {
399-
const withData = (data: Record<string, unknown>) =>
400-
createWorkflowState({ blocks: { block1: createBlock('block1', { data }) } })
401-
402-
it.concurrent('ignores the flag wherever the old key survives', () => {
403-
expect(hasWorkflowChanged(withData({}), withData({ errorEnabled: false }))).toBe(false)
404-
expect(hasWorkflowChanged(withData({}), withData({ errorEnabled: true }))).toBe(false)
405-
})
406-
407-
it.concurrent('still compares everything else in data', () => {
408-
expect(
409-
hasWorkflowChanged(
410-
withData({ errorEnabled: false }),
411-
withData({ errorEnabled: false, parallelType: 'count' })
412-
)
413-
).toBe(false)
414-
expect(hasWorkflowChanged(withData({ batchSize: 1 }), withData({ batchSize: 2 }))).toBe(true)
415-
})
416-
})
417-
418391
describe('SubBlock Changes', () => {
419392
it.concurrent('should detect subBlock value changes (string)', () => {
420393
const state1 = createWorkflowState({

‎apps/sim/lib/workflows/comparison/normalize.ts‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,6 @@ export const EXCLUDED_BLOCK_DATA_FIELDS: readonly string[] = [
5151
// Parallel fields - duplicated in parallels state and/or subBlocks
5252
'parallelType', // Duplicated in parallels state
5353
'distribution', // Parallel distribution (derived during execution)
54-
55-
/*
56-
* Duplicated from the block's own `errorEnabled`. The flag briefly persisted
57-
* here before it had a column, and `0287` moves it — but a migration only
58-
* reaches the live tables. Every deployment version ever written is frozen
59-
* jsonb that keeps the old key forever, and the wire schema no longer declares
60-
* it, so Zod strips it from the live side while the snapshot side keeps it.
61-
* Compared, that reads as a change no deploy can resolve: the next snapshot is
62-
* taken from rows that still carry the key. The block field is compared on its
63-
* own, with `!!`, so the value itself is not lost here.
64-
*/
65-
'errorEnabled',
6654
] as const
6755

6856
/**

0 commit comments

Comments
 (0)