BigW Consortium Gitlab
Add a slug to environments ## What does this MR do? Adds a `slug` field to the `environments` table, populating existing rows and ensuring that new rows will get an entry. Cleaning examples: * `review/foo` => `review-foo-5gghdf` * `review-foo` => `review-foo` * `1-foo` => `env-1-foo-e2hx12` * `production` => `production` * `Production` => `production-f8ddlz` ## Are there points in the code the reviewer needs to double check? This migration requires downtime. I don't see a way to avoid it. ## Why was this MR needed? External services often have more restrictive rules on naming than those enforced for `environments.name`. In particular, forward slashes and names longer than 24 characters causes problems on OpenShift. `slug` is designed to be an acceptable alternative to `name` in these situations. Since forward slashes are a documented part of environment names, to set environment types, we need an envionmnent slug, not just a slug for the branch name. ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [X] API support added - Tests - [X] Added for this feature/bug - [x] All builds are passing - [X] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [X] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [X] Branch has no merge conflicts with `master` (if it does - rebase it please) - [X] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Part of #22864 See merge request !7983
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
ci | Loading commit data... | |
templates | Loading commit data... | |
README.md | Loading commit data... | |
access_requests.md | Loading commit data... | |
award_emoji.md | Loading commit data... | |
boards.md | Loading commit data... | |
branches.md | Loading commit data... | |
broadcast_messages.md | Loading commit data... | |
build_triggers.md | Loading commit data... | |
build_variables.md | Loading commit data... | |
builds.md | Loading commit data... | |
commits.md | Loading commit data... | |
deploy_key_multiple_projects.md | Loading commit data... | |
deploy_keys.md | Loading commit data... | |
deployments.md | Loading commit data... | |
enviroments.md | Loading commit data... | |
groups.md | Loading commit data... | |
issues.md | Loading commit data... | |
keys.md | Loading commit data... | |
labels.md | Loading commit data... | |
members.md | Loading commit data... | |
merge_requests.md | Loading commit data... | |
milestones.md | Loading commit data... | |
namespaces.md | Loading commit data... | |
notes.md | Loading commit data... | |
notification_settings.md | Loading commit data... | |
oauth2.md | Loading commit data... | |
pipelines.md | Loading commit data... | |
project_snippets.md | Loading commit data... | |
projects.md | Loading commit data... | |
repositories.md | Loading commit data... | |
repository_files.md | Loading commit data... | |
runners.md | Loading commit data... | |
services.md | Loading commit data... | |
session.md | Loading commit data... | |
settings.md | Loading commit data... | |
sidekiq_metrics.md | Loading commit data... | |
snippets.md | Loading commit data... | |
system_hooks.md | Loading commit data... | |
tags.md | Loading commit data... | |
todos.md | Loading commit data... | |
users.md | Loading commit data... | |
version.md | Loading commit data... |