Skip to content

Integrations model: use `type_new` column, mark `type` for removal

Alex Kalderimis requested to merge 333508-ajk-use-type-new into master

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
                } 
            } 
        } 
    } 
}
  1. On master, execute the query but remove serviceType
  2. The result for type should follow the pattern "type": "IntegrationNameService"
  3. Checkout this branch and execute the query
  4. The result for type should still follow the pattern "type": "IntegrationNameService"
  5. 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.

Related to #333508 (closed)

Edited by Andy Schoenen

Merge request reports