Skip to content
Snippets Groups Projects
Commit 8f1f6b37 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent dbd50b6e
No related branches found
No related tags found
No related merge requests found
Showing
with 128 additions and 66 deletions
# frozen_string_literal: true
class AddMaxIssueWeightToList < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
DOWNTIME = false
def up
add_column_with_default :lists, :max_issue_weight, :integer, default: 0
end
def down
remove_column :lists, :max_issue_weight
end
end
Loading
Loading
@@ -2251,6 +2251,7 @@ ActiveRecord::Schema.define(version: 2019_11_19_023952) do
t.integer "user_id"
t.integer "milestone_id"
t.integer "max_issue_count", default: 0, null: false
t.integer "max_issue_weight", default: 0, null: false
t.index ["board_id", "label_id"], name: "index_lists_on_board_id_and_label_id", unique: true
t.index ["label_id"], name: "index_lists_on_label_id"
t.index ["list_type"], name: "index_lists_on_list_type"
Loading
Loading
Loading
Loading
@@ -49,7 +49,8 @@ Example response:
"description" : null
},
"position" : 1,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
},
{
"id" : 2,
Loading
Loading
@@ -59,7 +60,8 @@ Example response:
"description" : null
},
"position" : 2,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
},
{
"id" : 3,
Loading
Loading
@@ -69,7 +71,8 @@ Example response:
"description" : null
},
"position" : 3,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
}
]
}
Loading
Loading
@@ -121,7 +124,8 @@ Example response:
"description" : null
},
"position" : 1,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
},
{
"id" : 2,
Loading
Loading
@@ -131,7 +135,8 @@ Example response:
"description" : null
},
"position" : 2,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
},
{
"id" : 3,
Loading
Loading
@@ -141,7 +146,8 @@ Example response:
"description" : null
},
"position" : 3,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
}
]
}
Loading
Loading
@@ -192,7 +198,8 @@ Example response:
"description" : null
},
"position" : 1,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
},
{
"id" : 2,
Loading
Loading
@@ -202,7 +209,8 @@ Example response:
"description" : null
},
"position" : 2,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
},
{
"id" : 3,
Loading
Loading
@@ -212,7 +220,8 @@ Example response:
"description" : null
},
"position" : 3,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
}
]
}
Loading
Loading
@@ -346,7 +355,8 @@ Example response:
"description" : null
},
"position" : 1,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
},
{
"id" : 2,
Loading
Loading
@@ -356,7 +366,8 @@ Example response:
"description" : null
},
"position" : 2,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
},
{
"id" : 3,
Loading
Loading
@@ -366,7 +377,8 @@ Example response:
"description" : null
},
"position" : 3,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
}
]
```
Loading
Loading
@@ -400,7 +412,8 @@ Example response:
"description" : null
},
"position" : 1,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
}
```
 
Loading
Loading
@@ -441,7 +454,8 @@ Example response:
"description" : null
},
"position" : 1,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
}
```
 
Loading
Loading
@@ -475,7 +489,8 @@ Example response:
"description" : null
},
"position" : 1,
"max_issue_count": 0
"max_issue_count": 0,
"max_issue_weight": 0
}
```
 
Loading
Loading
Loading
Loading
@@ -181,6 +181,10 @@ vulnerabilities must be either empty or containing:
Maintainers should **never** dismiss vulnerabilities to "empty" the list,
without duly verifying them.
 
Note that certain Merge Requests may target a stable branch. These are rare
events. These types of Merge Requests cannot be merged by the Maintainer.
Instead these should be sent to the [Release Manager](https://about.gitlab.com/community/release-managers/).
## Best practices
 
### Everyone
Loading
Loading
Loading
Loading
@@ -191,8 +191,8 @@ subgraph "`review-prepare` stage"
end
 
subgraph "`review` stage"
G --> |needs| E;
G2 --> |needs| E;
G
G2
end
 
subgraph "`qa` stage"
Loading
Loading
Loading
Loading
@@ -129,6 +129,10 @@ two node pools:
 
### Helm/Tiller
 
The Helm/Tiller version used is defined in the
[`registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base` image](https://gitlab.com/gitlab-org/gitlab-build-images/blob/master/Dockerfile.gitlab-charts-build-base#L4)
used by the `review-deploy` and `review-stop` jobs.
The `tiller` deployment (the Helm server) is deployed to a dedicated node pool
that has the `app=helm` label and a specific
[taint](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/)
Loading
Loading
Loading
Loading
@@ -62,6 +62,10 @@ module Gitlab
encode! @message
end
 
def tagger
@raw_tag.tagger
end
private
 
def message_from_gitaly_tag
Loading
Loading
Loading
Loading
@@ -137,14 +137,7 @@ module Gitlab
def ordering_from_encoded_json(cursor)
JSON.parse(decode(cursor))
rescue JSON::ParserError
# for the transition period where a client might request using an
# old style cursor. Once removed, make it an error:
# raise Gitlab::Graphql::Errors::ArgumentError, "Please provide a valid cursor"
# TODO can be removed in next release
# https://gitlab.com/gitlab-org/gitlab/issues/32933
field_name = order_list.first.attribute_name
{ field_name => decode(cursor) }
raise Gitlab::Graphql::Errors::ArgumentError, "Please provide a valid cursor"
end
end
end
Loading
Loading
Loading
Loading
@@ -65,16 +65,8 @@
"cropper": "^2.3.0",
"css-loader": "^1.0.0",
"d3": "^4.13.0",
"d3-array": "^1.2.1",
"d3-axis": "^1.0.8",
"d3-brush": "^1.0.4",
"d3-ease": "^1.0.3",
"d3-scale": "^1.0.7",
"d3-selection": "^1.2.0",
"d3-shape": "^1.2.0",
"d3-time": "^1.0.8",
"d3-time-format": "^2.1.1",
"d3-transition": "^1.1.1",
"dateformat": "^3.0.3",
"deckar01-task_list": "^2.2.1",
"diff": "^3.4.0",
Loading
Loading
Loading
Loading
@@ -34,7 +34,10 @@ module RuboCop
end
 
def whitelisted?(class_node)
return false unless class_node&.const_name
class_const = class_node&.const_name
return false unless class_const
return true if class_const.end_with?('Enum')
 
WHITELISTED_TYPES.any? { |whitelisted| class_node.const_name.include?(whitelisted) }
end
Loading
Loading
Loading
Loading
@@ -141,6 +141,7 @@ function install_tiller() {
--tiller-namespace "${namespace}" \
--wait \
--upgrade \
--force-upgrade \
--node-selectors "app=helm" \
--replicas 3 \
--override "spec.template.spec.tolerations[0].key"="dedicated" \
Loading
Loading
@@ -214,6 +215,21 @@ function create_application_secret() {
--dry-run -o json | kubectl apply -f -
}
 
function label_application_secret() {
local namespace="${KUBE_NAMESPACE}"
local release="${CI_ENVIRONMENT_SLUG}"
echoinfo "Labeling the ${release}-gitlab-initial-root-password and ${release}-gitlab-license secrets in the ${namespace} namespace..." true
kubectl label secret --namespace "${namespace}" \
"${release}-gitlab-initial-root-password" \
release="${release}"
kubectl label secret --namespace "${namespace}" \
"${release}-gitlab-license" \
release="${release}"
}
function download_chart() {
echoinfo "Downloading the GitLab chart..." true
 
Loading
Loading
@@ -254,6 +270,7 @@ function deploy() {
gitlab_workhorse_image_repository="${IMAGE_REPOSITORY}/gitlab-workhorse-${edition}"
 
create_application_secret
label_application_secret
 
HELM_CMD=$(cat << EOF
helm upgrade \
Loading
Loading
Loading
Loading
@@ -6,6 +6,7 @@ FactoryBot.define do
label
list_type { :label }
max_issue_count { 0 }
max_issue_weight { 0 }
sequence(:position)
end
 
Loading
Loading
Loading
Loading
@@ -36,7 +36,8 @@
},
"title": { "type": "string" },
"position": { "type": ["integer", "null"] },
"max_issue_count": { "type": "integer" }
"max_issue_count": { "type": "integer" },
"max_issue_weight": { "type": "integer" }
},
"additionalProperties": true
}
Loading
Loading
@@ -77,7 +77,8 @@
}
},
"position": { "type": ["integer", "null"] },
"max_issue_count": { "type": "integer" }
"max_issue_count": { "type": "integer" },
"max_issue_weight": { "type": "integer" }
},
"additionalProperties": false
}
Loading
Loading
Loading
Loading
@@ -21,11 +21,18 @@ describe('resolveCommit', () => {
entry: { name: 'index.js', type: 'blob' },
resolve: jest.fn(),
};
const commits = [{ fileName: 'index.js', type: 'blob' }];
resolveCommit(commits, resolver);
expect(resolver.resolve).toHaveBeenCalledWith({ fileName: 'index.js', type: 'blob' });
const commits = [
{ fileName: 'index.js', filePath: '/index.js', type: 'blob' },
{ fileName: 'index.js', filePath: '/app/assets/index.js', type: 'blob' },
];
resolveCommit(commits, '', resolver);
expect(resolver.resolve).toHaveBeenCalledWith({
fileName: 'index.js',
filePath: '/index.js',
type: 'blob',
});
});
});
 
