Integrations model: use `type_new` column, mark `type` for removal
What does this MR do and why?
See: #333508 (closed)
Uses the newly migrated data in Integrations.type_new
.
This MR aims to make no user-visible changes. Nevertheless, a large number of things need to be changed to ensure this, mainly in the way we set-up tests.
Many factories, and uses of factories are changed so that we are speaking in terms of the data in type_new
, not in type
, which looks different.
Since the ServiceType
GraphQL type cannot change here, and the return values cannot change, the logic for
producing these strings is updated.
To make transitioning away from these free-form strings easier, a new field is added to ServiceType
with a type of
ServiceTypeEnum
, since that means we can statically detect changes in this field.
How to set up and validate locally
Use this GraphQL query:
{
projects {
nodes {
services {
nodes {
type
serviceType
}
}
}
}
}
- On
master
, execute the query but removeserviceType
- The result for
type
should follow the pattern"type": "IntegrationNameService"
- Checkout this branch and execute the query
- The result for
type
should still follow the pattern"type": "IntegrationNameService"
- The result for
serviceType
should follow the pattern"serviceType": "INTEGRATION_NAME_SERVICE"
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #333508 (closed)