Skip to content

Fix failure in ee/spec/elastic_integration/epic_index_spec.rb

Madelein van Niekerk requested to merge 417305-fix-flaky-spec into master

What does this MR do and why?

Fix spec in ee/spec/elastic_integration/epic_index_spec.rb:

Epic index when elasticsearch_limit_indexing? is true if the parent group is in the limited indexes list behaves like epics get tracked in Elasticsearch when the group is transferred tracks the epic via Elastic::NamespaceUpdateWorker

Context

The spec tests that when a group is transferred, its epics are updated in Elasticsearch so that traversal_ids can be accurate.

Problem

When index namespace limiting is enabled, we only track associations for namespaces that are indexing. This spec transferred to no group (new group is nil) which means we won't track since nil group is not being indexed.

Fix

Instead of transferring to nil, transfer to a group that is being indexed.

How to set up and validate locally

  1. Execute the spec: ee/spec/elastic_integration/epic_index_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #417305 (closed)

Merge request reports