Skip to content

Commit 6f9edd1

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 94e614c commit 6f9edd1

34 files changed

+679
-615
lines changed

.github/ISSUE_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
We’re closing our issue tracker on GitHub so we can focus on the GitLab.com project and respond to issues more quickly.
22

3-
We encourage you to open an issue on the [GitLab.com issue tracker](https://gitlab.com/gitlab-org/gitlab-ce/issues). You can log into GitLab.com using your GitHub account.
3+
We encourage you to open an issue on the [GitLab.com issue tracker](https://gitlab.com/gitlab-org/gitlab/issues). You can log into GitLab.com using your GitHub account.

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Thank you for taking the time to contribute back to GitLab!
22

3-
Please open a merge request [on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests), we look forward to reviewing your contribution! You can log into GitLab.com using your GitHub account.
3+
Please open a merge request [on GitLab.com](https://gitlab.com/gitlab-org/gitlab/merge_requests), we look forward to reviewing your contribution! You can log into GitLab.com using your GitHub account.

.gitlab/ci/qa.gitlab-ci.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,6 @@ package-and-qa-manual:
2424
when: manual
2525
needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]
2626

27-
package-and-qa-manual:master:
28-
extends:
29-
- .package-and-qa-base
30-
- .only-code-qa-changes
31-
only:
32-
refs:
33-
- master@gitlab-org/gitlab-foss
34-
- master@gitlab-org/gitlab
35-
when: manual
36-
needs: ["build-qa-image", "gitlab:assets:compile"]
37-
3827
package-and-qa:
3928
extends:
4029
- .package-and-qa-base
@@ -44,3 +33,14 @@ package-and-qa:
4433
- master
4534
needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]
4635
allow_failure: true
36+
37+
schedule:package-and-qa:
38+
extends:
39+
- .package-and-qa-base
40+
- .only-code-qa-changes
41+
only:
42+
refs:
43+
- schedules@gitlab-org/gitlab
44+
- schedules@gitlab-org/gitlab-foss
45+
needs: ["build-qa-image", "gitlab:assets:compile"]
46+
allow_failure: true

.gitlab/issue_templates/Bug.md

+3-10
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,10 @@
22
Please read this!
33
44
Before opening a new issue, make sure to search for keywords in the issues
5-
filtered by the "regression" or "bug" label.
5+
filtered by the "regression" or "bug" label:
66
7-
For the Community Edition issue tracker:
8-
9-
- https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name%5B%5D=regression
10-
- https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name%5B%5D=bug
11-
12-
For the Enterprise Edition issue tracker:
13-
14-
- https://gitlab.com/gitlab-org/gitlab-ee/issues?label_name%5B%5D=regression
15-
- https://gitlab.com/gitlab-org/gitlab-ee/issues?label_name%5B%5D=bug
7+
- https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression
8+
- https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=bug
169
1710
and verify the issue you're about to submit isn't a duplicate.
1811
--->

.gitlab/issue_templates/Feature Flag Roll Out.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Remove the `:feature_name` feature flag ...
2424

2525
If applicable, any groups/projects that are happy to have this feature turned on early. Some organizations may wish to test big changes they are interested in with a small subset of users ahead of time for example.
2626

27-
- `gitlab-org/gitlab-ce`/`gitlab-org/gitlab-ee` projects
27+
- `gitlab-org/gitlab` project
2828
- `gitlab-org`/`gitlab-com` groups
2929
- ...
3030

.gitlab/issue_templates/Problem_Validation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626

2727
## Confidence
2828

29-
<!-- How do we know this is a problem? Please provide and link to any supporting information (e.g. data, customer verbatims) and use this basis to provide a numerical assessment on our confidence level in this problem's severity:
29+
<!-- How do we know this is a problem? Please provide and link to any supporting information (e.g. data, customer verbatims) and use this basis to provide a numerical assessment on our confidence level in this problem's severity:
3030
3131
100% = High confidence
3232
80% = Medium confidence
3333
50% = Low confidence -->
3434

3535
## Effort
3636

37-
<!-- How much effort do we think it will be to solve this problem? Please include all counterparts (Product, UX, Engineering, etc) in your assessment and quantify the number of person-months needed to dedicate to the effort.
37+
<!-- How much effort do we think it will be to solve this problem? Please include all counterparts (Product, UX, Engineering, etc) in your assessment and quantify the number of person-months needed to dedicate to the effort.
3838
3939
For example, if the solution will take a product manager, designer, and engineer two weeks of effort - you may quantify this as 1.5 (based on 0.5 months x 3 people). -->
4040

.gitlab/issue_templates/Security Release.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@ Set the title to: `Security Release: 12.2.X, 12.1.X, and 12.0.X`
1818

1919
## Security Issues:
2020

21-
### CE
22-
23-
* {https://gitlab.com/gitlab-org/gitlab-ce/issues link}
24-
25-
### EE
26-
27-
* {https://gitlab.com/gitlab-org/gitlab-ee/issues link}
21+
* {https://gitlab.com/gitlab-org/gitlab/issues link}
2822

2923
## Security Issues in dev.gitlab.org:
3024

.gitlab/issue_templates/Test plan.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<!-- This issue outlines testing activities related to a particular issue or epic.
44
5-
[Here is an example test plan](https://gitlab.com/gitlab-org/gitlab-ce/issues/50353)
5+
[Here is an example test plan](https://gitlab.com/gitlab-org/gitlab-foss/issues/50353)
66
77
This and other comments should be removed as you write the plan -->
88

@@ -63,7 +63,7 @@ intersection of Components and Attributes.
6363
Some features might be simple enough that they only involve one Component, while
6464
more complex features could involve multiple or even all.
6565
66-
Example (from https://gitlab.com/gitlab-org/gitlab-ce/issues/50353):
66+
Example (from https://gitlab.com/gitlab-org/gitlab-foss/issues/50353):
6767
* Repository is
6868
* Intuitive
6969
* It's easy to select the desired file template

app/assets/javascripts/registry/components/app.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default {
4747
dockerConnectionErrorText() {
4848
return sprintf(
4949
s__(`ContainerRegistry|We are having trouble connecting to Docker, which could be due to an
50-
issue with your project name or path.
50+
issue with your project name or path.
5151
%{docLinkStart}More Information%{docLinkEnd}`),
5252
{
5353
docLinkStart: `<a href="${this.helpPagePath}#docker-connection-error" target="_blank">`,
@@ -58,8 +58,8 @@ export default {
5858
},
5959
introText() {
6060
return sprintf(
61-
s__(`ContainerRegistry|With the Docker Container Registry integrated into GitLab, every
62-
project can have its own space to store its Docker images.
61+
s__(`ContainerRegistry|With the Docker Container Registry integrated into GitLab, every
62+
project can have its own space to store its Docker images.
6363
%{docLinkStart}More Information%{docLinkEnd}`),
6464
{
6565
docLinkStart: `<a href="${this.helpPagePath}" target="_blank">`,
@@ -109,7 +109,7 @@ export default {
109109
:svg-path="containersErrorImage"
110110
>
111111
<template #description>
112-
<p v-html="dockerConnectionErrorText"></p>
112+
<p class="js-character-error-text" v-html="dockerConnectionErrorText"></p>
113113
</template>
114114
</gl-empty-state>
115115

app/assets/javascripts/registry/components/collapsible_container.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default {
4949
}
5050
},
5151
handleDeleteRepository() {
52-
this.deleteItem(this.repo)
52+
return this.deleteItem(this.repo)
5353
.then(() => {
5454
createFlash(__('This container registry has been scheduled for deletion.'), 'notice');
5555
this.fetchRepos();
@@ -67,7 +67,8 @@ export default {
6767
<div class="container-image">
6868
<div class="container-image-head">
6969
<gl-button class="js-toggle-repo btn-link align-baseline" @click="toggleRepo">
70-
<icon :name="iconName" /> {{ repo.name }}
70+
<icon :name="iconName" />
71+
{{ repo.name }}
7172
</gl-button>
7273

7374
<clipboard-button

app/assets/javascripts/registry/components/table_registry.vue

+10-8
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,9 @@ export default {
198198
:title="s__('ContainerRegistry|Remove selected images')"
199199
:aria-label="s__('ContainerRegistry|Remove selected images')"
200200
@click="deleteMultipleItems()"
201-
><icon name="remove"
202-
/></gl-button>
201+
>
202+
<icon name="remove" />
203+
</gl-button>
203204
</th>
204205
</tr>
205206
</thead>
@@ -223,9 +224,9 @@ export default {
223224
/>
224225
</td>
225226
<td>
226-
<span v-gl-tooltip.bottom class="monospace" :title="item.revision">
227-
{{ item.shortRevision }}
228-
</span>
227+
<span v-gl-tooltip.bottom class="monospace" :title="item.revision">{{
228+
item.shortRevision
229+
}}</span>
229230
</td>
230231
<td>
231232
{{ formatSize(item.size) }}
@@ -236,9 +237,9 @@ export default {
236237
</td>
237238

238239
<td>
239-
<span v-gl-tooltip.bottom :title="tooltipTitle(item.createdAt)">
240-
{{ timeFormated(item.createdAt) }}
241-
</span>
240+
<span v-gl-tooltip.bottom :title="tooltipTitle(item.createdAt)">{{
241+
timeFormated(item.createdAt)
242+
}}</span>
242243
</td>
243244

244245
<td class="content action-buttons">
@@ -262,6 +263,7 @@ export default {
262263
v-if="shouldRenderPagination"
263264
:change="onPageChange"
264265
:page-info="repo.pagination"
266+
class="js-registry-pagination"
265267
/>
266268

267269
<gl-modal ref="deleteModal" :modal-id="modalId" ok-variant="danger">

app/finders/clusters/kubernetes_namespace_finder.rb

+8-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
module Clusters
44
class KubernetesNamespaceFinder
5-
attr_reader :cluster, :project, :environment_slug
5+
attr_reader :cluster, :project, :environment_name
66

7-
def initialize(cluster, project:, environment_slug:, allow_blank_token: false)
7+
def initialize(cluster, project:, environment_name:, allow_blank_token: false)
88
@cluster = cluster
99
@project = project
10-
@environment_slug = environment_slug
10+
@environment_name = environment_name
1111
@allow_blank_token = allow_blank_token
1212
end
1313

@@ -20,7 +20,11 @@ def execute
2020
attr_reader :allow_blank_token
2121

2222
def find_namespace(with_environment:)
23-
relation = with_environment ? namespaces.with_environment_slug(environment_slug) : namespaces
23+
relation = if with_environment
24+
namespaces.with_environment_name(environment_name)
25+
else
26+
namespaces
27+
end
2428

2529
relation.find_by_project_id(project.id)
2630
end

app/models/clusters/cluster.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def kubernetes_namespace_for(environment)
172172
persisted_namespace = Clusters::KubernetesNamespaceFinder.new(
173173
self,
174174
project: project,
175-
environment_slug: environment.slug
175+
environment_name: environment.name
176176
).execute
177177

178178
persisted_namespace&.namespace || Gitlab::Kubernetes::DefaultNamespace.new(self, project: project).from_environment_slug(environment.slug)

app/models/clusters/kubernetes_namespace.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class KubernetesNamespace < ApplicationRecord
2727
algorithm: 'aes-256-cbc'
2828

2929
scope :has_service_account_token, -> { where.not(encrypted_service_account_token: nil) }
30-
scope :with_environment_slug, -> (slug) { joins(:environment).where(environments: { slug: slug }) }
30+
scope :with_environment_name, -> (name) { joins(:environment).where(environments: { name: name }) }
3131

3232
def token_name
3333
"#{namespace}-token"

app/models/clusters/platforms/kubernetes.rb

+1-9
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,11 @@ def kubeclient
105105

106106
private
107107

108-
##
109-
# Environment slug can be predicted given an environment
110-
# name, so even if the environment isn't persisted yet we
111-
# still know what to look for.
112-
def environment_slug(name)
113-
Gitlab::Slug::Environment.new(name).generate
114-
end
115-
116108
def find_persisted_namespace(project, environment_name:)
117109
Clusters::KubernetesNamespaceFinder.new(
118110
cluster,
119111
project: project,
120-
environment_slug: environment_slug(environment_name)
112+
environment_name: environment_name
121113
).execute
122114
end
123115

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Fix bug that caused a merge to show an error message
3+
merge_request: 17466
4+
author:
5+
type: fixed

doc/development/pipelines.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ graph RL;
134134
M[coverage];
135135
N[pages];
136136
O[static-analysis];
137-
P["package-and-qa-manual:master<br/>(master schedule only)"];
137+
P["schedule:package-and-qa<br/>(master schedule only)"];
138138
Q[package-and-qa];
139139
R[package-and-qa-manual];
140140

lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def kubernetes_namespace
3636
Clusters::KubernetesNamespaceFinder.new(
3737
deployment_cluster,
3838
project: environment.project,
39-
environment_slug: environment.slug,
39+
environment_name: environment.name,
4040
allow_blank_token: true
4141
).execute
4242
end

spec/finders/clusters/kubernetes_namespace_finder_spec.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
described_class.new(
88
cluster,
99
project: project,
10-
environment_slug: 'production',
10+
environment_name: 'production',
1111
allow_blank_token: allow_blank_token
1212
)
1313
end
@@ -22,8 +22,8 @@ def create_namespace(environment, with_token: true)
2222
end
2323

2424
describe '#execute' do
25-
let(:production) { create(:environment, project: project, slug: 'production') }
26-
let(:staging) { create(:environment, project: project, slug: 'staging') }
25+
let(:production) { create(:environment, project: project, name: 'production') }
26+
let(:staging) { create(:environment, project: project, name: 'staging') }
2727

2828
let(:cluster) { create(:cluster, :group, :provided_by_user) }
2929
let(:project) { create(:project) }

0 commit comments

Comments
 (0)