Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-12-03 15:10:36 +00:00
parent 5f0d27d131
commit 78aaabb87f
132 changed files with 539 additions and 426 deletions

View File

@ -11,19 +11,19 @@
/doc/.markdownlint @marcel.amirault @eread @aqualls @cnorris /doc/.markdownlint @marcel.amirault @eread @aqualls @cnorris
/doc/ @gl-docsteam /doc/ @gl-docsteam
/doc/.vale/ @marcel.amirault @eread @aqualls @cnorris /doc/.vale/ @marcel.amirault @eread @aqualls @cnorris
/doc/administration/geo/ @marcel.amirault /doc/administration/geo/ @axil
/doc/administration/gitaly/ @eread /doc/administration/gitaly/ @eread
/doc/administration/lfs/ @aqualls /doc/administration/lfs/ @aqualls
/doc/administration/monitoring/ @ngaskill /doc/administration/monitoring/ @ngaskill
/doc/administration/operations/ @marcel.amirault @eread @marcia /doc/administration/operations/ @axil @eread @marcia
/doc/administration/packages/ @ngaskill /doc/administration/packages/ @ngaskill
/doc/administration/pages/ @rdickenson @kpaizee /doc/administration/pages/ @rdickenson @kpaizee
/doc/administration/postgresql/ @marcia /doc/administration/postgresql/ @marcia
/doc/administration/raketasks/ @marcel.amirault @eread /doc/administration/raketasks/ @axil @eread
/doc/administration/redis/ @marcel.amirault /doc/administration/redis/ @axil
/doc/administration/reference_architectures/ @marcel.amirault /doc/administration/reference_architectures/ @axil
/doc/administration/snippets/ @aqualls /doc/administration/snippets/ @aqualls
/doc/administration/troubleshooting @marcel.amirault @marcia @eread /doc/administration/troubleshooting @axil @marcia @eread
/doc/api/graphql/ @msedlakjakubowski @kpaizee /doc/api/graphql/ @msedlakjakubowski @kpaizee
/doc/api/graphql/reference/ @kpaizee /doc/api/graphql/reference/ @kpaizee
/doc/api/group_activity_analytics.md @fneill /doc/api/group_activity_analytics.md @fneill
@ -37,7 +37,7 @@
/doc/development/i18n/ @ngaskill /doc/development/i18n/ @ngaskill
/doc/development/value_stream_analytics.md @fneill /doc/development/value_stream_analytics.md @fneill
/doc/gitlab-basics/ @aqualls /doc/gitlab-basics/ @aqualls
/doc/install/ @marcel.amirault /doc/install/ @axil
/doc/operations/ @ngaskill @rdickenson /doc/operations/ @ngaskill @rdickenson
/doc/push_rules/ @aqualls /doc/push_rules/ @aqualls
/doc/security/ @eread /doc/security/ @eread
@ -45,7 +45,7 @@
/doc/subscriptions/ @sselhorn /doc/subscriptions/ @sselhorn
/doc/topics/autodevops/ @marcia /doc/topics/autodevops/ @marcia
/doc/topics/git/ @aqualls /doc/topics/git/ @aqualls
/doc/update/ @marcel.amirault @marcia /doc/update/ @axil @marcia
/doc/user/analytics/ @fneill @ngaskill /doc/user/analytics/ @fneill @ngaskill
/doc/user/application_security/ @rdickenson /doc/user/application_security/ @rdickenson
/doc/user/application_security/container_scanning/ @ngaskill /doc/user/application_security/container_scanning/ @ngaskill

View File

@ -1367,7 +1367,7 @@
- <<: *if-not-ee - <<: *if-not-ee
when: never when: never
- <<: *if-merge-request-labels-skip-undercoverage - <<: *if-merge-request-labels-skip-undercoverage
allow_failure: true when: never
- <<: *if-merge-request-labels-run-all-rspec - <<: *if-merge-request-labels-run-all-rspec
- <<: *if-merge-request - <<: *if-merge-request
changes: *backend-patterns changes: *backend-patterns

View File

@ -2,15 +2,25 @@
require 'gitlab-dangerfiles' require 'gitlab-dangerfiles'
gitlab_dangerfiles = Gitlab::Dangerfiles::Engine.new(self) def ee?
gitlab_dangerfiles.import_plugins # Support former project name for `dev` and support local Danger run
%w[gitlab gitlab-ee].include?(ENV['CI_PROJECT_NAME']) || Dir.exist?(File.expand_path('ee', __dir__))
end
project_name = ee? ? 'gitlab' : 'gitlab-foss'
Gitlab::Dangerfiles.for_project(self, project_name) do |gitlab_dangerfiles|
gitlab_dangerfiles.import_plugins
unless helper.release_automation?
danger.import_plugin('danger/plugins/*.rb')
gitlab_dangerfiles.import_dangerfiles(except: %w[simple_roulette])
gitlab_dangerfiles.config.files_to_category = ProjectHelper::CATEGORIES
end
end
return if helper.release_automation? return if helper.release_automation?
danger.import_plugin('danger/plugins/*.rb')
gitlab_dangerfiles.import_dangerfiles
project_helper.rule_names.each do |rule| project_helper.rule_names.each do |rule|
danger.import_dangerfile(path: File.join('danger', rule)) danger.import_dangerfile(path: File.join('danger', rule))
end end

View File

@ -400,7 +400,7 @@ group :development, :test do
end end
group :development, :test, :danger do group :development, :test, :danger do
gem 'gitlab-dangerfiles', '~> 2.5.0', require: false gem 'gitlab-dangerfiles', '~> 2.6.1', require: false
end end
group :development, :test, :coverage do group :development, :test, :coverage do

View File

@ -222,7 +222,7 @@ GEM
css_parser (1.7.0) css_parser (1.7.0)
addressable addressable
daemons (1.3.1) daemons (1.3.1)
danger (8.4.1) danger (8.4.2)
claide (~> 1.0) claide (~> 1.0)
claide-plugins (>= 0.9.2) claide-plugins (>= 0.9.2)
colored2 (~> 3.1) colored2 (~> 3.1)
@ -458,7 +458,7 @@ GEM
terminal-table (~> 1.5, >= 1.5.1) terminal-table (~> 1.5, >= 1.5.1)
gitlab-chronic (0.10.5) gitlab-chronic (0.10.5)
numerizer (~> 0.2) numerizer (~> 0.2)
gitlab-dangerfiles (2.5.0) gitlab-dangerfiles (2.6.1)
danger (>= 8.3.1) danger (>= 8.3.1)
danger-gitlab (>= 8.0.0) danger-gitlab (>= 8.0.0)
gitlab-experiment (0.6.5) gitlab-experiment (0.6.5)
@ -1475,7 +1475,7 @@ DEPENDENCIES
gitaly (~> 14.4.0.pre.rc43) gitaly (~> 14.4.0.pre.rc43)
github-markup (~> 1.7.0) github-markup (~> 1.7.0)
gitlab-chronic (~> 0.10.5) gitlab-chronic (~> 0.10.5)
gitlab-dangerfiles (~> 2.5.0) gitlab-dangerfiles (~> 2.6.1)
gitlab-experiment (~> 0.6.5) gitlab-experiment (~> 0.6.5)
gitlab-fog-azure-rm (~> 1.2.0) gitlab-fog-azure-rm (~> 1.2.0)
gitlab-labkit (~> 0.21.1) gitlab-labkit (~> 0.21.1)

View File

@ -162,8 +162,8 @@ export default {
'editor.selectionBackground': '#49483E', 'editor.selectionBackground': '#49483E',
'editor.lineHighlightBackground': '#3E3D32', 'editor.lineHighlightBackground': '#3E3D32',
'editorCursor.foreground': '#F8F8F0', 'editorCursor.foreground': '#F8F8F0',
'editorWhitespace.foreground': '#3B3A32',
'editorIndentGuide.activeBackground': '#9D550FB0', 'editorIndentGuide.activeBackground': '#9D550FB0',
'editor.selectionHighlightBorder': '#222218', 'editor.selectionHighlightBorder': '#222218',
'editorWhitespace.foreground': '#75715e',
}, },
}; };

View File

@ -1105,6 +1105,6 @@ export default {
'editor.selectionBackground': '#073642', 'editor.selectionBackground': '#073642',
'editor.lineHighlightBackground': '#073642', 'editor.lineHighlightBackground': '#073642',
'editorCursor.foreground': '#819090', 'editorCursor.foreground': '#819090',
'editorWhitespace.foreground': '#073642', 'editorWhitespace.foreground': '#586e75',
}, },
}; };

View File

