Skip to content

Add support for X-GitLab-Trace-Update-Interval header

What does this MR do?

Adds support for X-GitLab-Trace-Update-Interval header that may be sent with the response for PATCH /api/v4/job/:id/trace request.

This is the GitLab Runner part of the feature. GitLab part is being implemented at gitlab!20841 (merged).

Why was this MR needed?

As described at gitlab#33658 (closed), trace patch requests generate a huge amount of traffic between Runners and GitLab. For big installations like GitLab.com this may generate problems causing even service degradation or outages.

The solution for this was proposed at gitlab#33658 (comment 237442464). According to it we should update the existing value of network/clientJobTrace.updateInterval if the response contains X-GitLab-Trace-Update-Interval. The header will represent the number of seconds that should be set as updateInterval.

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

Part of gitlab#33658 (closed).

Closes #6103 (closed)

Edited by Steve Xuereb

Merge request reports