Skip to content

Fix :unknown executor_type

What does this MR do and why?

Describe in detail what your merge request does and why.

The authenticate_job! method which is called from the /jobs API endpoints only passes the :ip_address param to Ci::Runner#heartbeat. The heartbeat method has a bug where if :executor is not passed, it is assumed to be :unknown. This MR fixes the bug by only changing :executor_type attribute to change if the :executor parameter is passed.

Closes #387393 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

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

This bug was detected during a debugging session, so I don't have steps to reproduce. I did add a spec to ensure that the behavior is the expected one.

MR acceptance checklist

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

Merge request reports