Loading
Loading
@@ -84,6 +91,7 @@ describe('fetchLogsTree', () => {
commitPath: 'https://test.com',
committedDate: '2019-01-01',
fileName: 'index.js',
filePath: '/index.js',
message: 'testing message',
sha: '123',
type: 'blob',
Loading
Loading
@@ -101,6 +109,7 @@ describe('fetchLogsTree', () => {
commitPath: 'https://test.com',
committedDate: '2019-01-01',
fileName: 'index.js',
filePath: '/index.js',
message: 'testing message',
sha: '123',
type: 'blob',
Loading
Loading
Loading
Loading
@@ -15,13 +15,14 @@ const mockData = [
 
describe('normalizeData', () => {
it('normalizes data into LogTreeCommit object', () => {
expect(normalizeData(mockData)).toEqual([
expect(normalizeData(mockData, '')).toEqual([
{
sha: '123',
message: 'testing message',
committedDate: '2019-01-01',
commitPath: 'https://test.com',
fileName: 'index.js',
filePath: '/index.js',
type: 'blob',
__typename: 'LogTreeCommit',
},
Loading
Loading
Loading
Loading
@@ -218,23 +218,11 @@ describe Gitlab::Graphql::Connections::Keyset::Connection do
end
end
 
# TODO Enable this as part of below issue
# https://gitlab.com/gitlab-org/gitlab/issues/32933
# context 'when an invalid cursor is provided' do
# let(:arguments) { { before: 'invalidcursor' } }
#
# it 'raises an error' do
# expect { expect(subject.sliced_nodes) }.to raise_error(Gitlab::Graphql::Errors::ArgumentError)
# end
# end
# TODO Remove this as part of below issue
# https://gitlab.com/gitlab-org/gitlab/issues/32933
context 'when an old style cursor is provided' do
let(:arguments) { { before: Base64Bp.urlsafe_encode64(projects[1].id.to_s, padding: false) } }
context 'when an invalid cursor is provided' do
let(:arguments) { { before: Base64Bp.urlsafe_encode64('invalidcursor', padding: false) } }
 
it 'only returns the project before the selected one' do
expect(subject.sliced_nodes).to contain_exactly(projects.first)
it 'raises an error' do
expect { subject.sliced_nodes }.to raise_error(Gitlab::Graphql::Errors::ArgumentError)
end
end
end
Loading
Loading
Loading
Loading
@@ -728,6 +728,7 @@ List:
- milestone_id
- user_id
- max_issue_count
- max_issue_weight
ExternalPullRequest:
- id
- created_at
Loading
Loading
Loading
Loading
@@ -79,5 +79,15 @@ describe RuboCop::Cop::Graphql::AuthorizeTypes do
end
TYPE
end
it 'does not add an offense for Enums' do
expect_no_offenses(<<~TYPE)
module Types
class ATypeEnum < AnotherEnum
field :a_thing
end
end
TYPE
end
end
end
Loading
Loading
@@ -3213,17 +3213,17 @@ cyclist@~0.2.2:
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640"
integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=
 
d3-array@1, d3-array@1.2.1, d3-array@^1.1.1, d3-array@^1.2.0, d3-array@^1.2.1:
d3-array@1, d3-array@1.2.1, d3-array@^1.1.1, d3-array@^1.2.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-1.2.1.tgz#d1ca33de2f6ac31efadb8e050a021d7e2396d5dc"
integrity sha512-CyINJQ0SOUHojDdFDH4JEM0552vCR1utGyLHegJHyYH0JyCpSeTPxi4OBqHMA2jJZq4NH782LtaJWBImqI/HBw==
 
d3-axis@1, d3-axis@1.0.8, d3-axis@^1.0.8:
d3-axis@1, d3-axis@1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-1.0.8.tgz#31a705a0b535e65759de14173a31933137f18efa"
integrity sha1-MacFoLU15ldZ3hQXOjGTMTfxjvo=
 
d3-brush@1, d3-brush@1.0.4, d3-brush@^1.0.4:
d3-brush@1, d3-brush@1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-1.0.4.tgz#00c2f238019f24f6c0a194a26d41a1530ffe7bc4"
integrity sha1-AMLyOAGfJPbAoZSibUGhUw/+e8Q=
Loading
Loading
@@ -3281,7 +3281,7 @@ d3-dsv@1, d3-dsv@1.0.8:
iconv-lite "0.4"
rw "1"
 
d3-ease@1, d3-ease@1.0.3, d3-ease@^1.0.3:
d3-ease@1, d3-ease@1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-1.0.3.tgz#68bfbc349338a380c44d8acc4fbc3304aa2d8c0e"
integrity sha1-aL+8NJM4o4DETYrMT7wzBKotjA4=
Loading
Loading
@@ -3400,21 +3400,21 @@ d3-selection@1, d3-selection@1.3.0, d3-selection@^1.1.0, d3-selection@^1.2.0:
resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-1.3.0.tgz#d53772382d3dc4f7507bfb28bcd2d6aed2a0ad6d"
integrity sha512-qgpUOg9tl5CirdqESUAu0t9MU/t3O9klYfGfyKsXEmhyxyzLpzpeh08gaxBUTQw1uXIOkr/30Ut2YRjSSxlmHA==
 
d3-shape@1, d3-shape@1.2.0, d3-shape@^1.2.0:
d3-shape@1, d3-shape@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.2.0.tgz#45d01538f064bafd05ea3d6d2cb748fd8c41f777"
integrity sha1-RdAVOPBkuv0F6j1tLLdI/YxB93c=
dependencies:
d3-path "1"
 
d3-time-format@2, d3-time-format@2.1.1, d3-time-format@^2.1.1:
d3-time-format@2, d3-time-format@2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-2.1.1.tgz#85b7cdfbc9ffca187f14d3c456ffda268081bb31"
integrity sha512-8kAkymq2WMfzW7e+s/IUNAtN/y3gZXGRrdGfo6R8NKPAA85UBTxZg5E61bR6nLwjPjj4d3zywSQe1CkYLPFyrw==
dependencies:
d3-time "1"
 
d3-time@1, d3-time@1.0.8, d3-time@^1.0.8:
d3-time@1, d3-time@1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.0.8.tgz#dbd2d6007bf416fe67a76d17947b784bffea1e84"
integrity sha512-YRZkNhphZh3KcnBfitvF3c6E0JOFGikHZ4YqD+Lzv83ZHn1/u6yGenRU1m+KAk9J1GnZMnKcrtfvSktlA1DXNQ==
Loading
Loading
@@ -3424,7 +3424,7 @@ d3-timer@1, d3-timer@1.0.7:
resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-1.0.7.tgz#df9650ca587f6c96607ff4e60cc38229e8dd8531"
integrity sha512-vMZXR88XujmG/L5oB96NNKH5lCWwiLM/S2HyyAQLcjWJCloK5shxta4CwOFYLZoY3AWX73v8Lgv4cCAdWtRmOA==
 
d3-transition@1, d3-transition@1.1.1, d3-transition@^1.1.1:
d3-transition@1, d3-transition@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-1.1.1.tgz#d8ef89c3b848735b060e54a39b32aaebaa421039"
integrity sha512-xeg8oggyQ+y5eb4J13iDgKIjUcEfIOZs2BqV/eEmXm2twx80wTzJ4tB4vaZ5BKfz7XsI/DFmQL5me6O27/5ykQ==
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment