Skip to content

Optimize retrieving personal and resource access tokens for Credentials inventory index page and API endpoints

What does this MR do and why?

This MR optimizes

  • rendering Credentials / Personal access tokens and Credentials / Project and group access tokens tabs
  • GET /groups/:id/manage/personal_access_tokens and GET /groups/:id/manage/resource_access_tokens API endpoints requests

by replacing problematic queries with new queries that use new personal_access_tokens.group_id and personal_access_tokens.user_type columns. Those columns will be backfilled by

All optimizations are behind optimize_credentials_inventory FF - we will be able to enalbe it after all BBMs that backfill new columns are completed.

Also, note that this MR does not optimize sorting tokens by name on Credentials inventory index page, we plan to do it separately, see #558112 (comment 2724155627).

References

Database

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Bogdan Denkovych

Merge request reports

Loading