Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
058e5f4b
Commit
058e5f4b
authored
Mar 03, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
54e03a55
271ef1f5
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
143 additions
and
32 deletions
+143
-32
app/assets/javascripts/boards/components/issue_due_date.vue
app/assets/javascripts/boards/components/issue_due_date.vue
+5
-1
app/assets/javascripts/boards/components/issue_time_estimate.vue
...ets/javascripts/boards/components/issue_time_estimate.vue
+1
-1
app/assets/javascripts/pages/projects/forks/new/components/fork_form.vue
...scripts/pages/projects/forks/new/components/fork_form.vue
+5
-5
app/assets/stylesheets/utilities.scss
app/assets/stylesheets/utilities.scss
+1
-0
changelogs/unreleased/292128-fix-icon-spacing.yml
changelogs/unreleased/292128-fix-icon-spacing.yml
+5
-0
ee/app/assets/javascripts/boards/components/issue_card_weight.vue
...ssets/javascripts/boards/components/issue_card_weight.vue
+1
-1
ee/app/assets/javascripts/oncall_schedules/components/rotations/components/rotation_assignee.vue
...les/components/rotations/components/rotation_assignee.vue
+2
-2
ee/spec/frontend/oncall_schedule/rotations/components/rotation_assignee_spec.js
...l_schedule/rotations/components/rotation_assignee_spec.js
+3
-3
ee/spec/frontend/oncall_schedule/schedule/components/__snapshots__/rotations_list_section_spec.js.snap
...ponents/__snapshots__/rotations_list_section_spec.js.snap
+2
-2
lib/gitlab/ci/reports/codequality_reports_comparer.rb
lib/gitlab/ci/reports/codequality_reports_comparer.rb
+7
-1
lib/gitlab/ci/reports/reports_comparer.rb
lib/gitlab/ci/reports/reports_comparer.rb
+7
-3
spec/factories/ci/build_trace_chunks.rb
spec/factories/ci/build_trace_chunks.rb
+1
-1
spec/lib/gitlab/ci/reports/codequality_reports_comparer_spec.rb
...ib/gitlab/ci/reports/codequality_reports_comparer_spec.rb
+56
-0
spec/lib/gitlab/ci/reports/reports_comparer_spec.rb
spec/lib/gitlab/ci/reports/reports_comparer_spec.rb
+18
-8
spec/lib/gitlab/import_export/import_export_spec.rb
spec/lib/gitlab/import_export/import_export_spec.rb
+2
-2
spec/services/projects/destroy_service_spec.rb
spec/services/projects/destroy_service_spec.rb
+27
-2
No files found.
app/assets/javascripts/boards/components/issue_due_date.vue
View file @
058e5f4b
...
...
@@ -86,7 +86,11 @@ export default {
<
template
>
<span>
<span
ref=
"issueDueDate"
:class=
"cssClass"
class=
"board-card-info card-number"
>
<gl-icon
:class=
"
{ 'text-danger': isPastDue }" class="board-card-info-icon" name="calendar" />
<gl-icon
:class=
"
{ 'text-danger': isPastDue }"
class="board-card-info-icon gl-mr-2"
name="calendar"
/>
<time
:class=
"
{ 'text-danger': isPastDue }" datetime="date" class="board-card-info-text">
{{
body
}}
</time>
...
...
app/assets/javascripts/boards/components/issue_time_estimate.vue
View file @
058e5f4b
...
...
@@ -37,7 +37,7 @@ export default {
<
template
>
<span>
<span
ref=
"issueTimeEstimate"
class=
"board-card-info card-number"
>
<gl-icon
name=
"hourglass"
class=
"board-card-info-icon"
/>
<gl-icon
name=
"hourglass"
class=
"board-card-info-icon
gl-mr-2
"
/>
<time
class=
"board-card-info-text"
>
{{
timeEstimate
}}
</time>
</span>
<gl-tooltip
...
...
app/assets/javascripts/pages/projects/forks/new/components/fork_form.vue
View file @
058e5f4b
...
...
@@ -200,9 +200,9 @@ export default {
<gl-form-input
id=
"fork-name"
v-model=
"fork.name"
data-testid=
"fork-name-input"
required
/>
</gl-form-group>
<div
class=
"gl-display-flex"
>
<div
class=
"gl-
w
-half"
>
<gl-form-group
label=
"Project URL"
label-for=
"fork-url"
class=
"gl-
pr-2
"
>
<div
class=
"gl-
md-
display-flex"
>
<div
class=
"gl-
flex-basis
-half"
>
<gl-form-group
label=
"Project URL"
label-for=
"fork-url"
class=
"gl-
md-mr-3
"
>
<gl-form-input-group>
<template
#prepend
>
<gl-input-group-text>
...
...
@@ -225,8 +225,8 @@ export default {
</gl-form-input-group>
</gl-form-group>
</div>
<div
class=
"gl-
w
-half"
>
<gl-form-group
label=
"Project slug"
label-for=
"fork-slug"
class=
"gl-
pl-2
"
>
<div
class=
"gl-
flex-basis
-half"
>
<gl-form-group
label=
"Project slug"
label-for=
"fork-slug"
class=
"gl-
md-ml-3
"
>
<gl-form-input
id=
"fork-slug"
v-model=
"fork.slug"
...
...
app/assets/stylesheets/utilities.scss
View file @
058e5f4b
...
...
@@ -117,6 +117,7 @@
flex-basis
:
25%
;
}
// Will be moved to @gitlab/ui in https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1168
.gl-md-ml-3
{
@media
(
min-width
:
$breakpoint-md
)
{
margin-left
:
$gl-spacing-scale-3
;
...
...
changelogs/unreleased/292128-fix-icon-spacing.yml
0 → 100644
View file @
058e5f4b
---
title
:
Add space next to icons in epic issue list
merge_request
:
54138
author
:
Yogi (@yo)
type
:
fixed
ee/app/assets/javascripts/boards/components/issue_card_weight.vue
View file @
058e5f4b
...
...
@@ -28,7 +28,7 @@ export default {
class=
"board-card-info card-number board-card-weight"
v-on=
"$listeners"
>
<gl-icon
name=
"weight"
class=
"board-card-info-icon"
/>
<gl-icon
name=
"weight"
class=
"board-card-info-icon
gl-mr-2
"
/>
<span
class=
"board-card-info-text"
>
{{
weight
}}
</span>
<gl-tooltip
:target=
"() => $refs.itemWeight"
...
...
ee/app/assets/javascripts/oncall_schedules/components/rotations/components/rotation_assignee.vue
View file @
058e5f4b
<
script
>
import
{
GlAvatar
,
GlPopover
}
from
'
@gitlab/ui
'
;
import
{
uniqueId
}
from
'
lodash
'
;
import
{
formatDate
}
from
'
~/lib/utils/datetime_utility
'
;
import
{
truncate
}
from
'
~/lib/utils/text_utility
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
...
...
@@ -57,8 +58,7 @@ export default {
});
},
rotationAssigneeUniqueID
()
{
const
{
_uid
}
=
this
;
return
`
${
this
.
assignee
.
user
.
id
}
-
${
_uid
}
`
;
return
uniqueId
(
'
rotation-assignee-
'
);
},
rotationMobileView
()
{
return
this
.
shiftWidth
<=
SHIFT_WIDTHS
.
xs
;
...
...
ee/spec/frontend/oncall_schedule/rotations/components/rotation_assignee_spec.js
View file @
058e5f4b
...
...
@@ -8,6 +8,8 @@ import { formatDate } from '~/lib/utils/datetime_utility';
import
{
truncate
}
from
'
~/lib/utils/text_utility
'
;
import
mockRotations
from
'
../../mocks/mock_rotation.json
'
;
jest
.
mock
(
'
lodash/uniqueId
'
,
()
=>
(
prefix
)
=>
`
${
prefix
}
fakeUniqueId`
);
describe
(
'
RotationAssignee
'
,
()
=>
{
let
wrapper
;
...
...
@@ -71,9 +73,7 @@ describe('RotationAssignee', () => {
});
it
(
'
should render an assignee schedule and rotation information in a popover
'
,
()
=>
{
// eslint-disable-next-line no-underscore-dangle
const
UID
=
wrapper
.
vm
.
_uid
;
expect
(
findPopOver
().
attributes
(
'
target
'
)).
toBe
(
`
${
assignee
.
participant
.
user
.
id
}
-
${
UID
}
`
);
expect
(
findPopOver
().
attributes
(
'
target
'
)).
toBe
(
'
rotation-assignee-fakeUniqueId
'
);
expect
(
findStartsAt
().
text
()).
toContain
(
formattedDate
(
assignee
.
startsAt
));
expect
(
findEndsAt
().
text
()).
toContain
(
formattedDate
(
assignee
.
endsAt
));
});
...
...
ee/spec/frontend/oncall_schedule/schedule/components/__snapshots__/rotations_list_section_spec.js.snap
View file @
058e5f4b
...
...
@@ -83,7 +83,7 @@ exports[`RotationsListSectionComponent when the timeframe includes today renders
<div
class="gl-h-6 gl-bg-data-viz-blue-500 gl-display-flex gl-justify-content-center gl-align-items-center"
data-testid="rotation-assignee"
id="
1-1
2"
id="
rotation-assignee-
2"
>
<div
class="gl-text-white gl-display-flex gl-justify-content-center gl-align-items-center"
...
...
@@ -123,7 +123,7 @@ exports[`RotationsListSectionComponent when the timeframe includes today renders
<div
class="gl-h-6 gl-bg-data-viz-orange-500 gl-display-flex gl-justify-content-center gl-align-items-center"
data-testid="rotation-assignee"
id="
2-16
"
id="
rotation-assignee-3
"
>
<div
class="gl-text-white gl-display-flex gl-justify-content-center gl-align-items-center"
...
...
lib/gitlab/ci/reports/codequality_reports_comparer.rb
View file @
058e5f4b
...
...
@@ -5,7 +5,7 @@ module Gitlab
module
Reports
class
CodequalityReportsComparer
<
ReportsComparer
def
initialize
(
base_report
,
head_report
)
@base_report
=
base_report
||
CodequalityReports
.
new
@base_report
=
base_report
@head_report
=
head_report
end
...
...
@@ -15,12 +15,16 @@ module Gitlab
def
existing_errors
strong_memoize
(
:existing_errors
)
do
next
[]
if
not_found?
base_report
.
all_degradations
&
head_report
.
all_degradations
end
end
def
new_errors
strong_memoize
(
:new_errors
)
do
next
[]
if
not_found?
fingerprints
=
head_report
.
degradations
.
keys
-
base_report
.
degradations
.
keys
head_report
.
degradations
.
fetch_values
(
*
fingerprints
)
end
...
...
@@ -28,6 +32,8 @@ module Gitlab
def
resolved_errors
strong_memoize
(
:resolved_errors
)
do
next
[]
if
not_found?
fingerprints
=
base_report
.
degradations
.
keys
-
head_report
.
degradations
.
keys
base_report
.
degradations
.
fetch_values
(
*
fingerprints
)
end
...
...
lib/gitlab/ci/reports/reports_comparer.rb
View file @
058e5f4b
...
...
@@ -18,10 +18,10 @@ module Gitlab
end
def
status
if
success?
STATUS_SUCCESS
elsif
base_report
.
nil?
||
head_report
.
nil?
if
base_report
.
nil?
||
head_report
.
nil?
STATUS_NOT_FOUND
elsif
success?
STATUS_SUCCESS
else
STATUS_FAILED
end
...
...
@@ -54,6 +54,10 @@ module Gitlab
def
total_count
existing_errors
.
size
+
new_errors
.
size
end
def
not_found?
status
==
STATUS_NOT_FOUND
end
end
end
end
...
...
spec/factories/ci/build_trace_chunks.rb
View file @
058e5f4b
...
...
@@ -3,7 +3,7 @@
FactoryBot
.
define
do
factory
:ci_build_trace_chunk
,
class:
'Ci::BuildTraceChunk'
do
build
factory: :ci_build
chunk_index
{
0
}
chunk_index
{
generate
(
:iid
)
}
data_store
{
:redis
}
trait
:redis_with_data
do
...
...
spec/lib/gitlab/ci/reports/codequality_reports_comparer_spec.rb
View file @
058e5f4b
...
...
@@ -27,6 +27,22 @@ RSpec.describe Gitlab::Ci::Reports::CodequalityReportsComparer do
expect
(
report_status
).
to
eq
(
described_class
::
STATUS_SUCCESS
)
end
end
context
'when head report does not exist'
do
let
(
:head_report
)
{
nil
}
it
'returns status not found'
do
expect
(
report_status
).
to
eq
(
described_class
::
STATUS_NOT_FOUND
)
end
end
context
'when base report does not exist'
do
let
(
:base_report
)
{
nil
}
it
'returns status success'
do
expect
(
report_status
).
to
eq
(
described_class
::
STATUS_NOT_FOUND
)
end
end
end
describe
'#errors_count'
do
...
...
@@ -93,6 +109,14 @@ RSpec.describe Gitlab::Ci::Reports::CodequalityReportsComparer do
expect
(
resolved_count
).
to
be_zero
end
end
context
'when base report is nil'
do
let
(
:base_report
)
{
nil
}
it
'returns zero'
do
expect
(
resolved_count
).
to
be_zero
end
end
end
describe
'#total_count'
do
...
...
@@ -140,6 +164,14 @@ RSpec.describe Gitlab::Ci::Reports::CodequalityReportsComparer do
expect
(
total_count
).
to
eq
(
2
)
end
end
context
'when base report is nil'
do
let
(
:base_report
)
{
nil
}
it
'returns zero'
do
expect
(
total_count
).
to
be_zero
end
end
end
describe
'#existing_errors'
do
...
...
@@ -177,6 +209,14 @@ RSpec.describe Gitlab::Ci::Reports::CodequalityReportsComparer do
expect
(
existing_errors
).
to
be_empty
end
end
context
'when base report is nil'
do
let
(
:base_report
)
{
nil
}
it
'returns an empty array'
do
expect
(
existing_errors
).
to
be_empty
end
end
end
describe
'#new_errors'
do
...
...
@@ -213,6 +253,14 @@ RSpec.describe Gitlab::Ci::Reports::CodequalityReportsComparer do
expect
(
new_errors
).
to
eq
([
degradation_1
])
end
end
context
'when base report is nil'
do
let
(
:base_report
)
{
nil
}
it
'returns an empty array'
do
expect
(
new_errors
).
to
be_empty
end
end
end
describe
'#resolved_errors'
do
...
...
@@ -250,5 +298,13 @@ RSpec.describe Gitlab::Ci::Reports::CodequalityReportsComparer do
expect
(
resolved_errors
).
to
be_empty
end
end
context
'when base report is nil'
do
let
(
:base_report
)
{
nil
}
it
'returns an empty array'
do
expect
(
resolved_errors
).
to
be_empty
end
end
end
end
spec/lib/gitlab/ci/reports/reports_comparer_spec.rb
View file @
058e5f4b
...
...
@@ -49,10 +49,6 @@ RSpec.describe Gitlab::Ci::Reports::ReportsComparer do
context
'when base_report is nil'
do
let
(
:base_report
)
{
nil
}
before
do
allow
(
comparer
).
to
receive
(
:success?
).
and_return
(
false
)
end
it
'returns status not_found'
do
expect
(
status
).
to
eq
(
'not_found'
)
end
...
...
@@ -61,10 +57,6 @@ RSpec.describe Gitlab::Ci::Reports::ReportsComparer do
context
'when head_report is nil'
do
let
(
:head_report
)
{
nil
}
before
do
allow
(
comparer
).
to
receive
(
:success?
).
and_return
(
false
)
end
it
'returns status not_found'
do
expect
(
status
).
to
eq
(
'not_found'
)
end
...
...
@@ -118,4 +110,22 @@ RSpec.describe Gitlab::Ci::Reports::ReportsComparer do
expect
{
total_count
}.
to
raise_error
(
NotImplementedError
)
end
end
describe
'#not_found?'
do
subject
(
:not_found
)
{
comparer
.
not_found?
}
context
'when base report is nil'
do
let
(
:base_report
)
{
nil
}
it
{
is_expected
.
to
be_truthy
}
end
context
'when base report exists'
do
before
do
allow
(
comparer
).
to
receive
(
:success?
).
and_return
(
true
)
end
it
{
is_expected
.
to
be_falsey
}
end
end
end
spec/lib/gitlab/import_export/import_export_spec.rb
View file @
058e5f4b
...
...
@@ -4,8 +4,8 @@ require 'spec_helper'
RSpec
.
describe
Gitlab
::
ImportExport
do
describe
'export filename'
do
let
(
:group
)
{
create
(
:group
,
:nested
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
path:
'project-path'
,
namespace:
group
)
}
let
(
:group
)
{
build
(
:group
,
path:
'child'
,
parent:
build
(
:group
,
path:
'parent'
)
)
}
let
(
:project
)
{
build
(
:project
,
:public
,
path:
'project-path'
,
namespace:
group
)
}
it
'contains the project path'
do
expect
(
described_class
.
export_filename
(
exportable:
project
)).
to
include
(
project
.
path
)
...
...
spec/services/projects/destroy_service_spec.rb
View file @
058e5f4b
...
...
@@ -31,9 +31,34 @@ RSpec.describe Projects::DestroyService, :aggregate_failures do
end
shared_examples
'deleting the project with pipeline and build'
do
context
'with pipeline and build'
,
:sidekiq_inline
do
# which has optimistic locking
context
'with pipeline and build
related records
'
,
:sidekiq_inline
do
# which has optimistic locking
let!
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let!
(
:build
)
{
create
(
:ci_build
,
:artifacts
,
pipeline:
pipeline
)
}
let!
(
:build
)
{
create
(
:ci_build
,
:artifacts
,
:with_runner_session
,
pipeline:
pipeline
)
}
let!
(
:trace_chunks
)
{
create
(
:ci_build_trace_chunk
,
build:
build
)
}
let!
(
:job_variables
)
{
create
(
:ci_job_variable
,
job:
build
)
}
let!
(
:report_result
)
{
create
(
:ci_build_report_result
,
build:
build
)
}
let!
(
:pending_state
)
{
create
(
:ci_build_pending_state
,
build:
build
)
}
it
'deletes build related records'
do
expect
{
destroy_project
(
project
,
user
,
{})
}.
to
change
{
Ci
::
Build
.
count
}.
by
(
-
1
)
.
and
change
{
Ci
::
BuildTraceChunk
.
count
}.
by
(
-
1
)
.
and
change
{
Ci
::
JobArtifact
.
count
}.
by
(
-
2
)
.
and
change
{
Ci
::
JobVariable
.
count
}.
by
(
-
1
)
.
and
change
{
Ci
::
BuildPendingState
.
count
}.
by
(
-
1
)
.
and
change
{
Ci
::
BuildReportResult
.
count
}.
by
(
-
1
)
.
and
change
{
Ci
::
BuildRunnerSession
.
count
}.
by
(
-
1
)
end
it
'avoids N+1 queries'
,
skip:
'skipped until fixed in https://gitlab.com/gitlab-org/gitlab/-/issues/24644'
do
recorder
=
ActiveRecord
::
QueryRecorder
.
new
{
destroy_project
(
project
,
user
,
{})
}
project
=
create
(
:project
,
:repository
,
namespace:
user
.
namespace
)
pipeline
=
create
(
:ci_pipeline
,
project:
project
)
builds
=
create_list
(
:ci_build
,
3
,
:artifacts
,
pipeline:
pipeline
)
create_list
(
:ci_build_trace_chunk
,
3
,
build:
builds
[
0
])
expect
{
destroy_project
(
project
,
project
.
owner
,
{})
}.
not_to
exceed_query_limit
(
recorder
)
end
it_behaves_like
'deleting the project'
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment