Skip to content

Fix for reset environment auto stop in to never when older value present

Bala Kumar requested to merge 368151-resolve-env-auto-stop-in-for-never into master

What does this MR do and why?

Fixes bug with resetting environment.auto_stop_in to never when older value is present.

Screenshots or screen recordings

auto_stop_reset

How to set up and validate locally

  • On a test project in local, use the below simple ci configuration file and trigger pipeline.
.gitlab-ci.yml
image: alpine:latest

stages:
  - prod

prod:
  stage: prod
  script:
    - echo "TTL is 2 days"
  environment:
    name: 'test-auto-stop'
    auto_stop_in: '2 days'
  • Above step will set the auto_stop_in to 2 days for the environment test-auto-stop.
  • Modify the CI to change auto_stop_in: 'never' and trigger new pipeline.
.gitlab-ci.yml
image: alpine:latest

stages:
  - prod

prod:
  stage: prod
  script:
    - echo "TTL is never"
  environment:
    name: 'test-auto-stop'
    auto_stop_in: 'never'
  • We should observe the auto_stop_in for the environment being reset in the UI as shown in video above.

MR acceptance checklist

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

Related to #368151 (closed)

Edited by Bala Kumar

Merge request reports

Loading