diff options
40 files changed, 196 insertions, 99 deletions
diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml index 4ed9ac03d0c..142f0e1c9d4 100644 --- a/.gitlab/ci/review.gitlab-ci.yml +++ b/.gitlab/ci/review.gitlab-ci.yml @@ -94,10 +94,7 @@ schedule:review-build-cng: variables: HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}" DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}" - # v2.4.4 + two improvements: - # - Allow to pass an EE license when installing the chart: https://gitlab.com/gitlab-org/charts/gitlab/merge_requests/1008 - # - Allow to customize the livenessProbe for `gitlab-shell`: https://gitlab.com/gitlab-org/charts/gitlab/merge_requests/1021 - GITLAB_HELM_CHART_REF: "6c655ed77e60f1f7f533afb97bef8c9cb7dc61eb" + GITLAB_HELM_CHART_REF: "v2.5.1" GITLAB_EDITION: "ce" environment: name: review/${CI_COMMIT_REF_NAME} @@ -135,13 +132,11 @@ review-deploy: - .review-deploy-base - .only-review - .only:changes-code-qa - needs: ["review-build-cng"] schedule:review-deploy: extends: - .review-deploy-base - .only-review-schedules - needs: ["schedule:review-build-cng"] .base-review-stop: extends: diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 5e3a4256626..dc87e8af82f 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -1.73.0 +1.74.0 @@ -1 +1 @@ -12.5.0-pre +12.6.0-pre diff --git a/app/assets/javascripts/boards/index.js b/app/assets/javascripts/boards/index.js index e76e2341dfd..7f69c093902 100644 --- a/app/assets/javascripts/boards/index.js +++ b/app/assets/javascripts/boards/index.js @@ -16,7 +16,6 @@ import '~/boards/models/project'; import store from '~/boards/stores'; import boardsStore from '~/boards/stores/boards_store'; import ModalStore from '~/boards/stores/modal_store'; -import BoardService from 'ee_else_ce/boards/services/board_service'; import modalMixin from '~/boards/mixins/modal_mixins'; import '~/boards/filters/due_date_filters'; import Board from 'ee_else_ce/boards/components/board'; @@ -97,7 +96,6 @@ export default () => { bulkUpdatePath: this.bulkUpdatePath, boardId: this.boardId, }); - gl.boardService = new BoardService(); boardsStore.rootPath = this.boardsEndpoint; eventHub.$on('updateTokens', this.updateTokens); @@ -116,7 +114,7 @@ export default () => { this.filterManager.setup(); boardsStore.disabled = this.disabled; - gl.boardService + boardsStore .all() .then(res => res.data) .then(lists => { @@ -155,7 +153,8 @@ export default () => { newIssue.setFetchingState('subscriptions', true); setWeigthFetchingState(newIssue, true); setEpicFetchingState(newIssue, true); - BoardService.getIssueInfo(sidebarInfoEndpoint) + boardsStore + .getIssueInfo(sidebarInfoEndpoint) .then(res => res.data) .then(data => { const { @@ -211,7 +210,8 @@ export default () => { const { issue } = boardsStore.detail; if (issue.id === id && issue.toggleSubscriptionEndpoint) { issue.setFetchingState('subscriptions', true); - BoardService.toggleIssueSubscription(issue.toggleSubscriptionEndpoint) + boardsStore + .toggleIssueSubscription(issue.toggleSubscriptionEndpoint) .then(() => { issue.setFetchingState('subscriptions', false); issue.updateData({ diff --git a/app/assets/javascripts/monitoring/components/panel_type.vue b/app/assets/javascripts/monitoring/components/panel_type.vue index cafb4b0b479..effcf334cbc 100644 --- a/app/assets/javascripts/monitoring/components/panel_type.vue +++ b/app/assets/javascripts/monitoring/components/panel_type.vue @@ -126,7 +126,7 @@ export default { /> <gl-dropdown v-gl-tooltip - class="mx-2" + class="ml-auto mx-3" toggle-class="btn btn-transparent border-0" :right="true" :no-caret="true" diff --git a/app/assets/javascripts/repository/log_tree.js b/app/assets/javascripts/repository/log_tree.js index 5bf30e625a0..f97afac85b4 100644 --- a/app/assets/javascripts/repository/log_tree.js +++ b/app/assets/javascripts/repository/log_tree.js @@ -7,8 +7,8 @@ import getRef from './queries/getRef.query.graphql'; let fetchpromise; let resolvers = []; -export function resolveCommit(commits, { resolve, entry }) { - const commit = commits.find(c => c.fileName === entry.name && c.type === entry.type); +export function resolveCommit(commits, path, { resolve, entry }) { + const commit = commits.find(c => c.filePath === `${path}/${entry.name}` && c.type === entry.type); if (commit) { resolve(commit); @@ -35,13 +35,13 @@ export function fetchLogsTree(client, path, offset, resolver = null) { .then(({ data, headers }) => { const headerLogsOffset = headers['more-logs-offset']; const { commits } = client.readQuery({ query: getCommits }); - const newCommitData = [...commits, ...normalizeData(data)]; + const newCommitData = [...commits, ...normalizeData(data, path)]; client.writeQuery({ query: getCommits, data: { commits: newCommitData }, }); - resolvers.forEach(r => resolveCommit(newCommitData, r)); + resolvers.forEach(r => resolveCommit(newCommitData, path, r)); fetchpromise = null; diff --git a/app/assets/javascripts/repository/utils/commit.js b/app/assets/javascripts/repository/utils/commit.js index 6c204b57b37..3973798605d 100644 --- a/app/assets/javascripts/repository/utils/commit.js +++ b/app/assets/javascripts/repository/utils/commit.js @@ -1,11 +1,12 @@ // eslint-disable-next-line import/prefer-default-export -export function normalizeData(data, extra = () => {}) { +export function normalizeData(data, path, extra = () => {}) { return data.map(d => ({ sha: d.commit.id, message: d.commit.message, committedDate: d.commit.committed_date, commitPath: d.commit_path, fileName: d.file_name, + filePath: `${path}/${d.file_name}`, type: d.type, __typename: 'LogTreeCommit', ...extra(d), diff --git a/app/graphql/types/issuable_sort_enum.rb b/app/graphql/types/issuable_sort_enum.rb index 932e90c2d22..9fb1249d582 100644 --- a/app/graphql/types/issuable_sort_enum.rb +++ b/app/graphql/types/issuable_sort_enum.rb @@ -1,10 +1,8 @@ # frozen_string_literal: true module Types - # rubocop: disable Graphql/AuthorizeTypes class IssuableSortEnum < SortEnum graphql_name 'IssuableSort' description 'Values for sorting issuables' end - # rubocop: enable Graphql/AuthorizeTypes end diff --git a/app/graphql/types/issue_sort_enum.rb b/app/graphql/types/issue_sort_enum.rb index 4be7260e0b1..c8d8f3ef079 100644 --- a/app/graphql/types/issue_sort_enum.rb +++ b/app/graphql/types/issue_sort_enum.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true module Types - # rubocop: disable Graphql/AuthorizeTypes class IssueSortEnum < IssuableSortEnum graphql_name 'IssueSort' description 'Values for sorting issues' @@ -10,7 +9,6 @@ module Types value 'DUE_DATE_DESC', 'Due date by descending order', value: 'due_date_desc' value 'RELATIVE_POSITION_ASC', 'Relative position by ascending order', value: 'relative_position_asc' end - # rubocop: enable Graphql/AuthorizeTypes end Types::IssueSortEnum.prepend_if_ee('::EE::Types::IssueSortEnum') diff --git a/app/graphql/types/issue_state_enum.rb b/app/graphql/types/issue_state_enum.rb index 70c34fbe491..6521407fc9d 100644 --- a/app/graphql/types/issue_state_enum.rb +++ b/app/graphql/types/issue_state_enum.rb @@ -1,11 +1,8 @@ # frozen_string_literal: true module Types - # rubocop: disable Graphql/AuthorizeTypes - # This is a BaseEnum through IssuableEnum, so it does not need authorization class IssueStateEnum < IssuableStateEnum graphql_name 'IssueState' description 'State of a GitLab issue' end - # rubocop: enable Graphql/AuthorizeTypes end diff --git a/app/graphql/types/merge_request_state_enum.rb b/app/graphql/types/merge_request_state_enum.rb index 37c890a3c8d..92f52726ab3 100644 --- a/app/graphql/types/merge_request_state_enum.rb +++ b/app/graphql/types/merge_request_state_enum.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true module Types - # rubocop: disable Graphql/AuthorizeTypes - # This is a BaseEnum through IssuableEnum, so it does not need authorization class MergeRequestStateEnum < IssuableStateEnum graphql_name 'MergeRequestState' description 'State of a GitLab merge request' value 'merged' end - # rubocop: enable Graphql/AuthorizeTypes end diff --git a/app/helpers/git_helper.rb b/app/helpers/git_helper.rb index 5edc6dcf454..03b71522b84 100644 --- a/app/helpers/git_helper.rb +++ b/app/helpers/git_helper.rb @@ -1,8 +1,10 @@ # frozen_string_literal: true module GitHelper - def strip_gpg_signature(text) + def strip_signature(text) text.gsub(/-----BEGIN PGP SIGNATURE-----(.*)-----END PGP SIGNATURE-----/m, "") + text.gsub(/-----BEGIN PGP MESSAGE-----(.*)-----END PGP MESSAGE-----/m, "") + text.gsub(/-----BEGIN SIGNED MESSAGE-----(.*)-----END SIGNED MESSAGE-----/m, "") end def short_sha(text) diff --git a/app/views/projects/tags/_tag.atom.builder b/app/views/projects/tags/_tag.atom.builder index 60d4b21b9d1..e4b2428d267 100644 --- a/app/views/projects/tags/_tag.atom.builder +++ b/app/views/projects/tags/_tag.atom.builder @@ -7,7 +7,7 @@ if commit xml.id tag_url xml.link href: tag_url xml.title truncate(tag.name, length: 80) - xml.summary strip_gpg_signature(tag.message) + xml.summary strip_signature(tag.message) xml.content markdown_field(release, :description), type: 'html' xml.updated release.updated_at.xmlschema if release xml.media :thumbnail, width: '40', height: '40', url: image_url(avatar_icon_for_email(commit.author_email)) diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml index c7bd0262c54..b04d484c8a7 100644 --- a/app/views/projects/tags/_tag.html.haml +++ b/app/views/projects/tags/_tag.html.haml @@ -11,7 +11,7 @@ - if tag.message.present? - = strip_gpg_signature(tag.message) + = strip_signature(tag.message) - if commit .block-truncated diff --git a/app/views/projects/tags/show.html.haml b/app/views/projects/tags/show.html.haml index 417cd7a8fee..8086d47479d 100644 --- a/app/views/projects/tags/show.html.haml +++ b/app/views/projects/tags/show.html.haml @@ -1,3 +1,7 @@ +- user = user_email = nil +- if @tag.tagger + - user_email = @tag.tagger.email + - user = User.find_by_any_email(user_email) - add_to_breadcrumbs s_('TagsPage|Tags'), project_tags_path(@project) - breadcrumb_title @tag.name - page_title @tag.name, s_('TagsPage|Tags') @@ -11,6 +15,24 @@ - if protected_tag?(@project, @tag) %span.badge.badge-success = s_('TagsPage|protected') + + - if user + = link_to user_path(user) do + %div + = user_avatar_without_link(user: user, size: 32, css_class: "mt-1 mb-1") + + %div + %strong= user.name + %div= user.to_reference + + - elsif user_email + = mail_to user_email do + %div + = user_avatar_without_link(user_email: user_email, size: 32, css_class: "mt-1 mb-1") + + %div{ :class => "clearfix" } + %strong= user_email + - if @commit = render 'projects/branches/commit', commit: @commit, project: @project - else @@ -33,7 +55,7 @@ - if @tag.message.present? %pre.wrap - = strip_gpg_signature(@tag.message) + = strip_signature(@tag.message) .append-bottom-default.prepend-top-default - if @release.description.present? diff --git a/changelogs/unreleased/11403-add-weight-wip-limit-to-list.yml b/changelogs/unreleased/11403-add-weight-wip-limit-to-list.yml new file mode 100644 index 00000000000..18bb11e5ba1 --- /dev/null +++ b/changelogs/unreleased/11403-add-weight-wip-limit-to-list.yml @@ -0,0 +1,5 @@ +--- +title: Add possibility to save max issue weight on lists +merge_request: 19220 +author: +type: added diff --git a/changelogs/unreleased/Upate-boards-index-js-to-use-boardsStore.yml b/changelogs/unreleased/Upate-boards-index-js-to-use-boardsStore.yml new file mode 100644 index 00000000000..bccf259f312 --- /dev/null +++ b/changelogs/unreleased/Upate-boards-index-js-to-use-boardsStore.yml @@ -0,0 +1,5 @@ +--- +title: Removed all references of BoardService +merge_request: 20144 +author: nuwe1 +type: other diff --git a/changelogs/unreleased/feat-tagger.yml b/changelogs/unreleased/feat-tagger.yml new file mode 100644 index 00000000000..e217c2e1be9 --- /dev/null +++ b/changelogs/unreleased/feat-tagger.yml @@ -0,0 +1,5 @@ +--- +title: add tagger within tag view +merge_request: 19681 +author: Roger Meier +type: added diff --git a/changelogs/unreleased/gitaly-version-v1.74.0.yml b/changelogs/unreleased/gitaly-version-v1.74.0.yml new file mode 100644 index 00000000000..bad7ed8fddb --- /dev/null +++ b/changelogs/unreleased/gitaly-version-v1.74.0.yml @@ -0,0 +1,5 @@ +--- +title: Upgrade to Gitaly v1.74.0 +merge_request: 20706 +author: +type: changed diff --git a/changelogs/unreleased/jivanvl-fix-alignment-options-dropdown-graph.yml b/changelogs/unreleased/jivanvl-fix-alignment-options-dropdown-graph.yml new file mode 100644 index 00000000000..cff03023b4c --- /dev/null +++ b/changelogs/unreleased/jivanvl-fix-alignment-options-dropdown-graph.yml @@ -0,0 +1,5 @@ +--- +title: Fix dropdown location on the monitoring charts +merge_request: 20400 +author: +type: fixed diff --git a/db/migrate/20191028130054_add_max_issue_weight_to_list.rb b/db/migrate/20191028130054_add_max_issue_weight_to_list.rb new file mode 100644 index 00000000000..eec7c42c907 --- /dev/null +++ b/db/migrate/20191028130054_add_max_issue_weight_to_list.rb @@ -0,0 +1,17 @@ +# 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 diff --git a/db/schema.rb b/db/schema.rb index 5c22ef8fe4b..b31ed03a34f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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" diff --git a/doc/api/boards.md b/doc/api/boards.md index b9c2a984dc5..9ebe1570a59 100644 --- a/doc/api/boards.md +++ b/doc/api/boards.md @@ -49,7 +49,8 @@ Example response: "description" : null }, "position" : 1, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 }, { "id" : 2, @@ -59,7 +60,8 @@ Example response: "description" : null }, "position" : 2, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 }, { "id" : 3, @@ -69,7 +71,8 @@ Example response: "description" : null }, "position" : 3, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 } ] } @@ -121,7 +124,8 @@ Example response: "description" : null }, "position" : 1, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 }, { "id" : 2, @@ -131,7 +135,8 @@ Example response: "description" : null }, "position" : 2, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 }, { "id" : 3, @@ -141,7 +146,8 @@ Example response: "description" : null }, "position" : 3, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 } ] } @@ -192,7 +198,8 @@ Example response: "description" : null }, "position" : 1, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 }, { "id" : 2, @@ -202,7 +209,8 @@ Example response: "description" : null }, "position" : 2, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 }, { "id" : 3, @@ -212,7 +220,8 @@ Example response: "description" : null }, "position" : 3, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 } ] } @@ -346,7 +355,8 @@ Example response: "description" : null }, "position" : 1, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 }, { "id" : 2, @@ -356,7 +366,8 @@ Example response: "description" : null }, "position" : 2, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 }, { "id" : 3, @@ -366,7 +377,8 @@ Example response: "description" : null }, "position" : 3, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 } ] ``` @@ -400,7 +412,8 @@ Example response: "description" : null }, "position" : 1, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 } ``` @@ -441,7 +454,8 @@ Example response: "description" : null }, "position" : 1, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 } ``` @@ -475,7 +489,8 @@ Example response: "description" : null }, "position" : 1, - "max_issue_count": 0 + "max_issue_count": 0, + "max_issue_weight": 0 } ``` diff --git a/doc/development/code_review.md b/doc/development/code_review.md index 77c57bb332d..326ac7b3a37 100644 --- a/doc/development/code_review.md +++ b/doc/development/code_review.md @@ -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 diff --git a/doc/development/pipelines.md b/doc/development/pipelines.md index 764bd68000d..7ec76f61e42 100644 --- a/doc/development/pipelines.md +++ b/doc/development/pipelines.md @@ -191,8 +191,8 @@ subgraph "`review-prepare` stage" end subgraph "`review` stage" - G --> |needs| E; - G2 --> |needs| E; + G + G2 end subgraph "`qa` stage" diff --git a/doc/development/testing_guide/review_apps.md b/doc/development/testing_guide/review_apps.md index ecfcbc731e1..eddfb561748 100644 --- a/doc/development/testing_guide/review_apps.md +++ b/doc/development/testing_guide/review_apps.md @@ -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/) diff --git a/lib/gitlab/git/tag.rb b/lib/gitlab/git/tag.rb index 23d989ff258..0218f6e6232 100644 --- a/lib/gitlab/git/tag.rb +++ b/lib/gitlab/git/tag.rb @@ -62,6 +62,10 @@ module Gitlab encode! @message end + def tagger + @raw_tag.tagger + end + private def message_from_gitaly_tag diff --git a/lib/gitlab/graphql/connections/keyset/connection.rb b/lib/gitlab/graphql/connections/keyset/connection.rb index c75ea206edb..e42a705a78a 100644 --- a/lib/gitlab/graphql/connections/keyset/connection.rb +++ b/lib/gitlab/graphql/connections/keyset/connection.rb @@ -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 diff --git a/package.json b/package.json index 38dd30ee438..e5f36099833 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/rubocop/cop/graphql/authorize_types.rb b/rubocop/cop/graphql/authorize_types.rb index c69ce10f1c5..7aaa9299362 100644 --- a/rubocop/cop/graphql/authorize_types.rb +++ b/rubocop/cop/graphql/authorize_types.rb @@ -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 diff --git a/scripts/review_apps/review-apps.sh b/scripts/review_apps/review-apps.sh index be8d5296104..79f44e1c5d0 100755 --- a/scripts/review_apps/review-apps.sh +++ b/scripts/review_apps/review-apps.sh @@ -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" \ @@ -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 @@ -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 \ diff --git a/spec/factories/lists.rb b/spec/factories/lists.rb index eb6f0f27917..cf00351b231 100644 --- a/spec/factories/lists.rb +++ b/spec/factories/lists.rb @@ -6,6 +6,7 @@ FactoryBot.define do label list_type { :label } max_issue_count { 0 } + max_issue_weight { 0 } sequence(:position) end diff --git a/spec/fixtures/api/schemas/list.json b/spec/fixtures/api/schemas/list.json index 7603892e198..760dcb96252 100644 --- a/spec/fixtures/api/schemas/list.json +++ b/spec/fixtures/api/schemas/list.json @@ -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 } diff --git a/spec/fixtures/api/schemas/public_api/v4/board.json b/spec/fixtures/api/schemas/public_api/v4/board.json index 8dc3999baa2..e4933ee0b93 100644 --- a/spec/fixtures/api/schemas/public_api/v4/board.json +++ b/spec/fixtures/api/schemas/public_api/v4/board.json @@ -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 } diff --git a/spec/frontend/repository/log_tree_spec.js b/spec/frontend/repository/log_tree_spec.js index 9199c726680..4271a038680 100644 --- a/spec/frontend/repository/log_tree_spec.js +++ b/spec/frontend/repository/log_tree_spec.js @@ -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', + }); }); }); @@ -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', @@ -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', diff --git a/spec/frontend/repository/utils/commit_spec.js b/spec/frontend/repository/utils/commit_spec.js index 2d75358106c..e7cc28178bf 100644 --- a/spec/frontend/repository/utils/commit_spec.js +++ b/spec/frontend/repository/utils/commit_spec.js @@ -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', }, diff --git a/spec/lib/gitlab/graphql/connections/keyset/connection_spec.rb b/spec/lib/gitlab/graphql/connections/keyset/connection_spec.rb index 9dda2a41ec6..36955019863 100644 --- a/spec/lib/gitlab/graphql/connections/keyset/connection_spec.rb +++ b/spec/lib/gitlab/graphql/connections/keyset/connection_spec.rb @@ -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 diff --git a/spec/lib/gitlab/import_export/safe_model_attributes.yml b/spec/lib/gitlab/import_export/safe_model_attributes.yml index e707d95bea4..704d0184cf1 100644 --- a/spec/lib/gitlab/import_export/safe_model_attributes.yml +++ b/spec/lib/gitlab/import_export/safe_model_attributes.yml @@ -728,6 +728,7 @@ List: - milestone_id - user_id - max_issue_count +- max_issue_weight ExternalPullRequest: - id - created_at diff --git a/spec/rubocop/cop/graphql/authorize_types_spec.rb b/spec/rubocop/cop/graphql/authorize_types_spec.rb index af4315ecd34..98797a780e0 100644 --- a/spec/rubocop/cop/graphql/authorize_types_spec.rb +++ b/spec/rubocop/cop/graphql/authorize_types_spec.rb @@ -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 diff --git a/yarn.lock b/yarn.lock index f6565af4cad..9414587c3a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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= @@ -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= @@ -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== @@ -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== |