Remove job token on completion
What does this MR do and why?
Related to #349877
It removes the job token after job completion because the token is not used after a job finishes and it's getting too expensive to maintain. In one year, the size of the index for this column has doubled in size:
# Now
List of relations
Schema | Name | Type | Owner | Table | Size | Description
--------+------------------------------------+-------+---------+-----------+--------+-------------
public | index_ci_builds_on_token_encrypted | index | joe_309 | ci_builds | 250 GB |
(1 row)
# 1 year ago:
gitlabhq_production=> \di+ index_ci_builds_on_token_encrypted
List of relations
Schema | Name | Type | Owner | Table | Size | Description
--------+------------------------------------+-------+--------+-----------+--------+-------------
public | index_ci_builds_on_token_encrypted | index | gitlab | ci_builds | 128 GB |
(1 row)
https://console.postgres.ai/gitlab/gitlab-production-ci/sessions/14196/commands/49793
And for partitioning the ci_builds
table we need to add the partition_id
column in the index's definition, but it proves too difficult to do due to the amount of data that we need to index.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.