Skip to content

Allow models used as a GlobalID to be renamed [RUN ALL RSPEC] [RUN AS-IF-FOSS]

What does this MR do?

When a model is renamed and its GlobalID type is used as an argument, we need to continue to support the old model name in the GlobalID type for a period of time.

This change allows renamed models to build GlobalIDs that support the old-format GlobalID.

A deprecated GlobalID:

  • Will still #find the record.
  • Is fully supported as an argument (the old GlobalID name can be used in the argument signature, i.e., OldModelID, and also the old GlobalID format, i.e. gid://gitlab/OldModel/1).
  • Is mentioned in the docs as deprecated, with the new-format GlobalID taking its place.

An example MR that uses this is !62645 (merged) where the old PrometheusService model used to build a GlobalID used in arguments has been renamed Integrations::Prometheus.

TODO:

Some documentation around when a deprecated GlobalID is needed.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Mayra Cabrera

Merge request reports