Skip to content

Recommend to fill gaps in enum values

Fabio Pitino requested to merge docs/suggest-filling-enum-gaps into master

What does this MR do?

After we merged some of the EE and FOSS enums we ended up with some of the values having gaps between the two groups:

      def self.failure_reasons
        {
          # ...
          data_integrity_failure: 12,
          forward_deployment_failure: 13,
          insufficient_bridge_permissions: 1_001,
          downstream_bridge_project_not_found: 1_002,
          # ...
        }
      end

This MR recommends to fill the gaps (e.g. adding 14) instead of always appending new values to the end of the list (e.g. adding 1_003).

@gitlab-org/maintainers/rails-backend what do you think of this guideline?

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Fabio Pitino

Merge request reports