Internal releases - Dedicated: Adapt Switchboard to accept internal packages

Context

Part of Implement the changes necessary for dedicated to deploy internal packages . This issue focuses on the changes required for Switchboard

The adaption of Dedicated includes three parts for tenant-model-schema, Instrumentor and Switchboard.

flowchart RL
    A[Switchboard] -->|Define parameters and trigger| B[Instrumentor]
    B -->|Use schema| C[tenant-model-schema]

Proposal

Switchboard has some validations for GitLab packages:

TAGGED_RELEASE_REGEX = /\A[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{12}-[0-9a-f]{11}\.[0-9a-f]{11}\z/ # i.e 15.7.202211240820-5f3539354de.75a10ecec64
SIMPLE_RELEASE_REGEX = /\A[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}\z/ # i.e 15.6.4
PRE_RELEASE_REGEX = Regexp.union([TAGGED_RELEASE_REGEX, SIMPLE_RELEASE_REGEX])

https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/switchboard/-/blob/main/app/models/concerns/version_validations.rb?ref_type=heads

We need to adapt these to accept the new internal release notation, while maintaining backward compatibility.


Make sure models/serializers/UI are all aligned to account for the schema change.

Important points to consider

Exit Criteria

  • Switchboard can accept the new notation without raising issues.
  • Dedicated team reviews this change.
Edited by Dat Tang