Skip to content

fix: Run delete-stale on every overwrite-delete-stale destination - #23548

Merged
kodiakhq[bot] merged 1 commit into
mainfrom
fix/delete-stale-every-destination
Oct 15, 2026
Merged

kodiakhq[bot] merged 1 commit into
mainfrom
fix/delete-stale-every-destination

Conversation

@disq

@disq disq commented Oct 15, 2026

Copy link
Copy Markdown
Member

Summary

UpdateTableNames no longer deletes entries from its input map, so every overwrite-delete-stale destination of a source runs delete-stale, not only the first.

@disq
disq requested a review from a team as a code owner October 15, 2026 10:51
@disq
disq requested a review from murarustefaan October 15, 2026 10:51
@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

UpdateTableNames now leaves its input map unchanged, so each overwrite-delete-stale destination receives the full set of tables.

  • Each delete-stale destination gets its own table names.

Reviews (1) · Last reviewed commit: "fix: Run delete-stale on every overwrite..." · Reviewed by Greptile

@erezrokah erezrokah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Traced the delete back to #18833. It looks like a leftover from an in-place version of UpdateTableNames, and nothing after the delete-stale loop reads tablesForDeleteStale, so removing it is safe.

Non-blocking, can be follow-ups:

  • With --no-migrate, LearnTableNameChange never runs (continue before it), so delete-stale and DeleteRecord still use the untransformed names when a destination has a change_table_names transformer.
  • UpdateTableNames could call UpdateTableName instead of repeating the lookup.

@disq disq added the automerge Automatically merge once required checks pass label Oct 15, 2026
@kodiakhq
kodiakhq Bot merged commit ab7923a into main Oct 15, 2026
11 checks passed
@kodiakhq
kodiakhq Bot deleted the fix/delete-stale-every-destination branch October 15, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants