Fix transient error in merge_request_spec
What does this MR do and why?
A transient error in the merge_request_spec.rb
was happening
20) MergeRequest state machine transitions #mark_as_unmergeable when the status is cannot_be_merged_rechecking behaves like transition triggering mergeRequestMergeStatusUpdated GraphQL subscription when transaction is not committed behaves like transition not triggering mergeRequestMergeStatusUpdated GraphQL subscription is expected not to receive merge_request_merge_status_updated(*(any args)) 0 times
Failure/Error: raise CrossDatabaseModificationAcrossUnsupportedTablesError, messages.join("\n\n")
Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification::CrossDatabaseModificationAcrossUnsupportedTablesError:
Cross-database data modification of 'gitlab_main_cell, gitlab_ci' were detected within a transaction modifying the 'namespaces, project_ci_cd_settings, container_expiration_policies, project_pages_metadata, project_features, project_statistics, members, notification_settings, ci_project_mirrors' tables.
Stan surmised
but it seems like for some reason the
subject
might not be created until inside the transaction?
This MR implements that fix, which seems to fix the problem.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Brett Walker