Use standard CloudConnector header fields in Workflow client
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem
A discussion surfaced that we should not hand-craft Cloud Connector header fields like this. We have abstractions in place to inject these: https://docs.gitlab.com/ee/development/cloud_connector/#access-token
The problem with this approach here is that we might accidentally miss injecting important headers. For example, we now require the X-Gitlab-Duo-Seat-Count
header to be present for purposes of rate limiting.
Desired Outcome
We should use Gitlab::CloudConnector.ai_headers
instead.
Edited by 🤖 GitLab Bot 🤖