Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
af3904f9d0
commit
1403e9bc45
|
@ -125,7 +125,7 @@ export default {
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
class="gl-display-flex gl-align-items-center gl-line-height-20 gl-mb-2 gl-text-gray-900 gl-font-weight-bold"
|
class="gl-display-flex gl-align-items-center gl-line-height-20 gl-text-gray-900 gl-font-weight-bold"
|
||||||
@click.self="collapse"
|
@click.self="collapse"
|
||||||
>
|
>
|
||||||
<span class="hide-collapsed" data-testid="title" @click="collapse">
|
<span class="hide-collapsed" data-testid="title" @click="collapse">
|
||||||
|
|
|
@ -61,7 +61,7 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="block">
|
<div class="block time-tracking">
|
||||||
<issuable-time-tracker
|
<issuable-time-tracker
|
||||||
:full-path="fullPath"
|
:full-path="fullPath"
|
||||||
:issuable-id="issuableId"
|
:issuable-id="issuableId"
|
||||||
|
|
|
@ -649,14 +649,6 @@ $calendar-hover-bg: #ecf3fe;
|
||||||
$calendar-border-color: rgba(#000, 0.1);
|
$calendar-border-color: rgba(#000, 0.1);
|
||||||
$calendar-user-contrib-text: #959494;
|
$calendar-user-contrib-text: #959494;
|
||||||
|
|
||||||
/*
|
|
||||||
* Value Stream Analytics
|
|
||||||
*/
|
|
||||||
$cycle-analytics-box-padding: 30px;
|
|
||||||
$cycle-analytics-box-text-color: #8c8c8c;
|
|
||||||
$cycle-analytics-big-font: 19px;
|
|
||||||
$cycle-analytics-dismiss-icon-color: #b2b2b2;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CI
|
* CI
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@import 'mixins_and_variables_and_functions';
|
@import 'page_bundles/mixins_and_variables_and_functions';
|
||||||
|
|
||||||
$status-box-line-height: 26px;
|
$status-box-line-height: 26px;
|
||||||
|
|
||||||
|
|
|
@ -199,12 +199,15 @@
|
||||||
.sidebar-contained-width,
|
.sidebar-contained-width,
|
||||||
.issuable-sidebar-header {
|
.issuable-sidebar-header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-bottom: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.block {
|
.block {
|
||||||
@include media-breakpoint-up(lg) {
|
@include media-breakpoint-up(lg) {
|
||||||
padding: $gl-spacing-scale-5 0;
|
padding: $gl-spacing-scale-4 0 $gl-spacing-scale-5;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.participants {
|
||||||
|
border-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -213,7 +216,8 @@
|
||||||
.sidebar-contained-width,
|
.sidebar-contained-width,
|
||||||
.issuable-sidebar-header {
|
.issuable-sidebar-header {
|
||||||
@include clearfix;
|
@include clearfix;
|
||||||
padding: $gl-padding 0;
|
padding: $gl-spacing-scale-4 0 $gl-spacing-scale-5;
|
||||||
|
border-bottom: 1px solid $border-gray-normal;
|
||||||
// This prevents the mess when resizing the sidebar
|
// This prevents the mess when resizing the sidebar
|
||||||
// of elements repositioning themselves..
|
// of elements repositioning themselves..
|
||||||
width: $gutter-inner-width;
|
width: $gutter-inner-width;
|
||||||
|
@ -235,6 +239,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.time-tracking,
|
||||||
|
&.participants,
|
||||||
|
&.subscriptions,
|
||||||
|
&.with-sub-blocks {
|
||||||
|
padding-top: $gl-spacing-scale-5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.block-first {
|
.block-first {
|
||||||
|
|
|
@ -112,6 +112,7 @@ module Ci
|
||||||
end
|
end
|
||||||
|
|
||||||
scope :unstarted, -> { where(runner_id: nil) }
|
scope :unstarted, -> { where(runner_id: nil) }
|
||||||
|
|
||||||
scope :with_downloadable_artifacts, -> do
|
scope :with_downloadable_artifacts, -> do
|
||||||
where('EXISTS (?)',
|
where('EXISTS (?)',
|
||||||
Ci::JobArtifact.select(1)
|
Ci::JobArtifact.select(1)
|
||||||
|
@ -120,6 +121,14 @@ module Ci
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
scope :with_erasable_artifacts, -> do
|
||||||
|
where('EXISTS (?)',
|
||||||
|
Ci::JobArtifact.select(1)
|
||||||
|
.where('ci_builds.id = ci_job_artifacts.job_id')
|
||||||
|
.where(file_type: Ci::JobArtifact.erasable_file_types)
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
scope :in_pipelines, ->(pipelines) do
|
scope :in_pipelines, ->(pipelines) do
|
||||||
where(pipeline: pipelines)
|
where(pipeline: pipelines)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1182,6 +1182,10 @@ module Ci
|
||||||
complete? && builds.latest.with_exposed_artifacts.exists?
|
complete? && builds.latest.with_exposed_artifacts.exists?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def has_erasable_artifacts?
|
||||||
|
complete? && builds.latest.with_erasable_artifacts.exists?
|
||||||
|
end
|
||||||
|
|
||||||
def branch_updated?
|
def branch_updated?
|
||||||
strong_memoize(:branch_updated) do
|
strong_memoize(:branch_updated) do
|
||||||
push_details.branch_updated?
|
push_details.branch_updated?
|
||||||
|
|
|
@ -16,7 +16,8 @@
|
||||||
%ul.content-list
|
%ul.content-list
|
||||||
= render partial: "table"
|
= render partial: "table"
|
||||||
- else
|
- else
|
||||||
.card.bg-light.gl-mt-3
|
= render Pajamas::CardComponent.new(card_options: { class: 'bg-light gl-mt-3 gl-text-center' }) do |c|
|
||||||
.nothing-here-block= _("No schedules")
|
- c.body do
|
||||||
|
= _("No schedules")
|
||||||
|
|
||||||
#pipeline-take-ownership-modal
|
#pipeline-take-ownership-modal
|
||||||
|
|
|
@ -13,7 +13,9 @@ module Ci
|
||||||
|
|
||||||
def perform(pipeline_id)
|
def perform(pipeline_id)
|
||||||
::Ci::Pipeline.find_by_id(pipeline_id).try do |pipeline|
|
::Ci::Pipeline.find_by_id(pipeline_id).try do |pipeline|
|
||||||
break unless pipeline.has_archive_artifacts?
|
# TODO: Move this check inside the Ci::UnlockArtifactsService
|
||||||
|
# once the feature flags in it have been removed.
|
||||||
|
break unless pipeline.has_erasable_artifacts?
|
||||||
|
|
||||||
results = ::Ci::UnlockArtifactsService
|
results = ::Ci::UnlockArtifactsService
|
||||||
.new(pipeline.project, pipeline.user)
|
.new(pipeline.project, pipeline.user)
|
||||||
|
|
|
@ -199,7 +199,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitlab/eslint-plugin": "17.0.0",
|
"@gitlab/eslint-plugin": "17.0.0",
|
||||||
"@gitlab/stylelint-config": "4.1.0",
|
"@gitlab/stylelint-config": "4.1.0",
|
||||||
"@graphql-eslint/eslint-plugin": "3.11.1",
|
"@graphql-eslint/eslint-plugin": "3.11.2",
|
||||||
"@testing-library/dom": "^7.16.2",
|
"@testing-library/dom": "^7.16.2",
|
||||||
"@types/jest": "^27.5.1",
|
"@types/jest": "^27.5.1",
|
||||||
"@vue/test-utils": "1.3.0",
|
"@vue/test-utils": "1.3.0",
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module QA
|
module QA
|
||||||
# Disable on live envs until bulk_import_projects toggle is on by default
|
|
||||||
# Otherwise tests running in parallel can disable feature in the middle of other test
|
|
||||||
RSpec.shared_context 'with gitlab project migration', requires_admin: 'creates a user via API',
|
RSpec.shared_context 'with gitlab project migration', requires_admin: 'creates a user via API',
|
||||||
|
quarantine: {
|
||||||
|
type: :flaky,
|
||||||
|
issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/364839'
|
||||||
|
},
|
||||||
feature_flag: {
|
feature_flag: {
|
||||||
name: 'bulk_import_projects',
|
name: 'bulk_import_projects',
|
||||||
scope: :global
|
scope: :global
|
||||||
|
|
|
@ -311,7 +311,7 @@ describe('ReadyToMerge', () => {
|
||||||
"the MR hasn't merged yet, and the backend-provided value expects to leave the branch",
|
"the MR hasn't merged yet, and the backend-provided value expects to leave the branch",
|
||||||
"the MR hasn't merged yet, and the backend-provided value is a non-boolean falsey value",
|
"the MR hasn't merged yet, and the backend-provided value is a non-boolean falsey value",
|
||||||
"the MR hasn't merged yet, and the backend-provided value is a non-boolean truthy value",
|
"the MR hasn't merged yet, and the backend-provided value is a non-boolean truthy value",
|
||||||
'the MR has merged, and the backend reports that the branch has been removed',
|
'the MR has been merged, and the backend reports that the branch has been removed',
|
||||||
'the MR has been merged, and the backend reports that the branch has not been removed',
|
'the MR has been merged, and the backend reports that the branch has not been removed',
|
||||||
'the MR has been merged, and the backend reports a non-boolean falsey value',
|
'the MR has been merged, and the backend reports a non-boolean falsey value',
|
||||||
'the MR has been merged, and the backend reports a non-boolean truthy value',
|
'the MR has been merged, and the backend reports a non-boolean truthy value',
|
||||||
|
|
|
@ -160,6 +160,42 @@ RSpec.describe Ci::Build do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '.with_erasable_artifacts' do
|
||||||
|
subject { described_class.with_erasable_artifacts }
|
||||||
|
|
||||||
|
context 'when job does not have any artifacts' do
|
||||||
|
let!(:job) { create(:ci_build) }
|
||||||
|
|
||||||
|
it 'does not return the job' do
|
||||||
|
is_expected.not_to include(job)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
::Ci::JobArtifact.erasable_file_types.each do |type|
|
||||||
|
context "when job has a #{type} artifact" do
|
||||||
|
it 'returns the job' do
|
||||||
|
job = create(:ci_build)
|
||||||
|
create(
|
||||||
|
:ci_job_artifact,
|
||||||
|
file_format: ::Ci::JobArtifact::TYPE_AND_FORMAT_PAIRS[type.to_sym],
|
||||||
|
file_type: type,
|
||||||
|
job: job
|
||||||
|
)
|
||||||
|
|
||||||
|
is_expected.to include(job)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when job has a non-erasable artifact' do
|
||||||
|
let!(:job) { create(:ci_build, :trace_artifact) }
|
||||||
|
|
||||||
|
it 'does not return the job' do
|
||||||
|
is_expected.not_to include(job)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe '.with_live_trace' do
|
describe '.with_live_trace' do
|
||||||
subject { described_class.with_live_trace }
|
subject { described_class.with_live_trace }
|
||||||
|
|
||||||
|
|
|
@ -5546,4 +5546,43 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '#has_erasable_artifacts?' do
|
||||||
|
subject { pipeline.has_erasable_artifacts? }
|
||||||
|
|
||||||
|
context 'when pipeline is not complete' do
|
||||||
|
let(:pipeline) { create(:ci_pipeline, :running, :with_job) }
|
||||||
|
|
||||||
|
context 'and has erasable artifacts' do
|
||||||
|
before do
|
||||||
|
create(:ci_job_artifact, :archive, job: pipeline.builds.first)
|
||||||
|
end
|
||||||
|
|
||||||
|
it { is_expected.to be_falsey }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when pipeline is complete' do
|
||||||
|
let(:pipeline) { create(:ci_pipeline, :success, :with_job) }
|
||||||
|
|
||||||
|
context 'and has no artifacts' do
|
||||||
|
it { is_expected.to be_falsey }
|
||||||
|
end
|
||||||
|
|
||||||
|
Ci::JobArtifact.erasable_file_types.each do |type|
|
||||||
|
context "and has an artifact of type #{type}" do
|
||||||
|
before do
|
||||||
|
create(
|
||||||
|
:ci_job_artifact,
|
||||||
|
file_format: ::Ci::JobArtifact::TYPE_AND_FORMAT_PAIRS[type.to_sym],
|
||||||
|
file_type: type,
|
||||||
|
job: pipeline.builds.first
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
it { is_expected.to be_truthy }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,6 +20,8 @@ RSpec.shared_examples 'date sidebar widget' do
|
||||||
scroll_to(button)
|
scroll_to(button)
|
||||||
button.click
|
button.click
|
||||||
|
|
||||||
|
execute_script('document.querySelector(".issuable-sidebar")?.scrollBy(0, 50)')
|
||||||
|
|
||||||
click_button today.to_s
|
click_button today.to_s
|
||||||
|
|
||||||
wait_for_requests
|
wait_for_requests
|
||||||
|
|
|
@ -27,15 +27,18 @@ RSpec.describe Ci::PipelineSuccessUnlockArtifactsWorker do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when pipeline exists' do
|
context 'when pipeline exists' do
|
||||||
let(:pipeline) { create(:ci_pipeline, :success, :with_job) }
|
let!(:pipeline) { create(:ci_pipeline, :success, :with_job) }
|
||||||
let(:pipeline_id) { pipeline.id }
|
let(:pipeline_id) { pipeline.id }
|
||||||
|
|
||||||
context 'when pipeline has artifacts' do
|
before do
|
||||||
before do
|
allow(Ci::Pipeline).to receive(:find_by_id).with(pipeline.id).and_return(pipeline)
|
||||||
create(:ci_job_artifact, job: pipeline.builds.first)
|
allow(pipeline).to receive(:has_erasable_artifacts?).and_return(has_erasable_artifacts)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'calls the service' do
|
context 'when pipeline has erasable artifacts' do
|
||||||
|
let(:has_erasable_artifacts) { true }
|
||||||
|
|
||||||
|
it 'calls the unlock service' do
|
||||||
service = spy(Ci::UnlockArtifactsService)
|
service = spy(Ci::UnlockArtifactsService)
|
||||||
expect(Ci::UnlockArtifactsService).to receive(:new).and_return(service)
|
expect(Ci::UnlockArtifactsService).to receive(:new).and_return(service)
|
||||||
|
|
||||||
|
@ -45,8 +48,10 @@ RSpec.describe Ci::PipelineSuccessUnlockArtifactsWorker do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when pipeline does not have artifacts' do
|
context 'when pipeline has no erasable artifacts' do
|
||||||
it 'does not call service' do
|
let(:has_erasable_artifacts) { false }
|
||||||
|
|
||||||
|
it 'does not call the unlock service' do
|
||||||
expect(Ci::UnlockArtifactsService).not_to receive(:new)
|
expect(Ci::UnlockArtifactsService).not_to receive(:new)
|
||||||
|
|
||||||
perform
|
perform
|
||||||
|
|
|
@ -75,7 +75,6 @@
|
||||||
- '**/merge_requests/**'
|
- '**/merge_requests/**'
|
||||||
- '/config/feature_flags/**/*'
|
- '/config/feature_flags/**/*'
|
||||||
- '/ee/app/services/audit_events/**/*'
|
- '/ee/app/services/audit_events/**/*'
|
||||||
- '/ee/config/feature_flags/development/auditor_group_runner_access.yml'
|
|
||||||
- '/ee/spec/services/audit_events/**/*'
|
- '/ee/spec/services/audit_events/**/*'
|
||||||
- '/ee/spec/services/ci/*'
|
- '/ee/spec/services/ci/*'
|
||||||
- '/ee/spec/services/personal_access_tokens/*'
|
- '/ee/spec/services/personal_access_tokens/*'
|
||||||
|
|
|
@ -1090,10 +1090,10 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
mustache "^4.2.0"
|
mustache "^4.2.0"
|
||||||
|
|
||||||
"@graphql-eslint/eslint-plugin@3.11.1":
|
"@graphql-eslint/eslint-plugin@3.11.2":
|
||||||
version "3.11.1"
|
version "3.11.2"
|
||||||
resolved "https://registry.yarnpkg.com/@graphql-eslint/eslint-plugin/-/eslint-plugin-3.11.1.tgz#3ff3fce52d31d169fdbe33f70cb5234966d2bea1"
|
resolved "https://registry.yarnpkg.com/@graphql-eslint/eslint-plugin/-/eslint-plugin-3.11.2.tgz#d982a45291aadd483c79c2bcb209166115ef6123"
|
||||||
integrity sha512-y72HwLgCBMS5diGhtOM9EnDRY7rcyevbiHeLJPy0gjcVzAhj0xdH7dJV7aNLlVNSSqZ+3M8ZuKfwEX5ByFqx4w==
|
integrity sha512-gnR6L2S64mesNyF34n/c3qOTIwu6MtapRhPQLHqU1/Qdf/7Ga9KKtFJKKxRrK7YbzlteMYweC05khhZycxDtLw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/code-frame" "^7.16.7"
|
"@babel/code-frame" "^7.16.7"
|
||||||
"@graphql-tools/code-file-loader" "^7.2.14"
|
"@graphql-tools/code-file-loader" "^7.2.14"
|
||||||
|
|
Loading…
Reference in New Issue