Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
35ee286f94
commit
9d485c177e
13 changed files with 49 additions and 49 deletions
|
@ -109,7 +109,7 @@ To do so, follow these steps:
|
|||
If the merge request was deployed before [the code cutoff](https://about.gitlab.com/handbook/engineering/releases/#self-managed-releases-1),
|
||||
the feature can be officially announced in a release blog post.
|
||||
- [ ] `/chatops run auto_deploy status <merge-commit>`
|
||||
- [ ] Close [the feature issue](ISSUE LINK) to indicate the feature has been released.
|
||||
- [ ] Close [the feature issue](ISSUE LINK) to indicate the feature will be released in the current milestone.
|
||||
|
||||
**WARNING:** This approach has the downside that it makes it difficult for us to
|
||||
[clean up](https://docs.gitlab.com/ee/development/feature_flags/controls.html#cleaning-up) the flag.
|
||||
|
@ -134,7 +134,7 @@ codebase.
|
|||
If the merge request was deployed before [the code cutoff](https://about.gitlab.com/handbook/engineering/releases/#self-managed-releases-1),
|
||||
the feature can be officially announced in a release blog post.
|
||||
- [ ] `/chatops run auto_deploy status <merge-commit>`
|
||||
- [ ] Close [the feature issue](ISSUE LINK) to indicate the feature has been released.
|
||||
- [ ] Close [the feature issue](ISSUE LINK) to indicate the feature will be released in the current milestone.
|
||||
- [ ] Clean up the feature flag from all environments by running these chatops command in `#production` channel:
|
||||
- [ ] `/chatops run feature delete <feature-flag-name> --dev`
|
||||
- [ ] `/chatops run feature delete <feature-flag-name> --staging`
|
||||
|
|
|
@ -146,6 +146,7 @@ export default {
|
|||
<span v-if="dueDate" class="order-md-1">
|
||||
<issue-due-date
|
||||
:date="dueDate"
|
||||
:closed="Boolean(closedAt)"
|
||||
tooltip-placement="top"
|
||||
css-class="item-due-date gl-display-flex gl-align-items-center"
|
||||
/>
|
||||
|
|
|
@ -223,7 +223,7 @@ class Projects::PipelinesController < Projects::ApplicationController
|
|||
PipelineSerializer
|
||||
.new(project: @project, current_user: @current_user)
|
||||
.with_pagination(request, response)
|
||||
.represent(@pipelines, disable_coverage: true, preload: true, disable_artifacts: true)
|
||||
.represent(@pipelines, disable_coverage: true, preload: true)
|
||||
end
|
||||
|
||||
def render_show
|
||||
|
|
|
@ -8,15 +8,6 @@ class PipelineDetailsEntity < Ci::PipelineEntity
|
|||
end
|
||||
|
||||
expose :details do
|
||||
expose :artifacts, unless: proc { options[:disable_artifacts] } do |pipeline, options|
|
||||
rel = pipeline.downloadable_artifacts
|
||||
|
||||
if Feature.enabled?(:non_public_artifacts, type: :development)
|
||||
rel = rel.select { |artifact| can?(request.current_user, :read_job_artifacts, artifact.job) }
|
||||
end
|
||||
|
||||
BuildArtifactEntity.represent(rel, options.merge(project: pipeline.project))
|
||||
end
|
||||
expose :manual_actions, using: BuildActionEntity
|
||||
expose :scheduled_actions, using: BuildActionEntity
|
||||
end
|
||||
|
|
|
@ -49,10 +49,6 @@ class PipelineSerializer < BaseSerializer
|
|||
{
|
||||
manual_actions: :metadata,
|
||||
scheduled_actions: :metadata,
|
||||
downloadable_artifacts: {
|
||||
project: [:route, { namespace: :route }],
|
||||
job: []
|
||||
},
|
||||
failed_builds: %i(project metadata),
|
||||
merge_request: {
|
||||
source_project: [:route, { namespace: :route }],
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
title: Don't show due dates in red if the issue is closed
|
||||
merge_request: 57647
|
||||
author: Daniel Ziegenberg <daniel@ziegenberg.at>
|
||||
type: fixed
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Stop exposing artifacts in pipelines.json
|
||||
merge_request: 61253
|
||||
author:
|
||||
type: performance
|
|
@ -343,10 +343,10 @@ As in other list types, click the trash icon to remove a list.
|
|||
### Iteration lists **(PREMIUM)**
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/250479) in GitLab 13.11.
|
||||
> - [Deployed behind the `board_new_lists` and `iteration_board_lists` feature flags](../feature_flags.md), enabled by default.
|
||||
> - [Deployed behind the `board_new_list` and `iteration_board_lists` feature flags](../feature_flags.md), enabled by default.
|
||||
> - Enabled on GitLab.com.
|
||||
> - Recommended for production use.
|
||||
> - For GitLab self-managed instances, GitLab administrators can opt to disable the feature flags: [`board_new_lists`](#enable-or-disable-new-add-list-form) and [`iteration_board_lists`](#enable-or-disable-iteration-lists-in-boards). **(PREMIUM SELF)**
|
||||
> - For GitLab self-managed instances, GitLab administrators can opt to disable the feature flags: [`board_new_list`](#enable-or-disable-new-add-list-form) and [`iteration_board_lists`](#enable-or-disable-iteration-lists-in-boards). **(PREMIUM SELF)**
|
||||
|
||||
There can be
|
||||
[risks when disabling released features](../feature_flags.md#risks-when-disabling-released-features).
|
||||
|
|
|
@ -132,6 +132,35 @@ describe('RelatedIssuableItem', () => {
|
|||
it('renders due date component with correct due date', () => {
|
||||
expect(wrapper.find(IssueDueDate).props('date')).toBe(props.dueDate);
|
||||
});
|
||||
|
||||
it('does not render red icon for overdue issue that is closed', async () => {
|
||||
mountComponent({
|
||||
props: {
|
||||
...props,
|
||||
closedAt: '2018-12-01T00:00:00.00Z',
|
||||
},
|
||||
});
|
||||
await wrapper.vm.$nextTick();
|
||||
|
||||
expect(wrapper.find(IssueDueDate).props('closed')).toBe(true);
|
||||
});
|
||||
|
||||
it('should not contain the `.text-danger` css class for overdue issue that is closed', async () => {
|
||||
mountComponent({
|
||||
props: {
|
||||
...props,
|
||||
closedAt: '2018-12-01T00:00:00.00Z',
|
||||
},
|
||||
});
|
||||
await wrapper.vm.$nextTick();
|
||||
|
||||
expect(wrapper.find(IssueDueDate).find('.board-card-info-icon').classes('text-danger')).toBe(
|
||||
false,
|
||||
);
|
||||
expect(wrapper.find(IssueDueDate).find('.board-card-info-text').classes('text-danger')).toBe(
|
||||
false,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('token assignees', () => {
|
||||
|
|
|
@ -42,6 +42,4 @@ RSpec.describe MergeRequests::PipelineEntity do
|
|||
expect(entity.as_json).not_to include(:coverage)
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like 'public artifacts'
|
||||
end
|
||||
|
|
|
@ -32,7 +32,7 @@ RSpec.describe PipelineDetailsEntity do
|
|||
expect(subject[:details])
|
||||
.to include :duration, :finished_at
|
||||
expect(subject[:details])
|
||||
.to include :stages, :artifacts, :manual_actions, :scheduled_actions
|
||||
.to include :stages, :manual_actions, :scheduled_actions
|
||||
expect(subject[:details][:status]).to include :icon, :favicon, :text, :label
|
||||
end
|
||||
|
||||
|
@ -184,7 +184,5 @@ RSpec.describe PipelineDetailsEntity do
|
|||
expect(source_jobs[child_pipeline.id][:name]).to eq('child')
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like 'public artifacts'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -155,7 +155,7 @@ RSpec.describe PipelineSerializer do
|
|||
|
||||
it 'verifies number of queries', :request_store do
|
||||
recorded = ActiveRecord::QueryRecorder.new { subject }
|
||||
expected_queries = Gitlab.ee? ? 39 : 36
|
||||
expected_queries = Gitlab.ee? ? 33 : 30
|
||||
|
||||
expect(recorded.count).to be_within(2).of(expected_queries)
|
||||
expect(recorded.cached_count).to eq(0)
|
||||
|
@ -176,7 +176,7 @@ RSpec.describe PipelineSerializer do
|
|||
# pipeline. With the same ref this check is cached but if refs are
|
||||
# different then there is an extra query per ref
|
||||
# https://gitlab.com/gitlab-org/gitlab-foss/issues/46368
|
||||
expected_queries = Gitlab.ee? ? 42 : 39
|
||||
expected_queries = Gitlab.ee? ? 36 : 33
|
||||
|
||||
expect(recorded.count).to be_within(2).of(expected_queries)
|
||||
expect(recorded.cached_count).to eq(0)
|
||||
|
@ -202,7 +202,7 @@ RSpec.describe PipelineSerializer do
|
|||
# Existing numbers are high and require performance optimization
|
||||
# Ongoing issue:
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/225156
|
||||
expected_queries = Gitlab.ee? ? 82 : 76
|
||||
expected_queries = Gitlab.ee? ? 77 : 70
|
||||
|
||||
expect(recorded.count).to be_within(2).of(expected_queries)
|
||||
expect(recorded.cached_count).to eq(0)
|
||||
|
@ -221,8 +221,7 @@ RSpec.describe PipelineSerializer do
|
|||
create(:ci_build, :scheduled, project: project, environment: env.name)
|
||||
|
||||
recorded = ActiveRecord::QueryRecorder.new { subject }
|
||||
expected_queries = Gitlab.ee? ? 61 : 57
|
||||
|
||||
expected_queries = Gitlab.ee? ? 56 : 52
|
||||
expect(recorded.count).to be_within(1).of(expected_queries)
|
||||
expect(recorded.cached_count).to eq(0)
|
||||
end
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
RSpec.shared_examples 'public artifacts' do
|
||||
let_it_be(:project) { create(:project, :public) }
|
||||
let(:pipeline) { create(:ci_empty_pipeline, status: :success, project: project) }
|
||||
|
||||
context 'that has artifacts' do
|
||||
let!(:build) { create(:ci_build, :success, :artifacts, pipeline: pipeline) }
|
||||
|
||||
it 'contains information about artifacts' do
|
||||
expect(subject[:details][:artifacts].length).to eq(1)
|
||||
end
|
||||
end
|
||||
|
||||
context 'that has non public artifacts' do
|
||||
let!(:build) { create(:ci_build, :success, :artifacts, :non_public_artifacts, pipeline: pipeline) }
|
||||
|
||||
it 'does not contain information about artifacts' do
|
||||
expect(subject[:details][:artifacts].length).to eq(0)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue