Skip to content

Refactor SubmitService to decouple payload generation from the class

What does this MR do and why?

Related to #361332 (closed).

This refactors ServicePing::SubmitService to remove Service Ping payload generation logic from it and let it have one responsibility - sending the payload and handling the response from version-gitlab-com.

Since !85503 (merged), payload generation is instead handled in GitlabServicePingWorker, where it's then passed as an argument to SubmitService.

Relevant specs, docs and rake tasks are updated accordingly. Some specs had to be removed in their entirety, since they tested generating the payload rather than sending it.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Piotr Skorupa

Merge request reports