Direct migration of prioritised labels broken
Summary
Group labels are not prioritised in the migrated project. All labels are migrated, but group labels not as prioritised labels.
What's happening
I've run in to a bug with group labels that have been prioritised (at the project level). I received a fair amount of errors in the log but more pertinently it appears to rather randomly dropped or moved labels around.
{
"relation": "labels",
"step": "loader",
"exception_message": "Validation failed: Priorities is invalid",
"exception_class": "ActiveRecord::RecordInvalid",
"correlation_id_value": "01GV0P405VM73AMTF2T97BF784",
"created_at": "2023-03-08T13:21:31.337Z",
"pipeline_class": "BulkImports::Common::Pipelines::LabelsPipeline",
"pipeline_step": "loader"
},
The source instance is on the right with all priority:xx, bug:xx and incident:xx labels defined on the elderbyte top level group and prioritised in a subgroup project. The target migrated instance on the left shows how the prioritisation is gone, the labels have randomly moved to being at project level not group level and the bug:xx and incident:xx labels are missing (yes, entirely, it's not the search filter).