Skip to content

Add API endpoint for stale env deletion

Robert May requested to merge stale-environment-cleanup into master

What does this MR do?

Adds a new API endpoint specifically for deleting old stopped review apps.

Related #296625 (closed)

Related #19724 (closed)

Database Query

Explain: https://explain.depesz.com/s/Gv1e

Uncached timings on gitlab-org/gitlab with LIMIT 1000:

Time: 463.383 ms
  - planning: 0.286 ms
  - execution: 463.097 ms
    - I/O read: 442.188 ms
    - I/O write: N/A

Shared buffers:
  - hits: 521 (~4.10 MiB) from the buffer pool
  - reads: 1789 (~14.00 MiB) from the OS file cache, including disk I/O
  - dirtied: 152 (~1.20 MiB)
  - writes: 0

Cached timings on gitlab-org/gitlab with LIMIT 1000:

Time: 4.210 ms
  - planning: 0.232 ms
  - execution: 3.978 ms
    - I/O read: N/A
    - I/O write: N/A

Shared buffers:
  - hits: 2307 (~18.00 MiB) from the buffer pool
  - reads: 0 from the OS file cache, including disk I/O
  - dirtied: 0
  - writes: 0

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability 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 Robert May

Merge request reports