Skip to content

Environment stop jobs missing from environment history

Summary

  1. On GitLab.com (and in GitLab 12.10.6-ee), one can create a job which creates an Environment.
  2. Another job can be created to "Stop" an Environment.
  3. Under Operations/Environments, I can click on an environment name (under the "Environments" column) to bring up a page of the history of jobs which referenced that Environment.
  4. Stop jobs are missing from the Environment history. This is a problem.

Steps to reproduce

I verified this with the most basic example, a .gitlab-ci.yml containing two jobs. Both jobs specify the same environment name, one includes action: stop, the other includes on_stop: <job_name>

Example Project

https://gitlab.com/AdamMAtWork/env_stop_jobs

What is the current bug behavior?

The Stop job runs, whether launched manually or automatically via auto_stop_in:, but the history for the environment is not updated with the execution of the stop job.

What is the expected correct behavior?

I expect all jobs which name an environment to appear in the history list for that environment. Because the stop jobs are missing from the history, I can't tell how long an environment was up for.

Relevant logs and/or screenshots

Output of checks

This bug happens on GitLab.com

Possible fixes

Unknown

Edited by AdamMAtWork