Recover batched Excel writes onto main - #1118
Merged
Merged
Conversation
Handle repeated `excel.sheet.write` batches with changing or reordered columns by aligning rows on column names instead of position. This preserves accumulated Excel output for dynamic dictionary splits and keeps overwrite batches in the original column order, with tests covering both connector-level and recipe batch behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Why
Recipe batches can write repeatedly to the same Excel sheet. Without this chain, intermediate batches can be written independently, overwrite mode can discard earlier rows, and dynamic dictionary keys can shift values into the wrong columns when batches are combined positionally. These are silent data-loss or data-alignment risks.
Recovery provenance
This is a clean recovery of the five commits previously merged to legacy
devin #1112.origin/mainmainbefore recoverygit range-diffshows all five recovered commits are patch-equivalent to the preserved Preserve batched Excel writes across recipe batches #1112 chaindevbranch, synchronization commit, or merge commit was includedOriginal PR: #1112
Compatibility and risk
The intended behavior change is limited to repeated writes produced by recipe batching. Single writes retain their existing path. The main risk is batch accumulation or column-union behavior, covered directly by the focused tests.
Rollback is the normal revert of this five-commit PR; no data migration or configuration change is required.
Validation
TestBatchsso.wrangle.worksand failed only because that external service is unavailable from the local sandboxSettingWithCopyWarningwarnings remain; no new test failure was attributed to this recoverygit diff --checkpassedmainmain:tests/connectors/test_excel.pytests/connectors/test_recipe.pytests/recipes/wrangles/test_main.pywrangles/connectors/excel.pywrangles/recipe_wrangles/main.py