Building on the success of 338587 for improvements to the error budget, we will be investigating how to improve upon the performance and optimize the /api/projects/:id/pipelines/:pipeline_id/variables API endpoint.
The only optimization we can do is to add pagination to this endpoint.
We have pagination for /api/projects/:id/variables but not for/api/projects/:id/pipelines/:pipeline_id/variables. And I am not sure if that helps this. Furthermore, it will introduce a breaking change for existing API users.
Thanks @furkanayhan for the details you've provided here. It appears that the timings have improved from when this issue was created several weeks ago. Since the query itself looks as optimized as possible and the latency looks better by roughly 50ms, I would be curious about @matteeyah and @lauraX's thoughts as I don't think adding pagination here would beneficial especially if we aren't sure it'll help.
It'll definitely help with reducing the response time, but I guess we have to think about whether or not the current response time is causing a human perceivable slowdown (service degradation). I don't think it is. Especially because the only improvement we can make is a breaking change.
Maybe this is something we don't have to work on right now? Maybe we can postpone it for the next major release when we can re-consider if we want to introduce this breaking change or not.
Yeah, I'm comfortable with us revisiting this in the next major release (if it's even an issue) given the current metrics suggests that the response times are in line with what I feel is acceptable. I agree that introducing a breaking change to potentially improve response times doesn't feel like a big value add at this point. Thanks @matteeyah and @furkanayhan
Hi @dhershkovitch - since this issue's goal was to investigate this matter, which @furkanayhan did above, how about we close this issue and then I create a separate issue and link to this issue for any future analysis or investigation? That way, everyone knows the outcome of the initial investigation in this iteration. WDYT?