Serialization: Snippet folders and Collections collide on dump
because of missing namespace separation
#14910
Labels
Operation/Serialization
Enterprise contents migration
Priority:P2
Average run of the mill bug
Type:Bug
Product defects
Milestone
Describe the bug
If there's a Collection and a Snippet Folder with the same name, then only one of them is created, and the order (ID) in the database will determine which will be overridden, and that causes questions (or potentially snippets) not to be transferred.
To Reproduce (very important with the order of when items are created)
dump
- notice that the collection-yaml for "Marketing" isnamespace: snippets
and it has the question-yaml inside of it. There's no snippet-yaml, but that's Serialization: Snippets are not transferred correctly, leading to incorrect references and broken queries #14909.load
will give the following error, which is correct, but there was no errors/warnings duringdump
that different items was overwriting each other:`ERROR serialization.upsert :: Error inserting metabase.models.card.CardInstance@6b213571 "My Question in Marketing-collection": A Card can only go in Collections in the "default" namespace.
Expected behavior
Not sure if
serialization-dump/collections/root/collections
should have a sub-directory for each namespace, or if snippet folders should have it's own parent directory likeserialization-dump/collections/root/snippet-folders
, but they shouldn't overlap.Information about your Metabase Installation:
Only tested 1.37.9 because #14907 made it even more confusing.
Additional context
Should probably be fixed together with #14909, since snippets are not transferred at all, and this just leads to more confusion.
The text was updated successfully, but these errors were encountered: