Skip to content

Ensure ID is big enough for prometheus_metrics records

Rémy Coutable requested to merge 11054-fix-duplicate-entry-error into master

What does this MR do?

This is because https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9959/diffs#0e13c38c6cf3590a48f24587785e0c00d393fb96 adds a new default Prometheus metric, and the db/migrate/20180831164910_import_common_metrics.rb migration is run before ee/spec/migrations/allow_prometheus_alerts_per_environment_spec.rb so there's already 21 records in the prometheus_metrics table => 💥

Does this MR meet the acceptance criteria?

Closes #11054 (closed).

Conformity

Performance 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 Kamil Trzciński

Merge request reports