Migrate requirements to issues table
Overview
This issue is a result of our Spike - Linking Requirements to Test Cases effort.
Purpose
We need to migrate requirements into the issue table. In addition, we need to ensure we update references in the requirements_management_test_reports.
- this might be tricky if we want to avoid outage/limited availability of requirements during migration
- Requirement attributes is a subset of Issue attributes.
state
will be changed toclosed
instead ofarchived
though - this conversion will probably break links to existing requirements (e.g. if a requirement URL was
https://gitlab.com/gitlab-org/gitlab/-/requirements_management/requirements/112
, it would becomehttps://gitlab.com/gitlab-org/gitlab/-/issues/987
) - this is related to how much separated we want to have both.
UPDATE: to avoid breaking changes, we could create an issue for each requirement and make sure that both are synced (so when issue is changed, also requirement is changed and vice versa). Then in a next step (#323781 (closed)) we can deprecate requirement model but still keep it as a proxy to the issue.
So in the end requirements API should remain as is (for the deprecation period - #329432) acting just as a "proxy" for accessing underlying issues throuhg requirements API.
Completion
✅ Stage I: relationships
-
requirement_issue_id
toTestReport
: !63512 (merged) -
test_reports
relationship onActsLikeRequirement
: !63965 (merged) -
issue_id
onRequirement
: !64189 (merged)
🛠 Stage IIa: prohibit unsupported features for Requirement Issues #337189 (closed)
- prohibit moving/cloning of Requirement issues !70439 (merged)
- prohibit other unsupported Issue actions on Requirement Issues (Needs to check if additional actions should be blocked)
🛠 Stage IIb: logic to sync Requirements with RequirementIssues #337190 (closed)
- Sync deletion !64291 (merged)
- Sync updates
- title/description !64929 (merged)
- state - closed/archived and open !70607 (merged)
- Sync creation !71104 (merged)
⌛ Stage III: background migration to migrate unsynced Requirements to RequirementIssues #342496 (closed)
- Merge once Sync Creation is merged
- Migrate all Requirements without issues to a new (synced) Issue of type Requirement !71778 (merged)
- Migrate all requirements test reports to belong to new associated issue #345533 (closed)
⌛ Stage IV: Requirement object becomes a proxy (#323781 (closed))
- behind Feature Flag (merge with FF off before Sync Creation merged and data migration merged).
- Switch FF on when data migration finished.
⌛ Stage V: dropping of Requirements table, cleanup #329432
Edited by Felipe Cardozo