Repository navigation
fix(bank-template): export keeps entity_labels stored in the attributes envelope - #6106
Merged
Merged
Conversation
…utes": [...]} envelope (#6057) Banks configured through PATCH /config or the control plane store entity_labels as the {"attributes": [...]} envelope. The template model only unwrapped bare lists, so export dropped the whole label taxonomy with a server-side warning and an export->import clone lost it. migrate_entity_labels_input now unwraps the envelope (as parse_entity_labels does). New tests seed every config field through the config API — plus each alternate shape it accepts — and assert export keeps all of them; another sets every mental model, trigger and directive field and checks a clone exports the same thing.
…onfig API surviving export/import Review fixes: - add a hindsight-system-tests story (#6057 is a seam bug: config API -> export -> import) - move test imports to module top
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.
Fixes #6057.
Problem: a bank whose labels were set through
PATCH /configor the control plane stores them as{"attributes": [...]}. Export only accepted the bare list, so it droppedentity_labels(warning in server logs only). Importing that export gave a bank with no label taxonomy.Fix:
migrate_entity_labels_inputunwraps the envelope, same asparse_entity_labels. Applies to export, import and dry-run extract.Full audit of export/import (tests added so it can't regress):
_CONFIG_API_ALTERNATE_SHAPES: envelope, legacyfree_values/multi_value). The envelope case failed before the fix.