Set sharding keys for feature category integrations tables

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

About

Note from @georgekoltsov on slack 2025-10-23:

[this issue] is not really an actionable issue for us to work on. It's an overarching issue that was tracking ALL the integrations tables, before we've split it into multiple issues. We reopened this issue because it was referenced as sharding_key_issue_url for some of the tables in the codebase. I was going to close it once all of the tables are completed, or we can update sharding_key_issue_url for the remaining tables that reference this issue and close it off now


As part of Cells preparation, all tables need to have a "sharding key" defined.

This issue was created from !152745 (merged) where we set the sharding_key_issue_url for some feature category integrations tables to point to this issue, as a temporary step to allow us to schedule the work into a milestone.

If we have questions or concerns, we can reach out to #g_tenant-scale.

The below description was copied from !152745 (merged).

Task

Sharding keys need to be set for the tables:

  • chat_names
  • integrations
  • issue_tracker_data
  • jira_connect_installations
  • jira_tracker_data
  • slack_api_scopes
  • slack_integrations
  • slack_integrations_scopes
  • web_hook_logs_daily
  • web_hooks
  • zentao_tracker_data

This involves choosing one of the following, based on the intended behaviour of the table:

  • The table is not cell-local
    • Set gitlab_schema to gitlab_main_clusterwide.
  • The table is cell-local and requires a sharding key
    • Set gitlab_schema to gitlab_main_cell
    • Add a sharding_key or desired_sharding_key configuration. If the configuration is known but the chosen key doesn't yet meet not-null and foreign key requirements, you can add an exception to allowed_to_be_missing_not_null or allowed_to_be_missing_foreign_key to get the pipeline passing. Please link to a follow-up issue in a code comment next to the exception.
    • You may also need to set allow_cross_joins, allow_cross_transactions and allow_cross_foreign_keys if changing the schema causes pipeline failures. See db/docs/epics.yml for an example.
  • The table is cell-local and does not require a sharding key
    • Set gitlab_schema to gitlab_main_cell_local and
    • No foreign key references to/from organization tables

Documentation

Edited by 🤖 GitLab Bot 🤖