Backend: Improve GET Bridges API performance

Summary

From a discussion in https://gitlab.com/gitlab-org/error-budget-reports/-/issues/30#note_1689999593, this issue is to investigate and address one other request that seems slow: GET /api/:version/projects/:id/pipelines/:pipeline_id/bridges

Screenshot_2023-12-11_at_18.01.19

2024-05-06 Last 7 Days

Screenshot_2024-05-06_at_1.23.20_PM

Proposal

Review the performance and understand where bottlenecks are taking to improve the response time for this API endpoint.

Confirm purpose and User Reception (how does this benefit the user?)

Users would not encounter a delay when their pipeline is running that contains any bridge jobs.

Additional details

Some relevant technical details, if applicable, such as:

  • Does this need a feature flag?
  • Does there need to be an associated instrumentation issue created related to this work?
  • Is there an example response showing the data structure that should be returned (new endpoints only)?
  • What permissions should be used?
  • Is this EE or CE?
    • EE
    • CE
  • Additional comments:

Links/References

Edited by Mark Nuzzo