Skip to content

Add release-manager's name to auto_deploy:promote release note when executed via chatops

What does this MR do and why?

This MR fixes an issue where the monthly release task deployment update comments don't display the actual human release manager's name when using the ChatOps command /chatops run auto_deploy promote.

Here is an example of the note with no human executor mentioned: gitlab-org/release/tasks#21684 (comment 2865270185)

Problem

When a release manager uses ChatOps to promote a package, the status notes in monthly release issues fail to show who performed the promotion (the executor). This happens because:

  1. The ChatOps command triggers the promote job via the release-tools-ops bot user
  2. The bot user doesn't have a matching username on gitlab.com
  3. The status note logic can't resolve the bot username to a human identity
  4. No release manager name appears in the deployment comments

Solution

This MR preserves the human release manager's identity by:

  1. Passing the human identity through the job execution chain - When ChatOps triggers the promote job, it now passes the RELEASE_USER as a RELEASE_MANAGER variable to the job
  2. Enhanced job triggering - Updated the GitLab API client to support passing variables when playing manual jobs - And pass RELEASE_MANAGER value to Gitlab API when triggering the job.
  3. Smart status note logic - When the status note detects that the ops bot triggered the job, it uses the RELEASE_MANAGER environment variable instead of trying to resolve the bot username

Intended result: Monthly release issue comments will now correctly display the actual human promoter (e.g., @test-user) instead of showing nothing or failing to resolve the bot identity.

Related Issues

This MR resolves this issue: gitlab-com/gl-infra/delivery#21635

Merge request reports

Loading