Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 46,543
    • Issues 46,543
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,499
    • Merge requests 1,499
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #31268
Closed
Open
Issue created Aug 26, 2019 by Fabian Sperrle@FabianSperrle

Manually renaming environments breaks future deployments

Summary

Manually renaming a CI environment breaks all future deployments to that environment. Instead, each respective pipeline step shows the message This job is an out-of-date deployment to . Deleting the old, renamed environment did not fix the issue.

Steps to reproduce

  1. Create an environment from a CI pipeline step; I used $PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME as a name.
  2. Manually rename the environment. I just shortened the name by a few characters.
  3. Run any CI step that re-creates/updates the environment
  4. This job is an out-of-date deployment to .

Example Project

https://gitlab.com/FabianSperrle/deployment-renaming

  • Initial job: https://gitlab.com/FabianSperrle/deployment-renaming/-/jobs/280211792
  • then rename the environment.
  • Trigger pipeline again: https://gitlab.com/FabianSperrle/deployment-renaming/-/jobs/280213363

What is the current bug behavior?

The changed name of the original environment is correctly updated in the first pipeline. All other pipelines fail to update/re-populate any environment (with either the original or the changed name).

What is the expected correct behavior?

Renaming an environment does not impact future (re-)creations of environments with the original name.

Relevant logs and/or screenshots

See example project + job links above.

Output of checks

This bug happens on GitLab.com. It also happens on our self-hosted gitlab ce instance.

Workaround

Rename the environment back to how it was called

Solution

Disallow renaming environments.

Edited Sep 10, 2021 by Kevin Chu
Assignee
Assign to
Time tracking