diff options
44 files changed, 316 insertions, 208 deletions
diff --git a/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue b/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue index dae89c5f3d9..06ea9188113 100644 --- a/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue +++ b/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue @@ -22,6 +22,7 @@ import httpStatusCodes from '~/lib/utils/http_status'; import { redirectTo } from '~/lib/utils/url_utility'; import { s__, __, n__ } from '~/locale'; import { VARIABLE_TYPE, FILE_TYPE, CONFIG_VARIABLES_TIMEOUT } from '../constants'; +import filterVariables from '../utils/filter_variables'; import RefsDropdown from './refs_dropdown.vue'; const i18n = { @@ -281,20 +282,13 @@ export default { }, createPipeline() { this.submitted = true; - const filteredVariables = this.variables - .filter(({ key, value }) => key !== '' && value !== '') - .map(({ variable_type, key, value }) => ({ - variable_type, - key, - secret_value: value, - })); return axios .post(this.pipelinesPath, { // send shortName as fall back for query params // https://gitlab.com/gitlab-org/gitlab/-/issues/287815 ref: this.refValue.fullName || this.refShortName, - variables_attributes: filteredVariables, + variables_attributes: filterVariables(this.variables), }) .then(({ data }) => { redirectTo(`${this.pipelinesPath}/${data.id}`); diff --git a/app/assets/javascripts/pipeline_new/utils/filter_variables.js b/app/assets/javascripts/pipeline_new/utils/filter_variables.js new file mode 100644 index 00000000000..57ce3d13a9a --- /dev/null +++ b/app/assets/javascripts/pipeline_new/utils/filter_variables.js @@ -0,0 +1,13 @@ +// We need to filter out blank variables +// and filter out variables that have no key +// before sending to the API to create a pipeline. + +export default (variables) => { + return variables + .filter(({ key }) => key !== '') + .map(({ variable_type, key, value }) => ({ + variable_type, + key, + secret_value: value, + })); +}; diff --git a/app/controllers/projects/tags_controller.rb b/app/controllers/projects/tags_controller.rb index 3bf9988ca22..94b0473e1f3 100644 --- a/app/controllers/projects/tags_controller.rb +++ b/app/controllers/projects/tags_controller.rb @@ -9,9 +9,6 @@ class Projects::TagsController < Projects::ApplicationController before_action :require_non_empty_project before_action :authorize_download_code! before_action :authorize_admin_tag!, only: [:new, :create, :destroy] - before_action do - push_frontend_feature_flag(:gldropdown_tags, default_enabled: :yaml) - end feature_category :source_code_management, [:index, :show, :new, :destroy] feature_category :release_evidence, [:create] diff --git a/app/models/deployment.rb b/app/models/deployment.rb index d3280403bfd..1ccf06cd539 100644 --- a/app/models/deployment.rb +++ b/app/models/deployment.rb @@ -87,7 +87,7 @@ class Deployment < ApplicationRecord after_transition any => :running do |deployment| deployment.run_after_commit do - Deployments::ExecuteHooksWorker.perform_async(id) + Deployments::HooksWorker.perform_async(deployment_id: id, status_changed_at: Time.current) end end @@ -100,7 +100,7 @@ class Deployment < ApplicationRecord after_transition any => FINISHED_STATUSES do |deployment| deployment.run_after_commit do - Deployments::ExecuteHooksWorker.perform_async(id) + Deployments::HooksWorker.perform_async(deployment_id: id, status_changed_at: Time.current) end end @@ -182,8 +182,8 @@ class Deployment < ApplicationRecord Commit.truncate_sha(sha) end - def execute_hooks - deployment_data = Gitlab::DataBuilder::Deployment.build(self) + def execute_hooks(status_changed_at) + deployment_data = Gitlab::DataBuilder::Deployment.build(self, status_changed_at) project.execute_hooks(deployment_data, :deployment_hooks) project.execute_services(deployment_data, :deployment_hooks) end diff --git a/app/models/project.rb b/app/models/project.rb index b8b52c594c4..4aa094fed29 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -2663,7 +2663,7 @@ class Project < ApplicationRecord def cross_namespace_reference?(from) case from when Project - namespace != from.namespace + namespace_id != from.namespace_id when Namespace namespace != from when User diff --git a/app/models/release.rb b/app/models/release.rb index 95de30523e1..e18cac4a69a 100644 --- a/app/models/release.rb +++ b/app/models/release.rb @@ -13,7 +13,7 @@ class Release < ApplicationRecord belongs_to :author, class_name: 'User' has_many :links, class_name: 'Releases::Link' - has_many :sorted_links, -> { sorted }, class_name: 'Releases::Link' + has_many :sorted_links, -> { sorted }, class_name: 'Releases::Link', inverse_of: :release has_many :milestone_releases has_many :milestones, through: :milestone_releases diff --git a/app/services/concerns/integrations/project_test_data.rb b/app/services/concerns/integrations/project_test_data.rb index 5968b90f8fe..acaa773fd49 100644 --- a/app/services/concerns/integrations/project_test_data.rb +++ b/app/services/concerns/integrations/project_test_data.rb @@ -63,7 +63,7 @@ module Integrations return { error: s_('TestHooks|Ensure the project has deployments.') } unless deployment.present? - Gitlab::DataBuilder::Deployment.build(deployment) + Gitlab::DataBuilder::Deployment.build(deployment, Time.current) end def releases_events_data diff --git a/app/views/projects/tags/index.html.haml b/app/views/projects/tags/index.html.haml index 229f13d0ff3..5065a784b09 100644 --- a/app/views/projects/tags/index.html.haml +++ b/app/views/projects/tags/index.html.haml @@ -9,23 +9,7 @@ = s_('TagsPage|Tags give the ability to mark specific points in history as being important') .nav-controls - - unless Gitlab::Ci::Features.gldropdown_tags_enabled? - = form_tag(filter_tags_path, method: :get) do - = search_field_tag :search, params[:search], { placeholder: s_('TagsPage|Filter by tag name'), id: 'tag-search', class: 'form-control search-text-input input-short', spellcheck: false } - - .dropdown - %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown'} } - %span.light - = tags_sort_options_hash[@sort] - = sprite_icon('chevron-down', css_class: 'dropdown-menu-toggle-icon gl-top-3') - %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable - %li.dropdown-header - = s_('TagsPage|Sort by') - - tags_sort_options_hash.each do |value, title| - %li - = link_to title, filter_tags_path(sort: value), class: ("is-active" if @sort == value) - - else - #js-tags-sort-dropdown{ data: { filter_tags_path: filter_tags_path, sort_options: tags_sort_options_hash.to_json } } + #js-tags-sort-dropdown{ data: { filter_tags_path: filter_tags_path, sort_options: tags_sort_options_hash.to_json } } - if can?(current_user, :admin_tag, @project) = link_to new_project_tag_path(@project), class: 'btn gl-button btn-confirm', data: { qa_selector: "new_tag_button" } do = s_('TagsPage|New tag') diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index 391f3451dc7..dc34b879308 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -642,6 +642,15 @@ :weight: 3 :idempotent: :tags: [] +- :name: deployment:deployments_hooks + :worker_name: Deployments::HooksWorker + :feature_category: :continuous_delivery + :has_external_dependencies: + :urgency: :low + :resource_boundary: :unknown + :weight: 3 + :idempotent: + :tags: [] - :name: deployment:deployments_link_merge_request :worker_name: Deployments::LinkMergeRequestWorker :feature_category: :continuous_delivery diff --git a/app/workers/deployments/execute_hooks_worker.rb b/app/workers/deployments/execute_hooks_worker.rb index 6be05232321..ac1d661a855 100644 --- a/app/workers/deployments/execute_hooks_worker.rb +++ b/app/workers/deployments/execute_hooks_worker.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true module Deployments + # TODO: remove in https://gitlab.com/gitlab-org/gitlab/-/issues/329360 class ExecuteHooksWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker @@ -10,7 +11,7 @@ module Deployments def perform(deployment_id) if (deploy = Deployment.find_by_id(deployment_id)) - deploy.execute_hooks + deploy.execute_hooks(Time.current) end end end diff --git a/app/workers/deployments/finished_worker.rb b/app/workers/deployments/finished_worker.rb index 62c886010a3..0252c7ff8f7 100644 --- a/app/workers/deployments/finished_worker.rb +++ b/app/workers/deployments/finished_worker.rb @@ -13,7 +13,7 @@ module Deployments def perform(deployment_id) if (deploy = Deployment.find_by_id(deployment_id)) LinkMergeRequestsService.new(deploy).execute - deploy.execute_hooks + deploy.execute_hooks(Time.current) end end end diff --git a/app/workers/deployments/hooks_worker.rb b/app/workers/deployments/hooks_worker.rb new file mode 100644 index 00000000000..beac44881fb --- /dev/null +++ b/app/workers/deployments/hooks_worker.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Deployments + class HooksWorker # rubocop:disable Scalability/IdempotentWorker + include ApplicationWorker + + queue_namespace :deployment + feature_category :continuous_delivery + + def perform(params = {}) + params = params.with_indifferent_access + + if (deploy = Deployment.find_by_id(params[:deployment_id])) + deploy.execute_hooks(params[:status_changed_at].to_time) + end + end + end +end diff --git a/changelogs/unreleased/264393-add-event-timestamp-to-deployments-webhooks.yml b/changelogs/unreleased/264393-add-event-timestamp-to-deployments-webhooks.yml new file mode 100644 index 00000000000..1657f4011c2 --- /dev/null +++ b/changelogs/unreleased/264393-add-event-timestamp-to-deployments-webhooks.yml @@ -0,0 +1,5 @@ +--- +title: Add status_changed_at to deployments webhooks +merge_request: 60518 +author: +type: added diff --git a/changelogs/unreleased/cat-releases-sortedlinks-np1.yml b/changelogs/unreleased/cat-releases-sortedlinks-np1.yml new file mode 100644 index 00000000000..e701af1e4e4 --- /dev/null +++ b/changelogs/unreleased/cat-releases-sortedlinks-np1.yml @@ -0,0 +1,5 @@ +--- +title: Fix releases API N+1 in sorted_links usage +merge_request: 60561 +author: +type: performance diff --git a/changelogs/unreleased/jivanvl-remove-gldropdown-tags-ff.yml b/changelogs/unreleased/jivanvl-remove-gldropdown-tags-ff.yml new file mode 100644 index 00000000000..f0f20c0b57f --- /dev/null +++ b/changelogs/unreleased/jivanvl-remove-gldropdown-tags-ff.yml @@ -0,0 +1,5 @@ +--- +title: Remove gldropdown_tags feature flag +merge_request: 60153 +author: +type: other diff --git a/changelogs/unreleased/pb-fix-filter-out-empty-variables-new-pipeline.yml b/changelogs/unreleased/pb-fix-filter-out-empty-variables-new-pipeline.yml new file mode 100644 index 00000000000..e1f248e5ae7 --- /dev/null +++ b/changelogs/unreleased/pb-fix-filter-out-empty-variables-new-pipeline.yml @@ -0,0 +1,5 @@ +--- +title: Fixes bug where variables are being filtered that do not have a value but a key. +merge_request: 60538 +author: +type: fixed diff --git a/config/feature_flags/development/gldropdown_tags.yml b/config/feature_flags/development/gldropdown_tags.yml deleted file mode 100644 index b31ef1328d1..00000000000 --- a/config/feature_flags/development/gldropdown_tags.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: gldropdown_tags -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58589 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/327055 -milestone: '13.11' -type: development -group: group::continuous integration -default_enabled: true diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index f534aecfb46..05e9259c106 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -671,7 +671,7 @@ Gitlab.ee do Settings.cron_jobs['elastic_migration_worker']['cron'] ||= '*/30 * * * *' Settings.cron_jobs['elastic_migration_worker']['job_class'] ||= 'Elastic::MigrationWorker' Settings.cron_jobs['sync_seat_link_worker'] ||= Settingslogic.new({}) - Settings.cron_jobs['sync_seat_link_worker']['cron'] ||= "#{rand(60)} 0 * * *" + Settings.cron_jobs['sync_seat_link_worker']['cron'] ||= "#{rand(60)} 3 * * * UTC" Settings.cron_jobs['sync_seat_link_worker']['job_class'] = 'SyncSeatLinkWorker' Settings.cron_jobs['web_application_firewall_metrics_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['web_application_firewall_metrics_worker']['cron'] ||= '0 1 * * 0' diff --git a/doc/user/application_security/dast/index.md b/doc/user/application_security/dast/index.md index 129e1a5925e..73a3d99253f 100644 --- a/doc/user/application_security/dast/index.md +++ b/doc/user/application_security/dast/index.md @@ -610,6 +610,38 @@ When using `DAST_PATHS` and `DAST_PATHS_FILE`, note the following: To perform a [full scan](#full-scan) on the listed paths, use the `DAST_FULL_SCAN_ENABLED` CI/CD variable. +### View details of a vulnerability detected by DAST + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/36332) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.1. + +Vulnerabilities detected by DAST occur in the live web application. Addressing these types of +vulnerabilities requires specific information. DAST provides the information required to +investigate and rectify the underlying cause. + +To view details of vulnerabilities detected by DAST: + +1. To see all vulnerabilities detected, either: + - Go to your project and select **Security & Compliance**. + - Go to the merge request and select the **Security** tab. + +1. Select a vulnerability's description. The following details are provided: + + | Field | Description | + |:-----------------|:------------------------------------------------------------------ | + | Description | Description of the vulnerability. | + | Project | Namespace and project in which the vulnerability was detected. | + | Method | HTTP method used to detect the vulnerability. | + | URL | URL at which the vulnerability was detected. | + | Request Headers | Headers of the request. | + | Response Status | Response status received from the application. | + | Response Headers | Headers of the response received from the application. | + | Evidence | Evidence of the data found that verified the vulnerability. Often a snippet of the request or response, this can be used to help verify that the finding is a vulnerability. | + | Identifiers | Identifiers of the vulnerability. | + | Severity | Severity of the vulnerability. | + | Scanner Type | Type of vulnerability report. | + | Links | Links to further details of the detected vulnerability. | + | Solution | Details of a recommended solution to the vulnerability (optional). | + ### Customizing the DAST settings WARNING: diff --git a/doc/user/application_security/index.md b/doc/user/application_security/index.md index 2e7c0bdaa15..45cc89c2208 100644 --- a/doc/user/application_security/index.md +++ b/doc/user/application_security/index.md @@ -119,45 +119,6 @@ reports are available to download. To download a report, click on the ![Security widget](img/security_widget_v13_7.png) -## View details of a DAST vulnerability - -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/36332) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.1. - -Vulnerabilities detected by DAST occur in the live web application. Rectification of these types of -vulnerabilities requires specific information. DAST provides the information required to -investigate and rectify the underlying cause. - -To view details of DAST vulnerabilities: - -1. To see all vulnerabilities detected: - - In a project, go to the project's **{shield}** **Security & Compliance** page. - - Only in a merge request, go the merge request's **Security** tab. - -1. Select the vulnerability's description. The following details are provided: - -| Field | Description | -|:-----------------|:------------------------------------------------------------------ | -| Description | Description of the vulnerability. | -| Project | Namespace and project in which the vulnerability was detected. | -| Method | HTTP method used to detect the vulnerability. | -| URL | URL at which the vulnerability was detected. | -| Request Headers | Headers of the request. | -| Response Status | Response status received from the application. | -| Response Headers | Headers of the response received from the application. | -| Evidence | Evidence of the data found that verified the vulnerability. Often a snippet of the request or response, this can be used to help verify that the finding is a vulnerability. | -| Identifiers | Identifiers of the vulnerability. | -| Severity | Severity of the vulnerability. | -| Scanner Type | Type of vulnerability report. | -| Links | Links to further details of the detected vulnerability. | -| Solution | Details of a recommended solution to the vulnerability (optional). | - -### Hide sensitive information in headers - -HTTP request and response headers may contain sensitive information, including cookies and -authorization credentials. By default, content of specific headers are masked in DAST vulnerability -reports. You can specify the list of all headers to be masked. For details, see -[Hide sensitive information](dast/index.md#hide-sensitive-information). - ## Addressing vulnerabilities > Introduced in [GitLab Ultimate](https://about.gitlab.com/pricing/) 10.8. diff --git a/doc/user/gitlab_com/index.md b/doc/user/gitlab_com/index.md index 6e38534b044..8019e99a919 100644 --- a/doc/user/gitlab_com/index.md +++ b/doc/user/gitlab_com/index.md @@ -115,6 +115,7 @@ or over the repository size limit, you can [reduce your repository size with Git | ----------- | ----------- | ------------- | | [Repository size including LFS](../admin_area/settings/account_and_limit_settings.md#repository-size-limit) | 10 GB | Unlimited | | Maximum import size | 5 GB | Unlimited ([Modified](https://gitlab.com/gitlab-org/gitlab/-/issues/251106) from 50MB to unlimited in GitLab 13.8. | +| Maximum attachment size | 10 MB | 10 MB | NOTE: `git push` and GitLab project imports are limited to 5 GB per request through Cloudflare. Git LFS and imports other than a file upload are not affected by this limit. diff --git a/doc/user/project/integrations/webhooks.md b/doc/user/project/integrations/webhooks.md index 56a339e02d2..d74a2bec1f6 100644 --- a/doc/user/project/integrations/webhooks.md +++ b/doc/user/project/integrations/webhooks.md @@ -1368,6 +1368,7 @@ X-Gitlab-Event: Deployment Hook { "object_kind": "deployment", "status": "success", + "status_changed_at":"2021-04-28 21:50:00 +0200", "deployable_id": 796, "deployable_url": "http://10.126.0.2:3000/root/test-deployment-webhooks/-/jobs/796", "environment": "staging", diff --git a/lib/banzai/filter/references/merge_request_reference_filter.rb b/lib/banzai/filter/references/merge_request_reference_filter.rb index 6c5ad83d9ae..a86f29267b5 100644 --- a/lib/banzai/filter/references/merge_request_reference_filter.rb +++ b/lib/banzai/filter/references/merge_request_reference_filter.rb @@ -58,7 +58,7 @@ module Banzai end def data_attributes_for(text, parent, object, **data) - super.merge(project_path: parent.full_path, iid: object.iid, mr_title: object.title) + super.merge(project_path: current_parent_path, iid: object.iid, mr_title: object.title) end private diff --git a/lib/gitlab/ci/features.rb b/lib/gitlab/ci/features.rb index 12e182b38fc..64eaffa1e82 100644 --- a/lib/gitlab/ci/features.rb +++ b/lib/gitlab/ci/features.rb @@ -59,10 +59,6 @@ module Gitlab def self.multiple_cache_per_job? ::Feature.enabled?(:multiple_cache_per_job, default_enabled: :yaml) end - - def self.gldropdown_tags_enabled? - ::Feature.enabled?(:gldropdown_tags, default_enabled: :yaml) - end end end end diff --git a/lib/gitlab/data_builder/deployment.rb b/lib/gitlab/data_builder/deployment.rb index 87ebe832862..f50ca5119b7 100644 --- a/lib/gitlab/data_builder/deployment.rb +++ b/lib/gitlab/data_builder/deployment.rb @@ -5,7 +5,7 @@ module Gitlab module Deployment extend self - def build(deployment) + def build(deployment, status_changed_at) # Deployments will not have a deployable when created using the API. deployable_url = if deployment.deployable @@ -15,6 +15,7 @@ module Gitlab { object_kind: 'deployment', status: deployment.status, + status_changed_at: status_changed_at, deployable_id: deployment.deployable_id, deployable_url: deployable_url, environment: deployment.environment.name, diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 8c8bc478e6a..3a5e85fcf7b 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -14304,6 +14304,15 @@ msgstr "" msgid "Generic package file size in bytes" msgstr "" +msgid "GenericReport|After" +msgstr "" + +msgid "GenericReport|Before" +msgstr "" + +msgid "GenericReport|Diff" +msgstr "" + msgid "Geo" msgstr "" @@ -31217,9 +31226,6 @@ msgstr "" msgid "TagsPage|Repository has no tags yet." msgstr "" -msgid "TagsPage|Sort by" -msgstr "" - msgid "TagsPage|Tags" msgstr "" diff --git a/package.json b/package.json index c669c6865c8..652550c5799 100644 --- a/package.json +++ b/package.json @@ -229,7 +229,7 @@ "karma-mocha-reporter": "^2.2.5", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^4.0.2", - "markdownlint-cli": "0.24.0", + "markdownlint-cli": "0.26.0", "md5": "^2.2.1", "miragejs": "^0.1.40", "mock-apollo-client": "^0.5.0", diff --git a/spec/frontend/pipeline_new/mock_data.js b/spec/frontend/pipeline_new/mock_data.js index 2a677f109da..3f49ffe9664 100644 --- a/spec/frontend/pipeline_new/mock_data.js +++ b/spec/frontend/pipeline_new/mock_data.js @@ -43,3 +43,19 @@ export const mockError = { export const mockBranchRefs = ['main', 'dev', 'release']; export const mockTagRefs = ['1.0.0', '1.1.0', '1.2.0']; + +export const mockVariables = [ + { + uniqueId: 'var-refs/heads/master2', + variable_type: 'env_var', + key: 'var_without_value', + value: '', + }, + { + uniqueId: 'var-refs/heads/master3', + variable_type: 'env_var', + key: 'var_with_value', + value: 'test_value', + }, + { uniqueId: 'var-refs/heads/master4', variable_type: 'env_var', key: '', value: '' }, +]; diff --git a/spec/frontend/pipeline_new/utils/filter_variables_spec.js b/spec/frontend/pipeline_new/utils/filter_variables_spec.js new file mode 100644 index 00000000000..42bc6244456 --- /dev/null +++ b/spec/frontend/pipeline_new/utils/filter_variables_spec.js @@ -0,0 +1,21 @@ +import filterVariables from '~/pipeline_new/utils/filter_variables'; +import { mockVariables } from '../mock_data'; + +describe('Filter variables utility function', () => { + it('filters variables that do not contain a key', () => { + const expectedVaraibles = [ + { + variable_type: 'env_var', + key: 'var_without_value', + secret_value: '', + }, + { + variable_type: 'env_var', + key: 'var_with_value', + secret_value: 'test_value', + }, + ]; + + expect(filterVariables(mockVariables)).toEqual(expectedVaraibles); + }); +}); diff --git a/spec/frontend/project_find_file_spec.js b/spec/frontend/project_find_file_spec.js index 5919910d791..106b41bcc02 100644 --- a/spec/frontend/project_find_file_spec.js +++ b/spec/frontend/project_find_file_spec.js @@ -10,9 +10,9 @@ jest.mock('~/lib/dompurify', () => ({ sanitize: jest.fn((val) => val), })); -const BLOB_URL_TEMPLATE = `${TEST_HOST}/namespace/project/blob/master`; -const FILE_FIND_URL = `${TEST_HOST}/namespace/project/files/master?format=json`; -const FIND_TREE_URL = `${TEST_HOST}/namespace/project/tree/master`; +const BLOB_URL_TEMPLATE = `${TEST_HOST}/namespace/project/blob/main`; +const FILE_FIND_URL = `${TEST_HOST}/namespace/project/files/main?format=json`; +const FIND_TREE_URL = `${TEST_HOST}/namespace/project/tree/main`; const TEMPLATE = `<div class="file-finder-holder tree-holder js-file-finder" data-blob-url-template="${BLOB_URL_TEMPLATE}" data-file-find-url="${FILE_FIND_URL}" data-find-tree-url="${FIND_TREE_URL}"> <input class="file-finder-input" id="file_find" /> <div class="tree-content-holder"> diff --git a/spec/lib/gitlab/data_builder/deployment_spec.rb b/spec/lib/gitlab/data_builder/deployment_spec.rb index 8fb7ab25b17..d64dfc957ca 100644 --- a/spec/lib/gitlab/data_builder/deployment_spec.rb +++ b/spec/lib/gitlab/data_builder/deployment_spec.rb @@ -7,7 +7,7 @@ RSpec.describe Gitlab::DataBuilder::Deployment do it 'returns the object kind for a deployment' do deployment = build(:deployment, deployable: nil, environment: create(:environment)) - data = described_class.build(deployment) + data = described_class.build(deployment, Time.current) expect(data[:object_kind]).to eq('deployment') end @@ -21,10 +21,12 @@ RSpec.describe Gitlab::DataBuilder::Deployment do expected_deployable_url = Gitlab::Routing.url_helpers.project_job_url(deployable.project, deployable) expected_user_url = Gitlab::Routing.url_helpers.user_url(deployment.deployed_by) expected_commit_url = Gitlab::UrlBuilder.build(commit) + status_changed_at = Time.current - data = described_class.build(deployment) + data = described_class.build(deployment, status_changed_at) expect(data[:status]).to eq('failed') + expect(data[:status_changed_at]).to eq(status_changed_at) expect(data[:deployable_id]).to eq(deployable.id) expect(data[:deployable_url]).to eq(expected_deployable_url) expect(data[:environment]).to eq("somewhere") @@ -38,7 +40,7 @@ RSpec.describe Gitlab::DataBuilder::Deployment do it 'does not include the deployable URL when there is no deployable' do deployment = create(:deployment, status: :failed, deployable: nil) - data = described_class.build(deployment) + data = described_class.build(deployment, Time.current) expect(data[:deployable_url]).to be_nil end diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index c9d627c6571..9848ef30388 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -1205,7 +1205,7 @@ RSpec.describe Ci::Build do before do allow(Deployments::LinkMergeRequestWorker).to receive(:perform_async) - allow(Deployments::ExecuteHooksWorker).to receive(:perform_async) + allow(Deployments::HooksWorker).to receive(:perform_async) end it 'has deployments record with created status' do @@ -1241,7 +1241,7 @@ RSpec.describe Ci::Build do before do allow(Deployments::UpdateEnvironmentWorker).to receive(:perform_async) - allow(Deployments::ExecuteHooksWorker).to receive(:perform_async) + allow(Deployments::HooksWorker).to receive(:perform_async) end it_behaves_like 'avoid deadlock' diff --git a/spec/models/deployment_spec.rb b/spec/models/deployment_spec.rb index c9544569ad6..64c7311a84f 100644 --- a/spec/models/deployment_spec.rb +++ b/spec/models/deployment_spec.rb @@ -107,11 +107,13 @@ RSpec.describe Deployment do end end - it 'executes Deployments::ExecuteHooksWorker asynchronously' do - expect(Deployments::ExecuteHooksWorker) - .to receive(:perform_async).with(deployment.id) + it 'executes Deployments::HooksWorker asynchronously' do + freeze_time do + expect(Deployments::HooksWorker) + .to receive(:perform_async).with(deployment_id: deployment.id, status_changed_at: Time.current) - deployment.run! + deployment.run! + end end it 'executes Deployments::DropOlderDeploymentsWorker asynchronously' do @@ -141,11 +143,13 @@ RSpec.describe Deployment do deployment.succeed! end - it 'executes Deployments::ExecuteHooksWorker asynchronously' do - expect(Deployments::ExecuteHooksWorker) - .to receive(:perform_async).with(deployment.id) + it 'executes Deployments::HooksWorker asynchronously' do + freeze_time do + expect(Deployments::HooksWorker) + .to receive(:perform_async).with(deployment_id: deployment.id, status_changed_at: Time.current) - deployment.succeed! + deployment.succeed! + end end end @@ -168,11 +172,13 @@ RSpec.describe Deployment do deployment.drop! end - it 'executes Deployments::ExecuteHooksWorker asynchronously' do - expect(Deployments::ExecuteHooksWorker) - .to receive(:perform_async).with(deployment.id) + it 'executes Deployments::HooksWorker asynchronously' do + freeze_time do + expect(Deployments::HooksWorker) + .to receive(:perform_async).with(deployment_id: deployment.id, status_changed_at: Time.current) - deployment.drop! + deployment.drop! + end end end @@ -195,11 +201,13 @@ RSpec.describe Deployment do deployment.cancel! end - it 'executes Deployments::ExecuteHooksWorker asynchronously' do - expect(Deployments::ExecuteHooksWorker) - .to receive(:perform_async).with(deployment.id) + it 'executes Deployments::HooksWorker asynchronously' do + freeze_time do + expect(Deployments::HooksWorker) + .to receive(:perform_async).with(deployment_id: deployment.id, status_changed_at: Time.current) - deployment.cancel! + deployment.cancel! + end end end @@ -220,11 +228,13 @@ RSpec.describe Deployment do deployment.skip! end - it 'does not execute Deployments::ExecuteHooksWorker' do - expect(Deployments::ExecuteHooksWorker) - .not_to receive(:perform_async).with(deployment.id) + it 'does not execute Deployments::HooksWorker' do + freeze_time do + expect(Deployments::HooksWorker) + .not_to receive(:perform_async).with(deployment_id: deployment.id, status_changed_at: Time.current) - deployment.skip! + deployment.skip! + end end end @@ -714,7 +724,7 @@ RSpec.describe Deployment do it 'schedules workers when finishing a deploy' do expect(Deployments::UpdateEnvironmentWorker).to receive(:perform_async) expect(Deployments::LinkMergeRequestWorker).to receive(:perform_async) - expect(Deployments::ExecuteHooksWorker).to receive(:perform_async) + expect(Deployments::HooksWorker).to receive(:perform_async) deploy.update_status('success') end diff --git a/spec/models/design_management/design_spec.rb b/spec/models/design_management/design_spec.rb index 674d2fc420d..f2ce5e42eaf 100644 --- a/spec/models/design_management/design_spec.rb +++ b/spec/models/design_management/design_spec.rb @@ -512,7 +512,7 @@ RSpec.describe DesignManagement::Design do end describe '#to_reference' do - let(:namespace) { build(:namespace, path: 'sample-namespace') } + let(:namespace) { build(:namespace, id: non_existing_record_id, path: 'sample-namespace') } let(:project) { build(:project, name: 'sample-project', namespace: namespace) } let(:group) { create(:group, name: 'Group', path: 'sample-group') } let(:issue) { build(:issue, iid: 1, project: project) } diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index 23caf3647c3..5f9bcf25553 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -297,7 +297,7 @@ RSpec.describe Issue do end context 'when cross-project in different namespace' do - let(:another_namespace) { build(:namespace, path: 'another-namespace') } + let(:another_namespace) { build(:namespace, id: non_existing_record_id, path: 'another-namespace') } let(:another_namespace_project) { build(:project, path: 'another-project', namespace: another_namespace) } it 'returns complete path to the issue' do diff --git a/spec/models/project_services/chat_message/deployment_message_spec.rb b/spec/models/project_services/chat_message/deployment_message_spec.rb index 6bdf2120b36..aa4ad54f9d5 100644 --- a/spec/models/project_services/chat_message/deployment_message_spec.rb +++ b/spec/models/project_services/chat_message/deployment_message_spec.rb @@ -9,7 +9,7 @@ RSpec.describe ChatMessage::DeploymentMessage do project = create(:project, :repository) commit = project.commit('HEAD') deployment = create(:deployment, status: :success, environment: environment, project: project, sha: commit.sha) - data = Gitlab::DataBuilder::Deployment.build(deployment) + data = Gitlab::DataBuilder::Deployment.build(deployment, Time.current) message = described_class.new(data) @@ -118,7 +118,7 @@ RSpec.describe ChatMessage::DeploymentMessage do job_url = Gitlab::Routing.url_helpers.project_job_url(project, ci_build) commit_url = Gitlab::UrlBuilder.build(deployment.commit) user_url = Gitlab::Routing.url_helpers.user_url(user) - data = Gitlab::DataBuilder::Deployment.build(deployment) + data = Gitlab::DataBuilder::Deployment.build(deployment, Time.current) message = described_class.new(data) diff --git a/spec/models/project_services/slack_service_spec.rb b/spec/models/project_services/slack_service_spec.rb index 2dd683bd44a..2e2c1c666d9 100644 --- a/spec/models/project_services/slack_service_spec.rb +++ b/spec/models/project_services/slack_service_spec.rb @@ -59,7 +59,7 @@ RSpec.describe SlackService do context 'deployment notification' do let_it_be(:deployment) { create(:deployment, user: user) } - let(:data) { Gitlab::DataBuilder::Deployment.build(deployment) } + let(:data) { Gitlab::DataBuilder::Deployment.build(deployment, Time.current) } it_behaves_like 'increases the usage data counter', 'i_ecosystem_slack_service_deployment_notification' end diff --git a/spec/requests/api/releases_spec.rb b/spec/requests/api/releases_spec.rb index 5d2f7768255..bc4d52d59e9 100644 --- a/spec/requests/api/releases_spec.rb +++ b/spec/requests/api/releases_spec.rb @@ -129,19 +129,22 @@ RSpec.describe API::Releases do expect(json_response.first['upcoming_release']).to eq(false) end - it 'avoids N+1 queries' do + it 'avoids N+1 queries', :use_sql_query_cache do create(:release, :with_evidence, project: project, tag: 'v0.1', author: maintainer) + create(:release_link, release: project.releases.first) - control_count = ActiveRecord::QueryRecorder.new do + control_count = ActiveRecord::QueryRecorder.new(skip_cached: false) do get api("/projects/#{project.id}/releases", maintainer) end.count create_list(:release, 2, :with_evidence, project: project, tag: 'v0.1', author: maintainer) create_list(:release, 2, project: project) + create_list(:release_link, 2, release: project.releases.first) + create_list(:release_link, 2, release: project.releases.last) expect do get api("/projects/#{project.id}/releases", maintainer) - end.not_to exceed_query_limit(control_count) + end.not_to exceed_all_query_limit(control_count) end context 'when tag does not exist in git repository' do diff --git a/spec/services/deployments/create_service_spec.rb b/spec/services/deployments/create_service_spec.rb index 0bb5949ddb1..0f2a6ce32e1 100644 --- a/spec/services/deployments/create_service_spec.rb +++ b/spec/services/deployments/create_service_spec.rb @@ -21,7 +21,7 @@ RSpec.describe Deployments::CreateService do expect(Deployments::UpdateEnvironmentWorker).to receive(:perform_async) expect(Deployments::LinkMergeRequestWorker).to receive(:perform_async) - expect(Deployments::ExecuteHooksWorker).to receive(:perform_async) + expect(Deployments::HooksWorker).to receive(:perform_async) expect(service.execute).to be_persisted end @@ -37,7 +37,7 @@ RSpec.describe Deployments::CreateService do expect(Deployments::UpdateEnvironmentWorker).not_to receive(:perform_async) expect(Deployments::LinkMergeRequestWorker).not_to receive(:perform_async) - expect(Deployments::ExecuteHooksWorker).not_to receive(:perform_async) + expect(Deployments::HooksWorker).not_to receive(:perform_async) expect(service.execute).to be_persisted end @@ -57,7 +57,7 @@ RSpec.describe Deployments::CreateService do expect(Deployments::UpdateEnvironmentWorker).not_to receive(:perform_async) expect(Deployments::LinkMergeRequestWorker).not_to receive(:perform_async) - expect(Deployments::ExecuteHooksWorker).not_to receive(:perform_async) + expect(Deployments::HooksWorker).not_to receive(:perform_async) described_class.new(environment.reload, user, params).execute end diff --git a/spec/services/deployments/update_environment_service_spec.rb b/spec/services/deployments/update_environment_service_spec.rb index 372805cc0fd..81869a2e3fd 100644 --- a/spec/services/deployments/update_environment_service_spec.rb +++ b/spec/services/deployments/update_environment_service_spec.rb @@ -33,7 +33,7 @@ RSpec.describe Deployments::UpdateEnvironmentService do before do allow(Deployments::LinkMergeRequestWorker).to receive(:perform_async) - allow(Deployments::ExecuteHooksWorker).to receive(:perform_async) + allow(Deployments::HooksWorker).to receive(:perform_async) job.success! # Create/Succeed deployment end diff --git a/spec/support/shared_examples/models/slack_mattermost_notifications_shared_examples.rb b/spec/support/shared_examples/models/slack_mattermost_notifications_shared_examples.rb index 71a76121d38..09b7d1be704 100644 --- a/spec/support/shared_examples/models/slack_mattermost_notifications_shared_examples.rb +++ b/spec/support/shared_examples/models/slack_mattermost_notifications_shared_examples.rb @@ -201,7 +201,7 @@ RSpec.shared_examples 'slack or mattermost notifications' do |service_name| context 'deployment events' do let_it_be(:deployment) { create(:deployment) } - let(:data) { Gitlab::DataBuilder::Deployment.build(deployment) } + let(:data) { Gitlab::DataBuilder::Deployment.build(deployment, Time.current) } it_behaves_like 'calls the service API with the event message', /Deploy to (.*?) created/ end diff --git a/spec/views/projects/tags/index.html.haml_spec.rb b/spec/views/projects/tags/index.html.haml_spec.rb index 18b42f98e0b..2702ab9e2a9 100644 --- a/spec/views/projects/tags/index.html.haml_spec.rb +++ b/spec/views/projects/tags/index.html.haml_spec.rb @@ -20,12 +20,6 @@ RSpec.describe 'projects/tags/index.html.haml' do allow(view).to receive(:current_user).and_return(project.namespace.owner) end - it 'defaults sort dropdown toggle to last updated' do - stub_feature_flags(gldropdown_tags: false) - render - expect(rendered).to have_button('Last updated') - end - it 'renders links to the Releases page for tags associated with a release' do render expect(rendered).to have_link(release.name, href: project_releases_path(project, anchor: release.tag)) diff --git a/spec/workers/deployments/hooks_worker_spec.rb b/spec/workers/deployments/hooks_worker_spec.rb new file mode 100644 index 00000000000..f1fe7b0fc5d --- /dev/null +++ b/spec/workers/deployments/hooks_worker_spec.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Deployments::HooksWorker do + let(:worker) { described_class.new } + + describe '#perform' do + before do + allow(ProjectServiceWorker).to receive(:perform_async) + end + + it 'executes project services for deployment_hooks' do + deployment = create(:deployment, :running) + project = deployment.project + service = create(:service, type: 'SlackService', project: project, deployment_events: true, active: true) + + expect(ProjectServiceWorker).to receive(:perform_async).with(service.id, an_instance_of(Hash)) + + worker.perform(deployment_id: deployment.id, status_changed_at: Time.current) + end + + it 'does not execute an inactive service' do + deployment = create(:deployment, :running) + project = deployment.project + create(:service, type: 'SlackService', project: project, deployment_events: true, active: false) + + expect(ProjectServiceWorker).not_to receive(:perform_async) + + worker.perform(deployment_id: deployment.id, status_changed_at: Time.current) + end + + it 'does not execute if a deployment does not exist' do + expect(ProjectServiceWorker).not_to receive(:perform_async) + + worker.perform(deployment_id: non_existing_record_id, status_changed_at: Time.current) + end + + it 'execute webhooks' do + deployment = create(:deployment, :running) + project = deployment.project + web_hook = create(:project_hook, deployment_events: true, project: project) + + status_changed_at = Time.current + + expect_next_instance_of(WebHookService, web_hook, hash_including(status_changed_at: status_changed_at), "deployment_hooks") do |service| + expect(service).to receive(:async_execute) + end + + worker.perform(deployment_id: deployment.id, status_changed_at: status_changed_at) + end + end +end diff --git a/yarn.lock b/yarn.lock index c367c918d3c..70f1fc92271 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2321,6 +2321,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + aria-query@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-4.2.2.tgz#0d2ca6c9aceb56b8977e9fed6aed7e15bbd2f83b" @@ -3422,18 +3427,11 @@ commander@2, commander@^2.10.0, commander@^2.18.0, commander@^2.19.0, commander@ resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== -commander@^6.0.0, commander@^6.2.0: +commander@^6.0.0, commander@^6.2.0, commander@~6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== -commander@~2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" - integrity sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q= - dependencies: - graceful-readlink ">= 1.0.0" - commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -4282,16 +4280,11 @@ deep-equal@^1.0.1: resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= -deep-extend@^0.6.0: +deep-extend@^0.6.0, deep-extend@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== -deep-extend@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.5.1.tgz#b894a9dd90d3023fbf1c55a394fb858eb2066f1f" - integrity sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w== - deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -5742,16 +5735,11 @@ get-stdin@^6.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== -get-stdin@^8.0.0: +get-stdin@^8.0.0, get-stdin@~8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== -get-stdin@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" - integrity sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g= - get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -5810,7 +5798,7 @@ glob-to-regexp@^0.4.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -"glob@5 - 7", glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.1, glob@~7.1.2: +"glob@5 - 7", glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.1, glob@~7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -5965,11 +5953,6 @@ graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== -"graceful-readlink@>= 1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" - integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU= - graphlib@^2.1.7, graphlib@^2.1.8: version "2.1.8" resolved "https://registry.yarnpkg.com/graphlib/-/graphlib-2.1.8.tgz#5761d414737870084c92ec7b5dbcb0592c9d35da" @@ -6367,7 +6350,7 @@ ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.4, ignore@^5.1.8, ignore@~5.1.4: +ignore@^5.1.4, ignore@^5.1.8, ignore@~5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -7473,10 +7456,10 @@ js-cookie@^2.2.1: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.13.1, js-yaml@~3.13.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== +js-yaml@^3.13.1, js-yaml@~3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -7622,10 +7605,10 @@ jsonc-parser@^2.2.1, jsonc-parser@^2.3.1: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.3.1.tgz#59549150b133f2efacca48fe9ce1ec0659af2342" integrity sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg== -jsonc-parser@~2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc" - integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w== +jsonc-parser@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" + integrity sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA== jsonfile@^4.0.0: version "4.0.0" @@ -8231,12 +8214,12 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -markdown-it@11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-11.0.0.tgz#dbfc30363e43d756ebc52c38586b91b90046b876" - integrity sha512-+CvOnmbSubmQFSA9dKz1BRiaSMV7rhexl3sngKqFyXSagoA3fBdJQ8oZWtRy2knXdpDXaBw44euz37DeJQ9asg== +markdown-it@12.0.2: + version "12.0.2" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.2.tgz#4401beae8df8aa2221fc6565a7188e60a06ef0ed" + integrity sha512-4Lkvjbv2kK+moL9TbeV+6/NHx+1Q+R/NIdUlFlkqkkzUcTod4uiyTJRiBidKR9qXSdkNFkgv+AELY8KN9vSgVA== dependencies: - argparse "^1.0.7" + argparse "^2.0.1" entities "~2.0.0" linkify-it "^3.0.1" mdurl "^1.0.1" @@ -8253,37 +8236,37 @@ markdown-it@^10.0.0: mdurl "^1.0.1" uc.micro "^1.0.5" -markdownlint-cli@0.24.0: - version "0.24.0" - resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.24.0.tgz#d1c1d43cd53b87aaec93035b3234eef7097139a8" - integrity sha512-AusUxaX4sFayUBFTCKeHc8+fq73KFqIUW+ZZZYyQ/BvY0MoGAnE2C/3xiawSE7WXmpmguaWzhrXRuY6IrOLX7A== - dependencies: - commander "~2.9.0" - deep-extend "~0.5.1" - get-stdin "~5.0.1" - glob "~7.1.2" - ignore "~5.1.4" - js-yaml "~3.13.1" - jsonc-parser "~2.2.0" +markdownlint-cli@0.26.0: + version "0.26.0" + resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.26.0.tgz#cd89e3e39a049303ec125c8aa291da4f3325df29" + integrity sha512-biLfeGNZG9nw0yJbtFBzRlew2/P5w7JSseKwolSox3zejs7dLpGvPgqbC+iqJnqqGWcWLtXaXh8bBEKWmfl10A== + dependencies: + commander "~6.2.1" + deep-extend "~0.6.0" + get-stdin "~8.0.0" + glob "~7.1.6" + ignore "~5.1.8" + js-yaml "~3.14.1" + jsonc-parser "~3.0.0" lodash.differencewith "~4.5.0" lodash.flatten "~4.4.0" - markdownlint "~0.21.0" - markdownlint-rule-helpers "~0.12.0" + markdownlint "~0.22.0" + markdownlint-rule-helpers "~0.13.0" minimatch "~3.0.4" minimist "~1.2.5" - rc "~1.2.7" + rc "~1.2.8" -markdownlint-rule-helpers@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.12.0.tgz#c41d9b990c50911572e8eb2fba3e6975a5514b7e" - integrity sha512-Q7qfAk+AJvx82ZY52OByC4yjoQYryOZt6D8TKrZJIwCfhZvcj8vCQNuwDqILushtDBTvGFmUPq+uhOb1KIMi6A== +markdownlint-rule-helpers@~0.13.0: + version "0.13.0" + resolved "https://registry.yarnpkg.com/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.13.0.tgz#7cc6553bc7f8c4c8a43cf66fb2a3a652124f46f9" + integrity sha512-rRY0itbcHG4e+ntz0bbY3AIceSJMKS0TafEMgEtKVHRZ54/JUSy6/4ypCL618RlJvYRej+xMLxX5nkJqIeTZaQ== -markdownlint@~0.21.0: - version "0.21.1" - resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.21.1.tgz#9442afcf12bf65ce9d613212028cf85741677421" - integrity sha512-8kc88w5dyEzlmOWIElp8J17qBgzouOQfJ0LhCcpBFrwgyYK6JTKvILsk4FCEkiNqHkTxwxopT2RS2DYb/10qqg== +markdownlint@~0.22.0: + version "0.22.0" + resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.22.0.tgz#4ed95b61c17ae9f4dfca6a01f038c744846c0a72" + integrity sha512-J4B+iMc12pOdp/wfYi03W2qfAfEyiZzq3qvQh/8vOMNU8vXYY6Jg440EY7dWTBCqROhb1i4nAn3BTByJ5kdx1w== dependencies: - markdown-it "11.0.0" + markdown-it "12.0.2" marked@^0.3.12, marked@~0.3.6: version "0.3.19" @@ -10137,7 +10120,7 @@ raw-loader@^4.0.2: loader-utils "^2.0.0" schema-utils "^3.0.0" -rc@^1.2.8, rc@~1.2.7: +rc@^1.2.8, rc@~1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== |