Skip to content

Auto create predefined tags, error for non-existing and add case-insensitive checks

Rajendra Kadam requested to merge 373853-incident-tag-api-follow-ups into master

What does this MR do and why?

This MR is in continuation from !100537 (merged)

It addresses the following changes:

  1. Raise error for non-existing timeline event tags if they are passed to be linked while creating the timeline event.
  2. Make tags comparison case-insensitive by adding case-insensitive checks.
  3. Auto-create predefined tags if they don't exist in any project and are used to link with a timeline event while creating the event.
  4. Update/add specs for all the above changes.

Query plan for by_names scope: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/13174/commands/46197

Screenshots or screen recordings

NA

How to set up and validate locally

  1. You can follow the initial steps from !100537 (merged) to start.
  2. Try passing the random casing for existing tag names and see it get linked to the timeline event.
  3. Try passing non-existing tags to link to the timeline event and see the error.

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 #373853 (closed)

Edited by Rajendra Kadam

Merge request reports