Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-10 09:10:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-10 09:10:25 +0300
commit9d485c177e9404da5ba53702042fdb9c25d459f2 (patch)
tree10861353ba7b9336dcb5b08c6b905deb4a8da964
parent35ee286f94ee7c706713fbf0b8f16468bb4e4381 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.gitlab/issue_templates/Feature Flag Roll Out.md4
-rw-r--r--app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue1
-rw-r--r--app/controllers/projects/pipelines_controller.rb2
-rw-r--r--app/serializers/pipeline_details_entity.rb9
-rw-r--r--app/serializers/pipeline_serializer.rb4
-rw-r--r--changelogs/unreleased/9202-dont-show-due-dates-in-red-if-issue-is-closed.yml4
-rw-r--r--changelogs/unreleased/mo-remove-artifacts-from-pipeline-entity.yml5
-rw-r--r--doc/user/project/issue_board.md4
-rw-r--r--spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js29
-rw-r--r--spec/serializers/merge_requests/pipeline_entity_spec.rb2
-rw-r--r--spec/serializers/pipeline_details_entity_spec.rb4
-rw-r--r--spec/serializers/pipeline_serializer_spec.rb9
-rw-r--r--spec/support/shared_examples/serializers/pipeline_artifacts_shared_example.rb21
13 files changed, 49 insertions, 49 deletions
diff --git a/.gitlab/issue_templates/Feature Flag Roll Out.md b/.gitlab/issue_templates/Feature Flag Roll Out.md
index 449569df554..63017fcba3a 100644
--- a/.gitlab/issue_templates/Feature Flag Roll Out.md
+++ b/.gitlab/issue_templates/Feature Flag Roll Out.md
@@ -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`
diff --git a/app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue b/app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue
index be0c843ef00..ccdb47e3144 100644
--- a/app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue
+++ b/app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue
@@ -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"
/>
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb
index 82ff7d77a6a..f6b89b1ff1b 100644
--- a/app/controllers/projects/pipelines_controller.rb
+++ b/app/controllers/projects/pipelines_controller.rb
@@ -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
diff --git a/app/serializers/pipeline_details_entity.rb b/app/serializers/pipeline_details_entity.rb
index db021463c8e..76797a773b5 100644
--- a/app/serializers/pipeline_details_entity.rb
+++ b/app/serializers/pipeline_details_entity.rb
@@ -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
diff --git a/app/serializers/pipeline_serializer.rb b/app/serializers/pipeline_serializer.rb
index 9a2e29a6ee3..066af67038c 100644
--- a/app/serializers/pipeline_serializer.rb
+++ b/app/serializers/pipeline_serializer.rb
@@ -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 }],
diff --git a/changelogs/unreleased/9202-dont-show-due-dates-in-red-if-issue-is-closed.yml b/changelogs/unreleased/9202-dont-show-due-dates-in-red-if-issue-is-closed.yml
new file mode 100644
index 00000000000..8ef67d09439
--- /dev/null
+++ b/changelogs/unreleased/9202-dont-show-due-dates-in-red-if-issue-is-closed.yml
@@ -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
diff --git a/changelogs/unreleased/mo-remove-artifacts-from-pipeline-entity.yml b/changelogs/unreleased/mo-remove-artifacts-from-pipeline-entity.yml
new file mode 100644
index 00000000000..4e8853a6ba4
--- /dev/null
+++ b/changelogs/unreleased/mo-remove-artifacts-from-pipeline-entity.yml
@@ -0,0 +1,5 @@
+---
+title: Stop exposing artifacts in pipelines.json
+merge_request: 61253
+author:
+type: performance
diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md
index 9c14cd0ee70..e1b6956f873 100644
--- a/doc/user/project/issue_board.md
+++ b/doc/user/project/issue_board.md
@@ -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).
diff --git a/spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js b/spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js
index 99bf0d84d0c..8738924f717 100644
--- a/spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js
+++ b/spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js
@@ -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', () => {
diff --git a/spec/serializers/merge_requests/pipeline_entity_spec.rb b/spec/serializers/merge_requests/pipeline_entity_spec.rb
index 03a049401c1..6970b547f12 100644
--- a/spec/serializers/merge_requests/pipeline_entity_spec.rb
+++ b/spec/serializers/merge_requests/pipeline_entity_spec.rb
@@ -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
diff --git a/spec/serializers/pipeline_details_entity_spec.rb b/spec/serializers/pipeline_details_entity_spec.rb
index 5756656d146..67f8860ed4a 100644
--- a/spec/serializers/pipeline_details_entity_spec.rb
+++ b/spec/serializers/pipeline_details_entity_spec.rb
@@ -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
diff --git a/spec/serializers/pipeline_serializer_spec.rb b/spec/serializers/pipeline_serializer_spec.rb
index 6028da301f3..1111290cade 100644
--- a/spec/serializers/pipeline_serializer_spec.rb
+++ b/spec/serializers/pipeline_serializer_spec.rb
@@ -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
diff --git a/spec/support/shared_examples/serializers/pipeline_artifacts_shared_example.rb b/spec/support/shared_examples/serializers/pipeline_artifacts_shared_example.rb
deleted file mode 100644
index d5ffd5e7510..00000000000
--- a/spec/support/shared_examples/serializers/pipeline_artifacts_shared_example.rb
+++ /dev/null
@@ -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