Skip to content

FIX: Ensure copy_data callbacks run even when all rows are skipped #33002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

s3lase
Copy link
Contributor

@s3lase s3lase commented May 30, 2025

Currently, if a batch "copy" of an import step results in all rows being skipped, the after_commit_of_skipped_rows callback is never triggered. This happens because the callback is nested inside a block that only runs when at least one row is inserted.

This change ensures the DB copy operation returns both inserted and skipped rows, allowing the caller to respond appropriately in either case.

Currently, if a "copy" batch of an import step results in all rows being skipped,
the `after_commit_of_skipped_rows` callback is never triggered.
This happens because the callback is nested inside a block that only runs
when at least one row is inserted.

This change ensures the DB copy operation returns both inserted and skipped rows,
allowing the caller to respond appropriately in either case.
@s3lase s3lase requested a review from a team as a code owner May 30, 2025 01:33
@github-actions github-actions bot added the migrations-tooling PR which includes changes to migrations tooling label May 30, 2025
@s3lase s3lase requested a review from gschlager May 30, 2025 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migrations-tooling PR which includes changes to migrations tooling
Development

Successfully merging this pull request may close these issues.

1 participant