Fix whole-block plan misclassification via bidirectional rule matching - #6589
Draft
denik wants to merge 1 commit into
Draft
Fix whole-block plan misclassification via bidirectional rule matching#6589denik wants to merge 1 commit into
denik wants to merge 1 commit into
Conversation
Keep structdiff emitting whole-block changes: when a nested struct is nil on one side it is one change at the block level, which is the right granularity for a whole add/remove. Fix the two bundle-plan consumers that need to relate a rule to such a change: - findMatchingRule is now bidirectional (matchesFieldRule): a rule on foo.bar matches a change at foo, so adding/removing a whole block that contains an immutable field recreates instead of updating. - prepareChanges keeps one level per subtree: when one diff descended to a leaf while the other stayed at the block, the block-level entry wins and inner-field entries are dropped. update_mask is left alone, so the postgres default_endpoint_settings message-mask case stays a documented bug. structdiff and configsync are unchanged, so there is no empty-parent regression. Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
Integration test reportCommit: 2170b36
Top 22 slowest tests (at least 2 minutes):
|
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.
Follow-up to #6566 (the reproducer tests, now merged).
Fixes the "whole block" plan issues without touching structdiff, so configsync and most goldens are unaffected.
structdiff keeps emitting one change at the block level when a nested struct is nil on one side — the right granularity for a whole add/remove. The fix is in the two bundle-plan consumers:
findMatchingRule→matchesFieldRule): a rule onfoo.barnow also matches a change recorded atfoo. So adding/removing a whole block that contains an immutable field (ingestion_definition.connection_name) is classifiedrecreateinstead ofupdate.prepareChanges): when one diff descended to a leaf while the other stayed at the block, the block-level entry wins and inner-field entries are dropped — the plan no longer carries both a block and its children.update_maskis intentionally left alone (minimal change), so the postgresdefault_endpoint_settingsmessage-mask case stays a documented bug rather than being fixed here.Test flips (reproducers from #6566):
pipelines/recreate-{add,remove}-whole-block→recreateon both engines.jobs/whole-block-overlap→changescollapses to the singlescheduleblock.postgres_projects/add_default_endpoint_settings→ unchanged (still documents the mask bug).Incidental golden updates (
apps/config-drift-stopped,job_runs/on_bundle_deploy,model_serving .../telemetry_config_unmanaged) are the overlap collapsing to one level; resource-level actions are unchanged.Note: broad golden regeneration was interrupted; CI (and a follow-up commit) will land any remaining goldens.
This pull request and its description were written by Isaac.