@ -1096,6 +1096,6 @@ export default {
'editor.selectionBackground': '#EEE8D5', 'editor.selectionBackground': '#EEE8D5',
'editor.lineHighlightBackground': '#EEE8D5', 'editor.lineHighlightBackground': '#EEE8D5',
'editorCursor.foreground': '#000000', 'editorCursor.foreground': '#000000',
'editorWhitespace.foreground': '#EAE3C9', 'editorWhitespace.foreground': '#93a1a1',
}, },
}; };

View File

@ -9,20 +9,17 @@ import RunnerSummaryCell from './cells/runner_summary_cell.vue';
import RunnerStatusCell from './cells/runner_status_cell.vue'; import RunnerStatusCell from './cells/runner_status_cell.vue';
import RunnerTags from './runner_tags.vue'; import RunnerTags from './runner_tags.vue';
const tableField = ({ key, label = '', width = 10 }) => { const tableField = ({ key, label = '', thClasses = [] }) => {
return { return {
key, key,
label, label,
thClass: [ thClass: [
`gl-w-${width}p`,
'gl-bg-transparent!', 'gl-bg-transparent!',
'gl-border-b-solid!', 'gl-border-b-solid!',
'gl-border-b-gray-100!', 'gl-border-b-gray-100!',
'gl-py-5!',
'gl-px-0!',
'gl-border-b-1!', 'gl-border-b-1!',
...thClasses,
], ],
tdClass: ['gl-py-5!', 'gl-px-1!'],
tdAttr: { tdAttr: {
'data-testid': `td-${key}`, 'data-testid': `td-${key}`,
}, },
@ -66,10 +63,10 @@ export default {
}, },
fields: [ fields: [
tableField({ key: 'status', label: s__('Runners|Status') }), tableField({ key: 'status', label: s__('Runners|Status') }),
tableField({ key: 'summary', label: s__('Runners|Runner ID'), width: 30 }), tableField({ key: 'summary', label: s__('Runners|Runner ID'), thClasses: ['gl-lg-w-25p'] }),
tableField({ key: 'version', label: __('Version') }), tableField({ key: 'version', label: __('Version') }),
tableField({ key: 'ipAddress', label: __('IP Address') }), tableField({ key: 'ipAddress', label: __('IP Address') }),
tableField({ key: 'tagList', label: __('Tags'), width: 20 }), tableField({ key: 'tagList', label: __('Tags'), thClasses: ['gl-lg-w-25p'] }),
tableField({ key: 'contactedAt', label: __('Last contact') }), tableField({ key: 'contactedAt', label: __('Last contact') }),
tableField({ key: 'actions', label: '' }), tableField({ key: 'actions', label: '' }),
], ],

View File

@ -302,3 +302,10 @@ $gl-line-height-42: px-to-rem(42px);
.gl-z-index-200 { .gl-z-index-200 {
z-index: 200; z-index: 200;
} }
// Will be moved to @gitlab/ui by https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1637
.gl-lg-w-25p {
@include gl-media-breakpoint-up(lg) {
width: 25%;
}
}

View File

@ -50,8 +50,8 @@ module Types
null: true, null: true,
description: 'How long the job was enqueued before starting.' description: 'How long the job was enqueued before starting.'
field :previous_stage_jobs_and_needs, Types::Ci::JobType.connection_type, null: true, field :previous_stage_jobs_or_needs, Types::Ci::JobType.connection_type, null: true,
description: 'All prerequisite jobs.' description: 'Jobs that must complete before the job runs. Returns needed jobs if the job uses the `needs` keyword, and returns previous stage jobs otherwise.'
field :detailed_status, Types::Ci::DetailedStatusType, null: true, field :detailed_status, Types::Ci::DetailedStatusType, null: true,
description: 'Detailed status of the job.' description: 'Detailed status of the job.'
field :artifacts, Types::Ci::JobArtifactType.connection_type, null: true, field :artifacts, Types::Ci::JobArtifactType.connection_type, null: true,
@ -103,9 +103,13 @@ module Types
end end
end end
def previous_stage_jobs_and_needs def previous_stage_jobs_or_needs
Gitlab::Graphql::Lazy.with_value(previous_stage_jobs) do |jobs| if object.scheduling_type == 'stage'
(jobs + object.needs).uniq(&:name) Gitlab::Graphql::Lazy.with_value(previous_stage_jobs) do |jobs|
jobs
end
else
object.needs
end end
end end

View File

@ -0,0 +1,21 @@
description: Create SAST
category: Security::CiConfiguration::SastCreateService
action: create
label_description: One of "true", "false"
property_description:
value_description:
extra_properties:
identifiers:
product_section: sec
product_stage: secure
product_group: group::static_analysis
product_category:
milestone: "13.12"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58230
distributions:
- ce
- ee
tiers:
- free
- premium
- ultimate

View File

@ -0,0 +1,21 @@
description: Update SAST
category: Security::CiConfiguration::SastCreateService
action: update
label_description: One of "true", "false"
property_description:
value_description:
extra_properties:
identifiers:
product_section: sec
product_stage: secure
product_group: group::static_analysis
product_category:
milestone: "13.12"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58230
distributions:
- ce
- ee
tiers:
- free
- premium
- ultimate

View File

@ -0,0 +1,21 @@
description: Create secret detection
category: Security::CiConfiguration::SecretDetectionCreateService
action: create
label_description: One of "true", "false"
property_description:
value_description:
extra_properties:
identifiers:
product_section: sec
product_stage: secure
product_group: group::static_analysis
product_category:
milestone: "13.12"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58230
distributions:
- ce
- ee
tiers:
- free
- premium
- ultimate

View File

@ -0,0 +1,21 @@
description: Update secret detection
category: Security::CiConfiguration::SecretDetectionCreateService
action: update
label_description: One of "true", "false"
property_description:
value_description:
extra_properties:
identifiers:
product_section: sec
product_stage: secure
product_group: group::static_analysis
product_category:
milestone: "13.12"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58230
distributions:
- ce
- ee
tiers:
- free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: monitor product_stage: monitor
product_group: monitor product_group: group::monitor
product_category: product_category:
milestone: "12.7" milestone: "12.7"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23000 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23000
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -14,5 +14,8 @@ milestone: "14.0"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62645 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62645
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -14,5 +14,8 @@ milestone: "14.0"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62645 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62645
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "12.10" milestone: "12.10"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27001 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27001
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "12.10" milestone: "12.10"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27001 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27001
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "12.10" milestone: "12.10"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27001 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27001
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "12.10" milestone: "12.10"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27001 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27001
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "12.10" milestone: "12.10"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27001 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27001
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.6" milestone: "13.6"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47175 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47175
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.7" milestone: "13.7"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48617 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48617
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: growth product_section: growth
product_stage: growth product_stage: growth
product_group: adoption product_group: group::adoption
product_category: product_category:
milestone: "13.12" milestone: "13.12"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59713 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59713
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: growth product_section: growth
product_stage: growth product_stage: growth
product_group: adoption product_group: group::adoption
product_category: product_category:
milestone: "13.12" milestone: "13.12"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59713 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59713
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: growth product_section: growth
product_stage: growth product_stage: growth
product_group: activation product_group: group::activation
product_category: product_category:
milestone: "13.11" milestone: "13.11"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56015 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56015
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: monitor product_stage: monitor
product_group: monitor product_group: group::monitor
product_category: product_category:
milestone: "12.4" milestone: "12.4"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18620 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18620
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: monitor product_stage: monitor
product_group: monitor product_group: group::monitor
product_category: product_category:
milestone: "12.4" milestone: "12.4"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18620 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18620
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.6" milestone: "13.6"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/44926 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/44926
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: verify product_stage: verify
product_group: testing product_group: group::testing
product_category: product_category:
milestone: "12.5" milestone: "12.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18890 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18890
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -8,11 +8,14 @@ extra_properties:
identifiers: identifiers:
product_section: ops product_section: ops
product_stage: package product_stage: package
product_group: package product_group: group::package
product_category: product_category:
milestone: "13.5" milestone: "13.5"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
distributions: distributions:
- ce - ce
- ee
tiers: tiers:
- free - free
- premium
- ultimate

View File

@ -17,7 +17,7 @@ MSG
return unless helper.ci? return unless helper.ci?
template_paths_to_review = project_helper.changes_by_category[:ci_template] template_paths_to_review = helper.changes_by_category[:ci_template]
if gitlab.mr_labels.include?('ci::templates') || template_paths_to_review.any? if gitlab.mr_labels.include?('ci::templates') || template_paths_to_review.any?
message 'This merge request adds or changes files that require a ' \ message 'This merge request adds or changes files that require a ' \

View File

@ -51,7 +51,7 @@ end
return unless helper.ci? return unless helper.ci?
return if gitlab.mr_labels.include?(DATABASE_APPROVED_LABEL) return if gitlab.mr_labels.include?(DATABASE_APPROVED_LABEL)
db_paths_to_review = project_helper.changes_by_category[:database] db_paths_to_review = helper.changes_by_category[:database]
if gitlab.mr_labels.include?('database') || db_paths_to_review.any? if gitlab.mr_labels.include?('database') || db_paths_to_review.any?
message 'This merge request adds or changes files that require a ' \ message 'This merge request adds or changes files that require a ' \

View File

@ -13,7 +13,7 @@ For more information, see:
- The [definition of done](https://docs.gitlab.com/ee/development/contributing/merge_request_workflow.html#definition-of-done) documentation. - The [definition of done](https://docs.gitlab.com/ee/development/contributing/merge_request_workflow.html#definition-of-done) documentation.
MSG MSG
docs_paths_to_review = project_helper.changes_by_category[:docs] docs_paths_to_review = helper.changes_by_category[:docs]
# Documentation should be updated for feature::addition and feature::enhancement # Documentation should be updated for feature::addition and feature::enhancement
if docs_paths_to_review.empty? if docs_paths_to_review.empty?

View File

@ -12,7 +12,7 @@ For MR review guidelines, see the [Service Ping review guidelines](https://docs.
MSG MSG
# exit if not matching files or if no product intelligence labels # exit if not matching files or if no product intelligence labels
product_intelligence_paths_to_review = project_helper.changes_by_category[:product_intelligence] product_intelligence_paths_to_review = helper.changes_by_category[:product_intelligence]
labels_to_add = product_intelligence.missing_labels labels_to_add = product_intelligence.missing_labels
return if product_intelligence_paths_to_review.empty? || labels_to_add.empty? return if product_intelligence_paths_to_review.empty? || labels_to_add.empty?

View File

@ -89,7 +89,7 @@ def markdown_row_for_spins(category, spins_array)
"| #{helper.label_for_category(category)} | #{reviewer_note} | #{maintainer_note} |" "| #{helper.label_for_category(category)} | #{reviewer_note} | #{maintainer_note} |"
end end
changes = project_helper.changes_by_category changes = helper.changes_by_category
# Ignore any files that are known but uncategorized. Prompt for any unknown files # Ignore any files that are known but uncategorized. Prompt for any unknown files
changes.delete(:none) changes.delete(:none)
@ -114,9 +114,7 @@ categories << :product_intelligence if helper.mr_labels.include?("product intell
categories.delete(:product_intelligence) unless helper.mr_labels.include?("growth experiment") categories.delete(:product_intelligence) unless helper.mr_labels.include?("growth experiment")
if changes.any? if changes.any?
project = project_helper.project_name random_roulette_spins = roulette.spin(nil, categories, timezone_experiment: false)
random_roulette_spins = roulette.spin(project, categories, timezone_experiment: false)
rows = random_roulette_spins.map do |spin| rows = random_roulette_spins.map do |spin|
markdown_row_for_spins(spin.category, [spin]) markdown_row_for_spins(spin.category, [spin])

View File

@ -14,7 +14,7 @@ SPECIALIZATIONS = {
feature_flag: 'feature flag' feature_flag: 'feature flag'
}.freeze }.freeze
labels_to_add = project_helper.changes_by_category.each_with_object([]) do |(category, _changes), memo| labels_to_add = helper.changes_by_category.each_with_object([]) do |(category, _changes), memo|
label = SPECIALIZATIONS[category] label = SPECIALIZATIONS[category]
next unless label next unless label
next if gitlab.mr_labels.include?(label) next if gitlab.mr_labels.include?(label)

View File

@ -50,7 +50,7 @@ if has_ee_app_changes && has_spec_changes && !(has_app_changes || has_ee_spec_ch
end end
# Forbidding a new file addition under `/spec/controllers` or `/ee/spec/controllers` # Forbidding a new file addition under `/spec/controllers` or `/ee/spec/controllers`
if project_helper.changes.added.files.grep(%r{^(ee/)?spec/controllers/}).any? if helper.changes.added.files.grep(%r{^(ee/)?spec/controllers/}).any?
warn CONTROLLER_SPEC_DEPRECATION_MESSAGE warn CONTROLLER_SPEC_DEPRECATION_MESSAGE
end end

View File

@ -50,7 +50,7 @@ If you are running a version prior to 14.1 and are using Geo and multi-arch cont
### Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode ### Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode
GitLab 13.9 through GitLab 14.3 are affected by a bug in which enabling [GitLab Maintenance Mode](../../maintenance_mode/index.md) will cause Geo secondary site statuses to appear to stop updating and become unhealthy. For more information, see [Troubleshooting - Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode](troubleshooting.md#geo-admin-area-shows-unhealthy-after-enabling-maintenance-mode). GitLab 13.9 through GitLab 14.3 are affected by a bug in which enabling [GitLab Maintenance Mode](../../maintenance_mode/index.md) causes Geo secondary site statuses to appear to stop updating and become unhealthy. For more information, see [Troubleshooting - Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode](troubleshooting.md#geo-admin-area-shows-unhealthy-after-enabling-maintenance-mode).
## Updating to GitLab 14.0/14.1 ## Updating to GitLab 14.0/14.1
@ -64,7 +64,7 @@ If you are running an affected version and need to remove your Primary site, you
### Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode ### Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode
GitLab 13.9 through GitLab 14.3 are affected by a bug in which enabling [GitLab Maintenance Mode](../../maintenance_mode/index.md) will cause Geo secondary site statuses to appear to stop updating and become unhealthy. For more information, see [Troubleshooting - Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode](troubleshooting.md#geo-admin-area-shows-unhealthy-after-enabling-maintenance-mode). GitLab 13.9 through GitLab 14.3 are affected by a bug in which enabling [GitLab Maintenance Mode](../../maintenance_mode/index.md) causes Geo secondary site statuses to appear to stop updating and become unhealthy. For more information, see [Troubleshooting - Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode](troubleshooting.md#geo-admin-area-shows-unhealthy-after-enabling-maintenance-mode).
## Updating to GitLab 13.12 ## Updating to GitLab 13.12
@ -90,7 +90,7 @@ Geo::LfsObjectRegistry.where(state: 0, success: true).update_all(state: 2)
### Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode ### Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode
GitLab 13.9 through GitLab 14.3 are affected by a bug in which enabling [GitLab Maintenance Mode](../../maintenance_mode/index.md) will cause Geo secondary site statuses to appear to stop updating and become unhealthy. For more information, see [Troubleshooting - Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode](troubleshooting.md#geo-admin-area-shows-unhealthy-after-enabling-maintenance-mode). GitLab 13.9 through GitLab 14.3 are affected by a bug in which enabling [GitLab Maintenance Mode](../../maintenance_mode/index.md) causes Geo secondary site statuses to appear to stop updating and become unhealthy. For more information, see [Troubleshooting - Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode](troubleshooting.md#geo-admin-area-shows-unhealthy-after-enabling-maintenance-mode).
## Updating to GitLab 13.11 ## Updating to GitLab 13.11
@ -98,20 +98,20 @@ We found an [issue with Git clone/pull through HTTP(s)](https://gitlab.com/gitla
### Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode ### Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode
GitLab 13.9 through GitLab 14.3 are affected by a bug in which enabling [GitLab Maintenance Mode](../../maintenance_mode/index.md) will cause Geo secondary site statuses to appear to stop updating and become unhealthy. For more information, see [Troubleshooting - Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode](troubleshooting.md#geo-admin-area-shows-unhealthy-after-enabling-maintenance-mode). GitLab 13.9 through GitLab 14.3 are affected by a bug in which enabling [GitLab Maintenance Mode](../../maintenance_mode/index.md) causes Geo secondary site statuses to appear to stop updating and become unhealthy. For more information, see [Troubleshooting - Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode](troubleshooting.md#geo-admin-area-shows-unhealthy-after-enabling-maintenance-mode).
## Updating to GitLab 13.10 ## Updating to GitLab 13.10
### Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode ### Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode
GitLab 13.9 through GitLab 14.3 are affected by a bug in which enabling [GitLab Maintenance Mode](../../maintenance_mode/index.md) will cause Geo secondary site statuses to appear to stop updating and become unhealthy. For more information, see [Troubleshooting - Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode](troubleshooting.md#geo-admin-area-shows-unhealthy-after-enabling-maintenance-mode). GitLab 13.9 through GitLab 14.3 are affected by a bug in which enabling [GitLab Maintenance Mode](../../maintenance_mode/index.md) causes Geo secondary site statuses to appear to stop updating and become unhealthy. For more information, see [Troubleshooting - Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode](troubleshooting.md#geo-admin-area-shows-unhealthy-after-enabling-maintenance-mode).
## Updating to GitLab 13.9 ## Updating to GitLab 13.9
### Error during zero-downtime update: "cannot drop column asset_proxy_whitelist" ### Error during zero-downtime update: "cannot drop column asset_proxy_whitelist"
We've detected an issue [with a column rename](https://gitlab.com/gitlab-org/gitlab/-/issues/324160) We've detected an issue [with a column rename](https://gitlab.com/gitlab-org/gitlab/-/issues/324160)
that will prevent upgrades to GitLab 13.9.0, 13.9.1, 13.9.2 and 13.9.3 when following the zero-downtime steps. It is necessary that prevents upgrades to GitLab 13.9.0, 13.9.1, 13.9.2 and 13.9.3 when following the zero-downtime steps. It is necessary
to perform the following additional steps for the zero-downtime update: to perform the following additional steps for the zero-downtime update:
1. Before running the final `sudo gitlab-rake db:migrate` command on the deploy node, 1. Before running the final `sudo gitlab-rake db:migrate` command on the deploy node,
@ -132,7 +132,7 @@ to perform the following additional steps for the zero-downtime update:
``` ```
If you have already run the final `sudo gitlab-rake db:migrate` command on the deploy node and have If you have already run the final `sudo gitlab-rake db:migrate` command on the deploy node and have
encountered the [column rename issue](https://gitlab.com/gitlab-org/gitlab/-/issues/324160), you will encountered the [column rename issue](https://gitlab.com/gitlab-org/gitlab/-/issues/324160), you might
see the following error: see the following error:
```shell ```shell
@ -148,7 +148,7 @@ More details are available [in this issue](https://gitlab.com/gitlab-org/gitlab/
### Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode ### Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode
GitLab 13.9 through GitLab 14.3 are affected by a bug in which enabling [GitLab Maintenance Mode](../../maintenance_mode/index.md) will cause Geo secondary site statuses to appear to stop updating and become unhealthy. For more information, see [Troubleshooting - Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode](troubleshooting.md#geo-admin-area-shows-unhealthy-after-enabling-maintenance-mode). GitLab 13.9 through GitLab 14.3 are affected by a bug in which enabling [GitLab Maintenance Mode](../../maintenance_mode/index.md) causes Geo secondary site statuses to appear to stop updating and become unhealthy. For more information, see [Troubleshooting - Geo Admin Area shows 'Unhealthy' after enabling Maintenance Mode](troubleshooting.md#geo-admin-area-shows-unhealthy-after-enabling-maintenance-mode).
## Updating to GitLab 13.7 ## Updating to GitLab 13.7
@ -168,7 +168,7 @@ on Geo secondaries. This issue is fixed in GitLab 13.6.1 and later.
In GitLab 13.3, Geo removed the PostgreSQL [Foreign Data Wrapper](https://www.postgresql.org/docs/11/postgres-fdw.html) In GitLab 13.3, Geo removed the PostgreSQL [Foreign Data Wrapper](https://www.postgresql.org/docs/11/postgres-fdw.html)
dependency for the tracking database. dependency for the tracking database.
The FDW server, user, and the extension will be removed during the upgrade The FDW server, user, and the extension is removed during the upgrade
process on each secondary node. The GitLab settings related to the FDW in the process on each secondary node. The GitLab settings related to the FDW in the
`/etc/gitlab/gitlab.rb` have been deprecated and can be safely removed. `/etc/gitlab/gitlab.rb` have been deprecated and can be safely removed.

View File

@ -16,18 +16,18 @@ setup, various configuration requires removal.
### Policy ### Policy
The Omnibus GitLab package will retain configuration for at least **one major** The Omnibus GitLab package retains configuration for at least **one major**
version. We cannot guarantee that deprecated configuration version. We can't guarantee that deprecated configuration
will be available in the next major release. See [example](#example) for more details. is available in the next major release. See [example](#example) for more details.
### Notice ### Notice
If the configuration becomes obsolete, we will announce the deprecation: If the configuration becomes obsolete, we announce the deprecation:
- via release blog post on `https://about.gitlab.com/blog/`. The blog post item - via release blog post on `https://about.gitlab.com/blog/`. The blog post item
will contain the deprecation notice together with the target removal date. contains the deprecation notice together with the target removal date.
- via installation/reconfigure output (if applicable). - via installation/reconfigure output (if applicable).
- via official documentation on `https://docs.gitlab.com/`. The documentation update will contain the corrected syntax (if applicable) or a date of configuration removal. - via official documentation on `https://docs.gitlab.com/`. The documentation update contains the corrected syntax (if applicable) or a date of configuration removal.
### Procedure ### Procedure
@ -82,16 +82,16 @@ The final comment in the issue **has to have**:
## Example ## Example
User configuration available in `/etc/gitlab/gitlab.rb` was introduced in GitLab version 10.0, `gitlab_rails['configuration'] = true`. In GitLab version 10.4.0, a new change was introduced that requires rename of this configuration option. New configuration option is `gitlab_rails['better_configuration'] = true`. Development team will translate the old configuration into new one User configuration available in `/etc/gitlab/gitlab.rb` was introduced in GitLab version 10.0, `gitlab_rails['configuration'] = true`. In GitLab version 10.4.0, a new change was introduced that requires rename of this configuration option. New configuration option is `gitlab_rails['better_configuration'] = true`. Development team translates the old configuration into a new one
and trigger a deprecation procedure. and triggers a deprecation procedure.
This means that these two configuration This means that these two configuration
options will both be valid through GitLab version 10. In other words, options are valid through GitLab version 10. In other words,
if you still have `gitlab_rails['configuration'] = true` set in GitLab 10.8.0 if you still have `gitlab_rails['configuration'] = true` set in GitLab 10.8.0
the feature will continue working the same way as if you had `gitlab_rails['better_configuration'] = true` set. the feature continues working the same way as if you had `gitlab_rails['better_configuration'] = true` set.
However, setting the old version of configuration will print out a deprecation However, setting the old version of the configuration prints out a deprecation
notice at the end of installation/upgrade/reconfigure run. notice at the end of installation/upgrade/reconfigure run.
With GitLab 11, `gitlab_rails['configuration'] = true` will no longer work and you will have to manually change the configuration in `/etc/gitlab/gitlab.rb` to the new valid configuration. In GitLab 11, `gitlab_rails['configuration'] = true` no longer works and you must manually change the configuration in `/etc/gitlab/gitlab.rb` to the new valid configuration.
**Note** If this configuration option is sensitive and can put integrity of the installation or **Note** If this configuration option is sensitive and can put integrity of the installation or
data in danger, installation/upgrade will be aborted. data in danger,the installation or upgrade is aborted.

View File

@ -8687,7 +8687,7 @@ Represents the total number of issues and their weights for a particular day.
| <a id="cijobneeds"></a>`needs` | [`CiBuildNeedConnection`](#cibuildneedconnection) | References to builds that must complete before the jobs run. (see [Connections](#connections)) | | <a id="cijobneeds"></a>`needs` | [`CiBuildNeedConnection`](#cibuildneedconnection) | References to builds that must complete before the jobs run. (see [Connections](#connections)) |
| <a id="cijobpipeline"></a>`pipeline` | [`Pipeline`](#pipeline) | Pipeline the job belongs to. | | <a id="cijobpipeline"></a>`pipeline` | [`Pipeline`](#pipeline) | Pipeline the job belongs to. |
| <a id="cijobplayable"></a>`playable` | [`Boolean!`](#boolean) | Indicates the job can be played. | | <a id="cijobplayable"></a>`playable` | [`Boolean!`](#boolean) | Indicates the job can be played. |
| <a id="cijobpreviousstagejobsandneeds"></a>`previousStageJobsAndNeeds` | [`CiJobConnection`](#cijobconnection) | All prerequisite jobs. (see [Connections](#connections)) | | <a id="cijobpreviousstagejobsorneeds"></a>`previousStageJobsOrNeeds` | [`CiJobConnection`](#cijobconnection) | Jobs that must complete before the job runs. Returns needed jobs if the job uses the `needs` keyword, and returns previous stage jobs otherwise. (see [Connections](#connections)) |
| <a id="cijobqueuedat"></a>`queuedAt` | [`Time`](#time) | When the job was enqueued and marked as pending. | | <a id="cijobqueuedat"></a>`queuedAt` | [`Time`](#time) | When the job was enqueued and marked as pending. |
| <a id="cijobqueuedduration"></a>`queuedDuration` | [`Duration`](#duration) | How long the job was enqueued before starting. | | <a id="cijobqueuedduration"></a>`queuedDuration` | [`Duration`](#duration) | How long the job was enqueued before starting. |
| <a id="cijobrefname"></a>`refName` | [`String`](#string) | Ref name of the job. | | <a id="cijobrefname"></a>`refName` | [`String`](#string) | Ref name of the job. |

View File

@ -1072,7 +1072,7 @@ If the project is a fork, and you provide a valid token to authenticate, the
"ssh_url_to_repo":"git@gitlab.com:gitlab-org/gitlab-foss.git", "ssh_url_to_repo":"git@gitlab.com:gitlab-org/gitlab-foss.git",
"http_url_to_repo":"https://gitlab.com/gitlab-org/gitlab-foss.git", "http_url_to_repo":"https://gitlab.com/gitlab-org/gitlab-foss.git",
"web_url":"https://gitlab.com/gitlab-org/gitlab-foss", "web_url":"https://gitlab.com/gitlab-org/gitlab-foss",
"avatar_url":"https://assets.gitlab-static.net/uploads/-/system/project/avatar/13083/logo-extra-whitespace.png", "avatar_url":"https://gitlab.com/uploads/-/system/project/avatar/13083/logo-extra-whitespace.png",
"license_url": "https://gitlab.com/gitlab-org/gitlab/-/blob/master/LICENSE", "license_url": "https://gitlab.com/gitlab-org/gitlab/-/blob/master/LICENSE",
"license": { "license": {
"key": "mit", "key": "mit",

View File

@ -79,7 +79,7 @@ Alternatively, you can use the API to protect an environment:
$ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \ $ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
--data "user_id=3222377&access_level=20" "https://gitlab.com/api/v4/groups/9899826/members" --data "user_id=3222377&access_level=20" "https://gitlab.com/api/v4/groups/9899826/members"
{"id":3222377,"name":"Sean Carroll","username":"sfcarroll","state":"active","avatar_url":"https://assets.gitlab-static.net/uploads/-/system/user/avatar/3222377/avatar.png","web_url":"https://gitlab.com/sfcarroll","access_level":20,"created_at":"2020-10-26T17:37:50.309Z","expires_at":null} {"id":3222377,"name":"Sean Carroll","username":"sfcarroll","state":"active","avatar_url":"https://gitlab.com/uploads/-/system/user/avatar/3222377/avatar.png","web_url":"https://gitlab.com/sfcarroll","access_level":20,"created_at":"2020-10-26T17:37:50.309Z","expires_at":null}
``` ```
1. Use the API to add the group to the project as a reporter: 1. Use the API to add the group to the project as a reporter:

View File

@ -37,8 +37,8 @@ Furthermore, configuration in Workhorse can lead to the image scaler rejecting a
For instance, here are two different URLs that serve the GitLab project avatar both in its For instance, here are two different URLs that serve the GitLab project avatar both in its
original size and scaled down to 64 pixels. Only the second request will trigger the image scaler: original size and scaled down to 64 pixels. Only the second request will trigger the image scaler:
- [`/uploads/-/system/project/avatar/278964/logo-extra-whitespace.png`](https://assets.gitlab-static.net/uploads/-/system/project/avatar/278964/logo-extra-whitespace.png) - [`/uploads/-/system/project/avatar/278964/logo-extra-whitespace.png`](https://gitlab.com/uploads/-/system/project/avatar/278964/logo-extra-whitespace.png)
- [`/uploads/-/system/project/avatar/278964/logo-extra-whitespace.png?width=64`](https://assets.gitlab-static.net/uploads/-/system/project/avatar/278964/logo-extra-whitespace.png?width=64) - [`/uploads/-/system/project/avatar/278964/logo-extra-whitespace.png?width=64`](https://gitlab.com/uploads/-/system/project/avatar/278964/logo-extra-whitespace.png?width=64)
## Where do we scale images? ## Where do we scale images?

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -51,6 +51,7 @@ When GitLab detects a **Denied** license, you can view it in the [license list](
![License List](img/license_list_v13_0.png) ![License List](img/license_list_v13_0.png)
You can view and modify existing policies from the [policies](#policies) tab. You can view and modify existing policies from the [policies](#policies) tab.
![Edit Policy](img/policies_maintainer_edit_v14_3.png) ![Edit Policy](img/policies_maintainer_edit_v14_3.png)
## License expressions ## License expressions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -30953,6 +30953,9 @@ msgstr ""
msgid "SecurityOrchestration|An error occurred unassigning your security policy project" msgid "SecurityOrchestration|An error occurred unassigning your security policy project"
msgstr "" msgstr ""
msgid "SecurityOrchestration|Choose a project"
msgstr ""
msgid "SecurityOrchestration|Description" msgid "SecurityOrchestration|Description"
msgstr "" msgstr ""

View File

@ -2,25 +2,13 @@
module QA module QA
module Resource module Resource
class DeployToken < Base class ProjectDeployToken < Base
attr_accessor :name, :expires_at attr_accessor :name, :expires_at
attr_writer :scopes attr_writer :scopes
attribute :username do attribute :id
Page::Project::Settings::Repository.perform do |repository_page| attribute :token
repository_page.expand_deploy_tokens do |token| attribute :username
token.token_username
end
end
end
attribute :password do
Page::Project::Settings::Repository.perform do |repository_page|
repository_page.expand_deploy_tokens do |token|
token.token_password
end
end
end
attribute :project do attribute :project do
Project.fabricate! do |resource| Project.fabricate! do |resource|
@ -29,6 +17,35 @@ module QA
end end
end end
def fabricate_via_api!
super
end
def api_get_path
"/projects/#{project.id}/deploy_tokens"
end
def api_post_path
api_get_path
end
def api_post_body
{
name: @name,
scopes: @scopes
}
end
def api_delete_path
"/projects/#{project.id}/deploy_tokens/#{id}"
end
def resource_web_url(resource)
super
rescue ResourceURLMissingError
# this particular resource does not expose a web_url property
end
def fabricate! def fabricate!
project.visit! project.visit!

View File

@ -14,15 +14,15 @@ module QA
end end
let(:project_deploy_token) do let(:project_deploy_token) do
Resource::DeployToken.fabricate_via_browser_ui! do |deploy_token| Resource::ProjectDeployToken.fabricate_via_api! do |deploy_token|
deploy_token.name = 'registry-deploy-token' deploy_token.name = 'registry-deploy-token'
deploy_token.project = project deploy_token.project = project
deploy_token.scopes = [ deploy_token.scopes = %w[
:read_repository, read_repository
:read_package_registry, read_package_registry
:write_package_registry, write_package_registry
:read_registry, read_registry
:write_registry write_registry
] ]
end end
end end
@ -60,7 +60,7 @@ module QA
when :personal_access_token when :personal_access_token
"\"#{personal_access_token}\"" "\"#{personal_access_token}\""
when :project_deploy_token when :project_deploy_token
"\"#{project_deploy_token.password}\"" "\"#{project_deploy_token.token}\""
when :ci_job_token when :ci_job_token
'$CI_JOB_TOKEN' '$CI_JOB_TOKEN'
end end

View File

@ -88,7 +88,7 @@ module QA
when :ci_job_token when :ci_job_token
'${CI_JOB_TOKEN}' '${CI_JOB_TOKEN}'
when :project_deploy_token when :project_deploy_token
project_deploy_token.password project_deploy_token.token
end end
end end

View File

@ -97,7 +97,7 @@ module QA
when :ci_job_token when :ci_job_token
'System.getenv("CI_JOB_TOKEN")' 'System.getenv("CI_JOB_TOKEN")'
when :project_deploy_token when :project_deploy_token
"\"#{project_deploy_token.password}\"" "\"#{project_deploy_token.token}\""
end end
end end

View File

@ -142,7 +142,7 @@ module QA
when :ci_job_token when :ci_job_token
'${env.CI_JOB_TOKEN}' '${env.CI_JOB_TOKEN}'
when :project_deploy_token when :project_deploy_token
project_deploy_token.password project_deploy_token.token
end end
end end

View File

@ -16,13 +16,13 @@ module QA
end end
let(:project_deploy_token) do let(:project_deploy_token) do
Resource::DeployToken.fabricate_via_browser_ui! do |deploy_token| Resource::ProjectDeployToken.fabricate_via_api! do |deploy_token|
deploy_token.name = 'npm-deploy-token' deploy_token.name = 'npm-deploy-token'
deploy_token.project = project deploy_token.project = project
deploy_token.scopes = [ deploy_token.scopes = %w[
:read_repository, read_repository
:read_package_registry, read_package_registry
:write_package_registry write_package_registry
] ]
end end
end end
@ -151,7 +151,7 @@ module QA
when :ci_job_token when :ci_job_token
'${CI_JOB_TOKEN}' '${CI_JOB_TOKEN}'
when :project_deploy_token when :project_deploy_token
"\"#{project_deploy_token.password}\"" "\"#{project_deploy_token.token}\""
end end
end end

View File

@ -16,13 +16,13 @@ module QA
end end
let(:project_deploy_token) do let(:project_deploy_token) do
Resource::DeployToken.fabricate_via_browser_ui! do |deploy_token| Resource::ProjectDeployToken.fabricate_via_api! do |deploy_token|
deploy_token.name = 'npm-deploy-token' deploy_token.name = 'npm-deploy-token'
deploy_token.project = project deploy_token.project = project
deploy_token.scopes = [ deploy_token.scopes = %w[
:read_repository, read_repository
:read_package_registry, read_package_registry
:write_package_registry write_package_registry
] ]
end end
end end
@ -129,7 +129,7 @@ module QA
when :ci_job_token when :ci_job_token
'${CI_JOB_TOKEN}' '${CI_JOB_TOKEN}'
when :project_deploy_token when :project_deploy_token
"\"#{project_deploy_token.password}\"" "\"#{project_deploy_token.token}\""
end end
end end

View File

@ -9,14 +9,14 @@ module QA
deploy_token_name = 'deploy token name' deploy_token_name = 'deploy token name'
one_week_from_now = Date.today + 7 one_week_from_now = Date.today + 7
deploy_token = Resource::DeployToken.fabricate_via_browser_ui! do |resource| deploy_token = Resource::ProjectDeployToken.fabricate_via_api! do |resource|
resource.name = deploy_token_name resource.name = deploy_token_name
resource.expires_at = one_week_from_now resource.expires_at = one_week_from_now
resource.scopes = [:read_repository] resource.scopes = %w[read_repository]
end end
expect(deploy_token.username.length).to be > 0 expect(deploy_token.username.length).to be > 0
expect(deploy_token.password.length).to be > 0 expect(deploy_token.token.length).to be > 0
end end
end end
end end

View File

@ -42,13 +42,13 @@ module QA
end end
let(:project_deploy_token) do let(:project_deploy_token) do
Resource::DeployToken.fabricate_via_browser_ui! do |deploy_token| Resource::ProjectDeployToken.fabricate_via_api! do |deploy_token|
deploy_token.name = 'package-deploy-token' deploy_token.name = 'package-deploy-token'
deploy_token.project = package_project deploy_token.project = package_project
deploy_token.scopes = [ deploy_token.scopes = %w[
:read_repository, read_repository
:read_package_registry, read_package_registry
:write_package_registry write_package_registry
] ]
end end
end end

View File

@ -18,15 +18,13 @@ FactoryBot.define do
transient { child_of { nil } } transient { child_of { nil } }
transient { upstream_of { nil } } transient { upstream_of { nil } }
before(:create) do |pipeline, evaluator|
pipeline.ensure_project_iid!
end
after(:build) do |pipeline, evaluator| after(:build) do |pipeline, evaluator|
if evaluator.child_of if evaluator.child_of
pipeline.project = evaluator.child_of.project pipeline.project = evaluator.child_of.project
pipeline.source = :parent_pipeline pipeline.source = :parent_pipeline
end end
pipeline.ensure_project_iid!
end end
after(:create) do |pipeline, evaluator| after(:create) do |pipeline, evaluator|

View File

@ -25,7 +25,7 @@ RSpec.describe Types::Ci::JobType do
needs needs
pipeline pipeline
playable playable
previousStageJobsAndNeeds previousStageJobsOrNeeds
queued_at queued_at
queued_duration queued_duration
refName refName

View File

@ -3,10 +3,10 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe Namespaces::UserNamespacePolicy do RSpec.describe Namespaces::UserNamespacePolicy do
let(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:owner) { create(:user) } let_it_be(:owner) { create(:user) }
let(:admin) { create(:admin) } let_it_be(:admin) { create(:admin) }
let(:namespace) { create(:namespace, owner: owner) } let_it_be(:namespace) { create(:user_namespace, owner: owner) }
let(:owner_permissions) { [:owner_access, :create_projects, :admin_namespace, :read_namespace, :read_statistics, :transfer_projects, :create_package_settings, :read_package_settings] } let(:owner_permissions) { [:owner_access, :create_projects, :admin_namespace, :read_namespace, :read_statistics, :transfer_projects, :create_package_settings, :read_package_settings] }

View File

@ -14,8 +14,19 @@ RSpec.describe API::CommitStatuses do
let(:get_url) { "/projects/#{project.id}/repository/commits/#{sha}/statuses" } let(:get_url) { "/projects/#{project.id}/repository/commits/#{sha}/statuses" }
context 'ci commit exists' do context 'ci commit exists' do
let!(:master) { project.ci_pipelines.create!(source: :push, sha: commit.id, ref: 'master', protected: false) } let!(:master) do
let!(:develop) { project.ci_pipelines.create!(source: :push, sha: commit.id, ref: 'develop', protected: false) } project.ci_pipelines.build(source: :push, sha: commit.id, ref: 'master', protected: false).tap do |p|
p.ensure_project_iid! # Necessary to avoid cross-database modification error
p.save!
end
end
let!(:develop) do
project.ci_pipelines.build(source: :push, sha: commit.id, ref: 'develop', protected: false).tap do |p|
p.ensure_project_iid! # Necessary to avoid cross-database modification error
p.save!
end
end
context "reporter user" do context "reporter user" do
let(:statuses_id) { json_response.map { |status| status['id'] } } let(:statuses_id) { json_response.map { |status| status['id'] } }
@ -310,8 +321,19 @@ RSpec.describe API::CommitStatuses do
end end
context 'when a pipeline id is specified' do context 'when a pipeline id is specified' do
let!(:first_pipeline) { project.ci_pipelines.create!(source: :push, sha: commit.id, ref: 'master', status: 'created') } let!(:first_pipeline) do
let!(:other_pipeline) { project.ci_pipelines.create!(source: :push, sha: commit.id, ref: 'master', status: 'created') } project.ci_pipelines.build(source: :push, sha: commit.id, ref: 'master', status: 'created').tap do |p|
p.ensure_project_iid! # Necessary to avoid cross-database modification error
p.save!
end
end
let!(:other_pipeline) do
project.ci_pipelines.build(source: :push, sha: commit.id, ref: 'master', status: 'created').tap do |p|
p.ensure_project_iid! # Necessary to avoid cross-database modification error
p.save!
end
end
subject do subject do
post api(post_url, developer), params: { post api(post_url, developer), params: {

View File

@ -15,7 +15,7 @@ RSpec.describe 'Query.project.pipeline' do
let(:pipeline) do let(:pipeline) do
pipeline = create(:ci_pipeline, project: project, user: user) pipeline = create(:ci_pipeline, project: project, user: user)
stage = create(:ci_stage_entity, project: project, pipeline: pipeline, name: 'first', position: 1) stage = create(:ci_stage_entity, project: project, pipeline: pipeline, name: 'first', position: 1)
create(:ci_build, stage_id: stage.id, pipeline: pipeline, name: 'my test job') create(:ci_build, stage_id: stage.id, pipeline: pipeline, name: 'my test job', scheduling_type: :stage)
pipeline pipeline
end end
@ -48,7 +48,7 @@ RSpec.describe 'Query.project.pipeline' do
needs { needs {
nodes { #{all_graphql_fields_for('CiBuildNeed')} } nodes { #{all_graphql_fields_for('CiBuildNeed')} }
} }
previousStageJobsAndNeeds { previousStageJobsOrNeeds {
nodes { nodes {
name name
} }
@ -77,68 +77,48 @@ RSpec.describe 'Query.project.pipeline' do
before do before do
build_stage = create(:ci_stage_entity, position: 2, name: 'build', project: project, pipeline: pipeline) build_stage = create(:ci_stage_entity, position: 2, name: 'build', project: project, pipeline: pipeline)
test_stage = create(:ci_stage_entity, position: 3, name: 'test', project: project, pipeline: pipeline) test_stage = create(:ci_stage_entity, position: 3, name: 'test', project: project, pipeline: pipeline)
deploy_stage = create(:ci_stage_entity, position: 4, name: 'deploy', project: project, pipeline: pipeline)
create(:ci_build, pipeline: pipeline, stage_idx: build_stage.position, name: 'docker 1 2', stage: build_stage) create(:ci_build, pipeline: pipeline, name: 'docker 1 2', scheduling_type: :stage, stage: build_stage, stage_idx: build_stage.position)
create(:ci_build, pipeline: pipeline, stage_idx: build_stage.position, name: 'docker 2 2', stage: build_stage) create(:ci_build, pipeline: pipeline, name: 'docker 2 2', stage: build_stage, stage_idx: build_stage.position, scheduling_type: :dag)
create(:ci_build, pipeline: pipeline, stage_idx: test_stage.position, name: 'rspec 1 2', stage: test_stage) create(:ci_build, pipeline: pipeline, name: 'rspec 1 2', scheduling_type: :stage, stage: test_stage, stage_idx: test_stage.position)
test_job = create(:ci_bridge, pipeline: pipeline, stage_idx: test_stage.position, name: 'rspec 2 2', stage: test_stage) test_job = create(:ci_build, pipeline: pipeline, name: 'rspec 2 2', scheduling_type: :dag, stage: test_stage, stage_idx: test_stage.position)
create(:ci_build, pipeline: pipeline, stage_idx: deploy_stage.position, name: 'deploy 1 2', stage: deploy_stage)
deploy_job = create(:ci_build, pipeline: pipeline, stage_idx: deploy_stage.position, name: 'deploy 2 2', stage: deploy_stage)
create(:ci_build_need, build: test_job, name: 'my test job') create(:ci_build_need, build: test_job, name: 'my test job')
create(:ci_build_need, build: deploy_job, name: 'rspec 1 2')
end end
it 'reports the build needs and previous stages with no duplicates', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/346433' do it 'reports the build needs and execution requirements' do
post_graphql(query, current_user: user) post_graphql(query, current_user: user)
expect(jobs_graphql_data).to contain_exactly( expect(jobs_graphql_data).to contain_exactly(
a_hash_including( a_hash_including(
'name' => 'my test job', 'name' => 'my test job',
'needs' => { 'nodes' => [] }, 'needs' => { 'nodes' => [] },
'previousStageJobsAndNeeds' => { 'nodes' => [] } 'previousStageJobsOrNeeds' => { 'nodes' => [] }
), ),
a_hash_including( a_hash_including(
'name' => 'docker 1 2', 'name' => 'docker 1 2',
'needs' => { 'nodes' => [] }, 'needs' => { 'nodes' => [] },
'previousStageJobsAndNeeds' => { 'nodes' => [ 'previousStageJobsOrNeeds' => { 'nodes' => [
{ "name" => "my test job" } { 'name' => 'my test job' }
] } ] }
), ),
a_hash_including( a_hash_including(
'name' => 'docker 2 2', 'name' => 'docker 2 2',
'needs' => { 'nodes' => [] }, 'needs' => { 'nodes' => [] },
'previousStageJobsAndNeeds' => { 'nodes' => [ 'previousStageJobsOrNeeds' => { 'nodes' => [] }
{ "name" => "my test job" }
] }
), ),
a_hash_including( a_hash_including(
'name' => 'rspec 1 2', 'name' => 'rspec 1 2',
'needs' => { 'nodes' => [] }, 'needs' => { 'nodes' => [] },
'previousStageJobsAndNeeds' => { 'nodes' => [ 'previousStageJobsOrNeeds' => { 'nodes' => [
{ "name" => "docker 1 2" }, { "name" => "docker 2 2" } { 'name' => 'docker 1 2' }, { 'name' => 'docker 2 2' }
] } ] }
), ),
a_hash_including( a_hash_including(
'name' => 'rspec 2 2', 'name' => 'rspec 2 2',
'needs' => { 'nodes' => [a_hash_including('name' => 'my test job')] }, 'needs' => { 'nodes' => [a_hash_including('name' => 'my test job')] },
'previousStageJobsAndNeeds' => { 'nodes' => [ 'previousStageJobsOrNeeds' => { 'nodes' => [
{ "name" => "docker 1 2" }, { "name" => "docker 2 2" }, { "name" => "my test job" } { 'name' => 'my test job' }
] }
),
a_hash_including(
'name' => 'deploy 1 2',
'needs' => { 'nodes' => [] },
'previousStageJobsAndNeeds' => { 'nodes' => [
{ "name" => "rspec 1 2" }, { "name" => "rspec 2 2" }
] }
),
a_hash_including(
'name' => 'deploy 2 2',
'needs' => { 'nodes' => [a_hash_including('name' => 'rspec 1 2')] },
'previousStageJobsAndNeeds' => { 'nodes' => [
{ "name" => "rspec 1 2" }, { "name" => "rspec 2 2" }
] } ] }
) )
) )

View File

@ -46,7 +46,6 @@
- "./spec/models/ci/group_variable_spec.rb" - "./spec/models/ci/group_variable_spec.rb"
- "./spec/models/ci/job_artifact_spec.rb" - "./spec/models/ci/job_artifact_spec.rb"
- "./spec/models/ci/job_variable_spec.rb" - "./spec/models/ci/job_variable_spec.rb"
- "./spec/models/ci/pipeline_spec.rb"
- "./spec/models/ci/runner_spec.rb" - "./spec/models/ci/runner_spec.rb"
- "./spec/models/ci/variable_spec.rb" - "./spec/models/ci/variable_spec.rb"
- "./spec/models/clusters/applications/runner_spec.rb" - "./spec/models/clusters/applications/runner_spec.rb"
@ -63,7 +62,6 @@
- "./spec/models/user_status_spec.rb" - "./spec/models/user_status_spec.rb"
- "./spec/requests/api/ci/pipeline_schedules_spec.rb" - "./spec/requests/api/ci/pipeline_schedules_spec.rb"
- "./spec/requests/api/ci/pipelines_spec.rb" - "./spec/requests/api/ci/pipelines_spec.rb"
- "./spec/requests/api/commit_statuses_spec.rb"
- "./spec/requests/api/commits_spec.rb" - "./spec/requests/api/commits_spec.rb"
- "./spec/requests/api/graphql/mutations/ci/pipeline_destroy_spec.rb" - "./spec/requests/api/graphql/mutations/ci/pipeline_destroy_spec.rb"
- "./spec/requests/api/resource_access_tokens_spec.rb" - "./spec/requests/api/resource_access_tokens_spec.rb"

View File

@ -80,15 +80,22 @@ RSpec.shared_examples 'AtomicInternalId' do |validate_presence: true|
it 'calls InternalId.generate_next and sets internal id attribute' do it 'calls InternalId.generate_next and sets internal id attribute' do
iid = rand(1..1000) iid = rand(1..1000)
expect(InternalId).to receive(:generate_next).with(instance, scope_attrs, usage, any_args).and_return(iid) # Need to do this before evaluating instance otherwise it gets set
# already in factory
allow(InternalId).to receive(:generate_next).and_return(iid)
subject subject
expect(read_internal_id).to eq(iid) expect(read_internal_id).to eq(iid)
expect(InternalId).to have_received(:generate_next).with(instance, scope_attrs, usage, any_args)
end end
it 'does not overwrite an existing internal id' do it 'does not overwrite an existing internal id' do
write_internal_id(4711) write_internal_id(4711)
expect { subject }.not_to change { read_internal_id } allow_cross_database_modification_within_transaction(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/347091') do
expect { subject }.not_to change { read_internal_id }
end
end end
context 'when the instance has an internal ID set' do context 'when the instance has an internal ID set' do
@ -101,6 +108,7 @@ RSpec.shared_examples 'AtomicInternalId' do |validate_presence: true|
.to receive(:track_greatest) .to receive(:track_greatest)
.with(instance, scope_attrs, usage, internal_id, any_args) .with(instance, scope_attrs, usage, internal_id, any_args)
.and_return(internal_id) .and_return(internal_id)
subject subject
end end
end end
@ -110,7 +118,11 @@ RSpec.shared_examples 'AtomicInternalId' do |validate_presence: true|
context 'when the internal id has been changed' do context 'when the internal id has been changed' do
context 'when the internal id is automatically set' do context 'when the internal id is automatically set' do
it 'clears it on the instance' do it 'clears it on the instance' do
expect_iid_to_be_set_and_rollback write_internal_id(nil)
allow_cross_database_modification_within_transaction(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/347091') do
expect_iid_to_be_set_and_rollback
end
expect(read_internal_id).to be_nil expect(read_internal_id).to be_nil
end end
@ -120,7 +132,9 @@ RSpec.shared_examples 'AtomicInternalId' do |validate_presence: true|
it 'does not clear it on the instance' do it 'does not clear it on the instance' do
write_internal_id(100) write_internal_id(100)
expect_iid_to_be_set_and_rollback allow_cross_database_modification_within_transaction(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/347091') do
expect_iid_to_be_set_and_rollback
end
expect(read_internal_id).not_to be_nil expect(read_internal_id).not_to be_nil
end end

View File

@ -3,7 +3,7 @@
require 'rspec-parameterized' require 'rspec-parameterized'
require 'gitlab-dangerfiles' require 'gitlab-dangerfiles'
require 'danger' require 'danger'
require 'danger/plugins/helper' require 'danger/plugins/internal/helper'
require 'gitlab/dangerfiles/spec_helper' require 'gitlab/dangerfiles/spec_helper'
require_relative '../../../danger/plugins/project_helper' require_relative '../../../danger/plugins/project_helper'
@ -20,22 +20,7 @@ RSpec.describe Tooling::Danger::ProjectHelper do
before do before do
allow(project_helper).to receive(:helper).and_return(fake_helper) allow(project_helper).to receive(:helper).and_return(fake_helper)
end allow(fake_helper).to receive(:config).and_return(double(files_to_category: described_class::CATEGORIES))
describe '#changes' do
it 'returns an array of Change objects' do
expect(project_helper.changes).to all(be_an(Gitlab::Dangerfiles::Change))
end
it 'groups changes by change type' do
changes = project_helper.changes
expect(changes.added.files).to eq(added_files)
expect(changes.modified.files).to eq(modified_files)
expect(changes.deleted.files).to eq(deleted_files)
expect(changes.renamed_before.files).to eq([renamed_before_file])
expect(changes.renamed_after.files).to eq([renamed_after_file])
end
end end
describe '#categories_for_file' do describe '#categories_for_file' do
@ -247,7 +232,7 @@ RSpec.describe Tooling::Danger::ProjectHelper do
end end
with_them do with_them do
subject { project_helper.categories_for_file(path) } subject { project_helper.helper.categories_for_file(path) }
it { is_expected.to eq(expected_categories) } it { is_expected.to eq(expected_categories) }
end end
@ -275,7 +260,7 @@ RSpec.describe Tooling::Danger::ProjectHelper do
changed_files.each do |file| changed_files.each do |file|
allow(fake_git).to receive(:diff_for_file).with(file) { double(:diff, patch: patch) } allow(fake_git).to receive(:diff_for_file).with(file) { double(:diff, patch: patch) }
expect(project_helper.categories_for_file(file)).to eq(expected_categories) expect(project_helper.helper.categories_for_file(file)).to eq(expected_categories)
end end
end end
end end
@ -321,93 +306,13 @@ RSpec.describe Tooling::Danger::ProjectHelper do
it 'returns all changed files starting with ee/' do it 'returns all changed files starting with ee/' do
changes = double changes = double
expect(project_helper).to receive(:changes).and_return(changes) expect(fake_helper).to receive(:changes).and_return(changes)
expect(changes).to receive(:files).and_return(%w[fr/ee/beer.rb ee/wine.rb ee/lib/ido.rb ee.k]) expect(changes).to receive(:files).and_return(%w[fr/ee/beer.rb ee/wine.rb ee/lib/ido.rb ee.k])
is_expected.to match_array(%w[ee/wine.rb ee/lib/ido.rb]) is_expected.to match_array(%w[ee/wine.rb ee/lib/ido.rb])
end end
end end
describe '#project_name' do
subject { project_helper.project_name }
it 'returns gitlab if ee? returns true' do
expect(project_helper).to receive(:ee?) { true }
is_expected.to eq('gitlab')
end
it 'returns gitlab-ce if ee? returns false' do
expect(project_helper).to receive(:ee?) { false }
is_expected.to eq('gitlab-foss')
end
end
describe '#ee?' do
subject { project_helper.__send__(:ee?) }
let(:ee_dir) { File.expand_path('../../../ee', __dir__) }
context 'when ENV["CI_PROJECT_NAME"] is set' do
before do
stub_env('CI_PROJECT_NAME', ci_project_name)
end
context 'when ENV["CI_PROJECT_NAME"] is gitlab' do
let(:ci_project_name) { 'gitlab' }
it 'returns true' do
is_expected.to eq(true)
end
end
context 'when ENV["CI_PROJECT_NAME"] is gitlab-ee' do
let(:ci_project_name) { 'gitlab-ee' }
it 'returns true' do
is_expected.to eq(true)
end
end
context 'when ENV["CI_PROJECT_NAME"] is gitlab-foss' do
let(:ci_project_name) { 'gitlab-foss' }
it 'resolves to Dir.exist?' do
expected = Dir.exist?(ee_dir)
expect(Dir).to receive(:exist?).with(ee_dir).and_call_original
is_expected.to eq(expected)
end
end
end
context 'when ENV["CI_PROJECT_NAME"] is absent' do
before do
stub_env('CI_PROJECT_NAME', nil)
expect(Dir).to receive(:exist?).with(ee_dir).and_return(has_ee_dir)
end
context 'when ee/ directory exists' do
let(:has_ee_dir) { true }
it 'returns true' do
is_expected.to eq(true)
end
end
context 'when ee/ directory does not exist' do
let(:has_ee_dir) { false }
it 'returns false' do
is_expected.to eq(false)
end
end
end
end
describe '#file_lines' do describe '#file_lines' do
let(:filename) { 'spec/foo_spec.rb' } let(:filename) { 'spec/foo_spec.rb' }
let(:file_spy) { spy } let(:file_spy) { spy }

View File

@ -3,7 +3,7 @@
require 'rspec-parameterized' require 'rspec-parameterized'
require 'gitlab-dangerfiles' require 'gitlab-dangerfiles'
require 'danger' require 'danger'
require 'danger/plugins/helper' require 'danger/plugins/internal/helper'
require 'gitlab/dangerfiles/spec_helper' require 'gitlab/dangerfiles/spec_helper'
require_relative '../../../tooling/danger/specs' require_relative '../../../tooling/danger/specs'

View File

@ -4,7 +4,7 @@ require 'spec_helper'
RSpec.describe 'shared/ssh_keys/_key_delete.html.haml' do RSpec.describe 'shared/ssh_keys/_key_delete.html.haml' do
context 'when the text parameter is used' do context 'when the text parameter is used' do
it 'has text' do it 'has text' do
render 'shared/ssh_keys/key_delete.html.haml', text: 'Button', html_class: '', button_data: '' render partial: 'shared/ssh_keys/key_delete', formats: :html, locals: { text: 'Button', html_class: '', button_data: '' }
expect(rendered).to have_button('Button') expect(rendered).to have_button('Button')
end end
@ -12,7 +12,7 @@ RSpec.describe 'shared/ssh_keys/_key_delete.html.haml' do
context 'when the text parameter is not used' do context 'when the text parameter is not used' do
it 'does not have text' do it 'does not have text' do
render 'shared/ssh_keys/key_delete.html.haml', html_class: '', button_data: '' render partial: 'shared/ssh_keys/key_delete', formats: :html, locals: { html_class: '', button_data: '' }
expect(rendered).to have_button('Delete') expect(rendered).to have_button('Delete')
end end

View File

@ -159,8 +159,8 @@ module Tooling
def required_reasons def required_reasons
[].tap do |reasons| [].tap do |reasons|
reasons << :db_changes if project_helper.changes.added.has_category?(:migration) reasons << :db_changes if helper.changes.added.has_category?(:migration)
reasons << :feature_flag_removed if project_helper.changes.deleted.has_category?(:feature_flag) reasons << :feature_flag_removed if helper.changes.deleted.has_category?(:feature_flag)
end end
end end
@ -221,7 +221,7 @@ module Tooling
end end
def categories_need_changelog? def categories_need_changelog?
(project_helper.changes.categories - NO_CHANGELOG_CATEGORIES).any? (helper.changes.categories - NO_CHANGELOG_CATEGORIES).any?
end end
def mr_without_no_changelog_label? def mr_without_no_changelog_label?

View File

@ -176,18 +176,6 @@ module Tooling
%r{\.js\z} => :frontend %r{\.js\z} => :frontend
}.freeze }.freeze
def changes_by_category
helper.changes_by_category(CATEGORIES)
end
def changes
helper.changes(CATEGORIES)
end
def categories_for_file(file)
helper.categories_for_file(file, CATEGORIES)
end
def local_warning_message def local_warning_message
"#{MESSAGE_PREFIX} Only the following Danger rules can be run locally: #{LOCAL_RULES.join(', ')}" "#{MESSAGE_PREFIX} Only the following Danger rules can be run locally: #{LOCAL_RULES.join(', ')}"
end end
@ -203,11 +191,7 @@ module Tooling
end end
def all_ee_changes def all_ee_changes
changes.files.grep(%r{\Aee/}) helper.changes.files.grep(%r{\Aee/})
end
def project_name
ee? ? 'gitlab' : 'gitlab-foss'
end end
def file_lines(filename) def file_lines(filename)
@ -223,11 +207,6 @@ module Tooling
def read_file(filename) def read_file(filename)
File.read(filename) File.read(filename)
end end
def ee?
# Support former project name for `dev` and support local Danger run
%w[gitlab gitlab-ee].include?(ENV['CI_PROJECT_NAME']) || Dir.exist?(File.expand_path('../../ee', __dir__))
end
end end
end end
end end