From e15c33fd06c44f9e188cd03b1f31e22d3030d4e5 Mon Sep 17 00:00:00 2001 From: Michael Kozono Date: Thu, 28 Feb 2019 20:54:46 +0000 Subject: Don't undermine the point with biased logic I.e. Include cleanup in both sides of the comparison. --- doc/development/rolling_out_changes_using_feature_flags.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/development/rolling_out_changes_using_feature_flags.md b/doc/development/rolling_out_changes_using_feature_flags.md index ef1aba95712..48ecee5f231 100644 --- a/doc/development/rolling_out_changes_using_feature_flags.md +++ b/doc/development/rolling_out_changes_using_feature_flags.md @@ -65,15 +65,14 @@ the worst case scenario, which we should optimise for, our total cost is now 20. If we had used a feature flag, things would have been very different. We don't need to revert a release, and because feature flags are disabled by default we don't need to revert and pick any Git commits. In fact, all we have to do is -disable the feature, and _maybe_ perform some cleanup. Let's say that the cost -of this is 1. In this case, our best case cost is 11: 10 to build the feature, -and 1 to add the feature flag. The worst case cost is now 12: 10 to build the -feature, 1 to add the feature flag, and 1 to disable it. +disable the feature, and in the worst case, perform cleanup. Let's say that +the cost of this is 2. In this case, our best case cost is 11: 10 to build the +feature, and 1 to add the feature flag. The worst case cost is now 13: 10 to +build the feature, 1 to add the feature flag, and 2 to disable and clean up. Here we can see that in the best case scenario the work necessary is only a tiny bit more compared to not using a feature flag. Meanwhile, the process of -reverting our changes has been made significantly cheaper, to the point of being -trivial. +reverting our changes has been made significantly and reliably cheaper. In other words, feature flags do not slow down the development process. Instead, they speed up the process as managing incidents now becomes _much_ easier. Once -- cgit v1.2.1 From 4de06435d0c6fc904081b4da82253a2e025613a4 Mon Sep 17 00:00:00 2001 From: Fabio Pitino Date: Tue, 30 Apr 2019 13:36:44 +0100 Subject: Write test that exposes bug with Fugit gem --- spec/lib/gitlab/ci/cron_parser_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/lib/gitlab/ci/cron_parser_spec.rb b/spec/lib/gitlab/ci/cron_parser_spec.rb index 2a3f7807fdb..491e3fba9d9 100644 --- a/spec/lib/gitlab/ci/cron_parser_spec.rb +++ b/spec/lib/gitlab/ci/cron_parser_spec.rb @@ -174,6 +174,13 @@ describe Gitlab::Ci::CronParser do it { expect(subject).to be_nil } end + + context 'when cron is scheduled to a non existent day' do + let(:cron) { '0 12 31 2 *' } + let(:cron_timezone) { 'UTC' } + + it { expect(subject).to be_nil } + end end describe '#cron_valid?' do -- cgit v1.2.1 From 8a0443a506531f34bbdbc66c86b12fa94b4d517e Mon Sep 17 00:00:00 2001 From: Mike Lewis Date: Wed, 1 May 2019 17:22:14 +0000 Subject: Update README to add more context on Git Basics --- doc/gitlab-basics/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/gitlab-basics/README.md b/doc/gitlab-basics/README.md index aa008d6f768..28ba20bec09 100644 --- a/doc/gitlab-basics/README.md +++ b/doc/gitlab-basics/README.md @@ -27,9 +27,11 @@ The following are guides to basic GitLab functionality: ## Git basics -If you're unfamiliar with the command line, these resources will help: +If you're familiar with Git on the command line, you can interact with your GitLab projects just as you would with any other Git repository. + +These resources will help get further acclimated to working on the command line. -- [Command line basics](command-line-commands.md), for those unfamiliar with the command line interface. - [Start using Git on the command line](start-using-git.md), for some simple Git commands. +- [Command line basics](command-line-commands.md), to create and edit files using the command line. More Git resources are available at GitLab's [Git documentation](../topics/git/index.md). -- cgit v1.2.1 From 54931d1c6852c1c40d60113113f18b61e114a831 Mon Sep 17 00:00:00 2001 From: Mike Lewis Date: Wed, 1 May 2019 17:24:50 +0000 Subject: Update command-line-commands to add clarity on where one can edit code --- doc/gitlab-basics/command-line-commands.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/gitlab-basics/command-line-commands.md b/doc/gitlab-basics/command-line-commands.md index a0111be0767..1cf883679d7 100644 --- a/doc/gitlab-basics/command-line-commands.md +++ b/doc/gitlab-basics/command-line-commands.md @@ -13,10 +13,12 @@ button (you'll have to paste it on your shell in the next step). ![Copy the HTTPS or SSH](img/project_clone_url.png) -## On the command line +## Working with project files on the command line This section has examples of some basic shell commands that you might find useful. For more information, search the web for _bash commands_. +Alternatively, you can edit files using your choice of editor (IDE) or the GitLab user interface. + ### Clone your project Go to your computer's shell and type the following command with your SSH or HTTPS URL: -- cgit v1.2.1 From 0a08fb3cd1f3ce76e384cd0b573297dd4f74fa43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4mmerle?= Date: Thu, 2 Aug 2018 22:51:04 +0200 Subject: Improved custom wiki sidebar docs --- doc/user/project/wiki/index.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/user/project/wiki/index.md b/doc/user/project/wiki/index.md index 95f606fd786..e3c6cd6d6ff 100644 --- a/doc/user/project/wiki/index.md +++ b/doc/user/project/wiki/index.md @@ -116,7 +116,9 @@ instructions. ## Customizing sidebar -By default, the wiki would render a sidebar which lists all the pages for the -wiki. You could as well provide a `_sidebar` page to replace this default -sidebar. When this customized sidebar page is provided, the default sidebar -would not be rendered, but the customized one. +On the project's Wiki page, there is a right side navigation that renders the full Wiki pages list by default, with hierarchy. + +If the Wiki repository contains a `_sidebar` page, the file of this page replaces the default side navigation. +This custom file serves to render it's custom content, fully replacing the standard sidebar. + +Support for displaying a generated TOC with a custom side navigation is planned. -- cgit v1.2.1 From 12712470b354c58860915e38c8a79a75623a3697 Mon Sep 17 00:00:00 2001 From: Fabio Pitino Date: Thu, 2 May 2019 13:29:51 +0100 Subject: Rescue RuntimeError when "too many loops" are reached by Fugit::Cron --- lib/gitlab/ci/cron_parser.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/gitlab/ci/cron_parser.rb b/lib/gitlab/ci/cron_parser.rb index 94f4a4e36c9..ae524654b7d 100644 --- a/lib/gitlab/ci/cron_parser.rb +++ b/lib/gitlab/ci/cron_parser.rb @@ -13,7 +13,7 @@ module Gitlab def next_time_from(time) @cron_line ||= try_parse_cron(@cron, @cron_timezone) - @cron_line.next_time(time).utc.in_time_zone(Time.zone) if @cron_line.present? + find_next_time(time) if @cron_line.present? end def cron_valid? @@ -49,6 +49,14 @@ module Gitlab def try_parse_cron(cron, cron_timezone) Fugit::Cron.parse("#{cron} #{cron_timezone}") end + + def find_next_time(time) + @cron_line.next_time(time).utc.in_time_zone(Time.zone) + rescue RuntimeError => error + raise error unless error.message =~ /too many loops/ + # Fugit::Cron raises a RuntimeError if :next_time does not find the next schedule + # given an invalid pattern - E.g. try_parse_cron('0 12 31 2 *') + end end end end -- cgit v1.2.1 From 9b3b7a58f0f2acf760c99ae595949b55212aa05b Mon Sep 17 00:00:00 2001 From: Fabio Pitino Date: Tue, 30 Apr 2019 13:36:44 +0100 Subject: Write test that exposes bug with Fugit gem --- spec/lib/gitlab/ci/cron_parser_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/lib/gitlab/ci/cron_parser_spec.rb b/spec/lib/gitlab/ci/cron_parser_spec.rb index 2a3f7807fdb..491e3fba9d9 100644 --- a/spec/lib/gitlab/ci/cron_parser_spec.rb +++ b/spec/lib/gitlab/ci/cron_parser_spec.rb @@ -174,6 +174,13 @@ describe Gitlab::Ci::CronParser do it { expect(subject).to be_nil } end + + context 'when cron is scheduled to a non existent day' do + let(:cron) { '0 12 31 2 *' } + let(:cron_timezone) { 'UTC' } + + it { expect(subject).to be_nil } + end end describe '#cron_valid?' do -- cgit v1.2.1 From 6fba1c22dcf8b19b8e6155b6ff3b42acb012be0f Mon Sep 17 00:00:00 2001 From: Fabio Pitino Date: Thu, 2 May 2019 13:29:51 +0100 Subject: Rescue RuntimeError when "too many loops" are reached by Fugit::Cron --- lib/gitlab/ci/cron_parser.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/gitlab/ci/cron_parser.rb b/lib/gitlab/ci/cron_parser.rb index 94f4a4e36c9..ae524654b7d 100644 --- a/lib/gitlab/ci/cron_parser.rb +++ b/lib/gitlab/ci/cron_parser.rb @@ -13,7 +13,7 @@ module Gitlab def next_time_from(time) @cron_line ||= try_parse_cron(@cron, @cron_timezone) - @cron_line.next_time(time).utc.in_time_zone(Time.zone) if @cron_line.present? + find_next_time(time) if @cron_line.present? end def cron_valid? @@ -49,6 +49,14 @@ module Gitlab def try_parse_cron(cron, cron_timezone) Fugit::Cron.parse("#{cron} #{cron_timezone}") end + + def find_next_time(time) + @cron_line.next_time(time).utc.in_time_zone(Time.zone) + rescue RuntimeError => error + raise error unless error.message =~ /too many loops/ + # Fugit::Cron raises a RuntimeError if :next_time does not find the next schedule + # given an invalid pattern - E.g. try_parse_cron('0 12 31 2 *') + end end end end -- cgit v1.2.1 From 0edd1e6714385a87f0cacb25497204d89535d35f Mon Sep 17 00:00:00 2001 From: Fabio Pitino Date: Tue, 30 Apr 2019 13:36:44 +0100 Subject: Write test that exposes bug with Fugit gem --- spec/lib/gitlab/ci/cron_parser_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/lib/gitlab/ci/cron_parser_spec.rb b/spec/lib/gitlab/ci/cron_parser_spec.rb index 2a3f7807fdb..491e3fba9d9 100644 --- a/spec/lib/gitlab/ci/cron_parser_spec.rb +++ b/spec/lib/gitlab/ci/cron_parser_spec.rb @@ -174,6 +174,13 @@ describe Gitlab::Ci::CronParser do it { expect(subject).to be_nil } end + + context 'when cron is scheduled to a non existent day' do + let(:cron) { '0 12 31 2 *' } + let(:cron_timezone) { 'UTC' } + + it { expect(subject).to be_nil } + end end describe '#cron_valid?' do -- cgit v1.2.1 From 673ea5d2ac50e17a1839d0db83641e6851422f88 Mon Sep 17 00:00:00 2001 From: Fabio Pitino Date: Thu, 2 May 2019 13:29:51 +0100 Subject: Rescue RuntimeError when "too many loops" occur With this workaround we temporarily prevent an exception from Fugit gem to be raised in Gitlab::Ci::CronParser --- lib/gitlab/ci/cron_parser.rb | 10 +++++++++- spec/lib/gitlab/ci/cron_parser_spec.rb | 7 +++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/gitlab/ci/cron_parser.rb b/lib/gitlab/ci/cron_parser.rb index 94f4a4e36c9..ae524654b7d 100644 --- a/lib/gitlab/ci/cron_parser.rb +++ b/lib/gitlab/ci/cron_parser.rb @@ -13,7 +13,7 @@ module Gitlab def next_time_from(time) @cron_line ||= try_parse_cron(@cron, @cron_timezone) - @cron_line.next_time(time).utc.in_time_zone(Time.zone) if @cron_line.present? + find_next_time(time) if @cron_line.present? end def cron_valid? @@ -49,6 +49,14 @@ module Gitlab def try_parse_cron(cron, cron_timezone) Fugit::Cron.parse("#{cron} #{cron_timezone}") end + + def find_next_time(time) + @cron_line.next_time(time).utc.in_time_zone(Time.zone) + rescue RuntimeError => error + raise error unless error.message =~ /too many loops/ + # Fugit::Cron raises a RuntimeError if :next_time does not find the next schedule + # given an invalid pattern - E.g. try_parse_cron('0 12 31 2 *') + end end end end diff --git a/spec/lib/gitlab/ci/cron_parser_spec.rb b/spec/lib/gitlab/ci/cron_parser_spec.rb index 491e3fba9d9..a228334d53e 100644 --- a/spec/lib/gitlab/ci/cron_parser_spec.rb +++ b/spec/lib/gitlab/ci/cron_parser_spec.rb @@ -181,6 +181,13 @@ describe Gitlab::Ci::CronParser do it { expect(subject).to be_nil } end + + context 'when cron is scheduled to a non existent day' do + let(:cron) { '0 12 31 2 *' } + let(:cron_timezone) { 'UTC' } + + it { expect(subject).to be_nil } + end end describe '#cron_valid?' do -- cgit v1.2.1 From c75b8ad4dadfa8f9676e0339e06408af3281f512 Mon Sep 17 00:00:00 2001 From: Fabio Pitino Date: Tue, 7 May 2019 07:52:53 +0100 Subject: Remove workaround by upgrading Fugit gem Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/58241 * Upgrade Fugit gem to 1.2.1 which recognizes cron expressions for invalid days * Reverted previously implemented workaround * Leave test case which previously exposed the bug --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- lib/gitlab/ci/cron_parser.rb | 10 +--------- spec/lib/gitlab/ci/cron_parser_spec.rb | 7 ------- 4 files changed, 6 insertions(+), 21 deletions(-) diff --git a/Gemfile b/Gemfile index 1282ff0e20d..a21f9f19458 100644 --- a/Gemfile +++ b/Gemfile @@ -166,7 +166,7 @@ gem 'redis-namespace', '~> 1.6.0' gem 'gitlab-sidekiq-fetcher', '~> 0.4.0', require: 'sidekiq-reliable-fetch' # Cron Parser -gem 'fugit', '~> 1.1' +gem 'fugit', '~> 1.2.1' # HTTP requests gem 'httparty', '~> 0.16.4' diff --git a/Gemfile.lock b/Gemfile.lock index 9b1a036030a..9522f8fa9e0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -190,7 +190,7 @@ GEM equalizer (0.0.11) erubi (1.8.0) escape_utils (1.2.1) - et-orbi (1.1.7) + et-orbi (1.2.1) tzinfo eventmachine (1.2.7) excon (0.62.0) @@ -264,8 +264,8 @@ GEM foreman (0.84.0) thor (~> 0.19.1) formatador (0.2.5) - fugit (1.1.9) - et-orbi (~> 1.1, >= 1.1.7) + fugit (1.2.1) + et-orbi (~> 1.1, >= 1.1.8) raabro (~> 1.1) fuubar (2.2.0) rspec-core (~> 3.0) @@ -1056,7 +1056,7 @@ DEPENDENCIES fog-rackspace (~> 0.1.1) font-awesome-rails (~> 4.7) foreman (~> 0.84.0) - fugit (~> 1.1) + fugit (~> 1.2.1) fuubar (~> 2.2.0) gemojione (~> 3.3) gettext (~> 3.2.2) diff --git a/lib/gitlab/ci/cron_parser.rb b/lib/gitlab/ci/cron_parser.rb index ae524654b7d..94f4a4e36c9 100644 --- a/lib/gitlab/ci/cron_parser.rb +++ b/lib/gitlab/ci/cron_parser.rb @@ -13,7 +13,7 @@ module Gitlab def next_time_from(time) @cron_line ||= try_parse_cron(@cron, @cron_timezone) - find_next_time(time) if @cron_line.present? + @cron_line.next_time(time).utc.in_time_zone(Time.zone) if @cron_line.present? end def cron_valid? @@ -49,14 +49,6 @@ module Gitlab def try_parse_cron(cron, cron_timezone) Fugit::Cron.parse("#{cron} #{cron_timezone}") end - - def find_next_time(time) - @cron_line.next_time(time).utc.in_time_zone(Time.zone) - rescue RuntimeError => error - raise error unless error.message =~ /too many loops/ - # Fugit::Cron raises a RuntimeError if :next_time does not find the next schedule - # given an invalid pattern - E.g. try_parse_cron('0 12 31 2 *') - end end end end diff --git a/spec/lib/gitlab/ci/cron_parser_spec.rb b/spec/lib/gitlab/ci/cron_parser_spec.rb index a228334d53e..491e3fba9d9 100644 --- a/spec/lib/gitlab/ci/cron_parser_spec.rb +++ b/spec/lib/gitlab/ci/cron_parser_spec.rb @@ -181,13 +181,6 @@ describe Gitlab::Ci::CronParser do it { expect(subject).to be_nil } end - - context 'when cron is scheduled to a non existent day' do - let(:cron) { '0 12 31 2 *' } - let(:cron_timezone) { 'UTC' } - - it { expect(subject).to be_nil } - end end describe '#cron_valid?' do -- cgit v1.2.1 From 0eac37efea8206981749f64c3aae668ce95f1926 Mon Sep 17 00:00:00 2001 From: Fabio Pitino Date: Tue, 7 May 2019 08:14:34 +0100 Subject: Remove temporary workaround rescuing RuntimeError --- lib/gitlab/ci/cron_parser.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/gitlab/ci/cron_parser.rb b/lib/gitlab/ci/cron_parser.rb index ae524654b7d..94f4a4e36c9 100644 --- a/lib/gitlab/ci/cron_parser.rb +++ b/lib/gitlab/ci/cron_parser.rb @@ -13,7 +13,7 @@ module Gitlab def next_time_from(time) @cron_line ||= try_parse_cron(@cron, @cron_timezone) - find_next_time(time) if @cron_line.present? + @cron_line.next_time(time).utc.in_time_zone(Time.zone) if @cron_line.present? end def cron_valid? @@ -49,14 +49,6 @@ module Gitlab def try_parse_cron(cron, cron_timezone) Fugit::Cron.parse("#{cron} #{cron_timezone}") end - - def find_next_time(time) - @cron_line.next_time(time).utc.in_time_zone(Time.zone) - rescue RuntimeError => error - raise error unless error.message =~ /too many loops/ - # Fugit::Cron raises a RuntimeError if :next_time does not find the next schedule - # given an invalid pattern - E.g. try_parse_cron('0 12 31 2 *') - end end end end -- cgit v1.2.1 From ccde391648ce9aece94a3b63ccccbd7df67ce693 Mon Sep 17 00:00:00 2001 From: Fabio Pitino Date: Tue, 7 May 2019 08:23:48 +0100 Subject: add changelog --- changelogs/unreleased/fix-too-many-loops-cron-error.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelogs/unreleased/fix-too-many-loops-cron-error.yml diff --git a/changelogs/unreleased/fix-too-many-loops-cron-error.yml b/changelogs/unreleased/fix-too-many-loops-cron-error.yml new file mode 100644 index 00000000000..a9b5b761439 --- /dev/null +++ b/changelogs/unreleased/fix-too-many-loops-cron-error.yml @@ -0,0 +1,5 @@ +--- +title: Fix "too many loops" error by handling gracefully cron schedules for non existent days +merge_request: 28002 +author: +type: fixed -- cgit v1.2.1 From c7d57f2719027388c88e5a87a04003e99db54ec0 Mon Sep 17 00:00:00 2001 From: Sam Bigelow Date: Thu, 9 May 2019 15:57:53 -0400 Subject: Allow hiding of report status icon in report item Allow hiding of all report items' status icons --- .../javascripts/reports/components/issues_list.vue | 6 ++++ .../javascripts/reports/components/report_item.vue | 12 +++++++- .../reports/components/report_section.vue | 6 ++++ .../reports/components/report_item_spec.js | 33 ++++++++++++++++++++++ 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 spec/frontend/reports/components/report_item_spec.js diff --git a/app/assets/javascripts/reports/components/issues_list.vue b/app/assets/javascripts/reports/components/issues_list.vue index f4243522ef8..50f2910e02d 100644 --- a/app/assets/javascripts/reports/components/issues_list.vue +++ b/app/assets/javascripts/reports/components/issues_list.vue @@ -52,6 +52,11 @@ export default { required: false, default: '', }, + showReportSectionStatus: { + type: Boolean, + required: false, + default: true, + }, }, computed: { issuesWithState() { @@ -81,6 +86,7 @@ export default { :status="wrapped.status" :component="component" :is-new="wrapped.isNew" + :show-report-section-status="showReportSectionStatus" /> diff --git a/app/assets/javascripts/reports/components/report_item.vue b/app/assets/javascripts/reports/components/report_item.vue index d2106f9ad2e..01a30809e1a 100644 --- a/app/assets/javascripts/reports/components/report_item.vue +++ b/app/assets/javascripts/reports/components/report_item.vue @@ -34,12 +34,22 @@ export default { required: false, default: false, }, + showReportSectionStatusIcon: { + type: Boolean, + required: false, + default: true, + }, }, }; - + @@ -61,14 +71,18 @@ export default { :source-branch-link="branchLink" :troubleshooting-docs-path="mr.troubleshootingDocsPath" /> -
- -
+ diff --git a/app/assets/javascripts/vue_merge_request_widget/components/review_app_link.vue b/app/assets/javascripts/vue_merge_request_widget/components/review_app_link.vue index de9c122f268..457a71cab95 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/review_app_link.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/review_app_link.vue @@ -19,6 +19,6 @@ export default { diff --git a/app/assets/javascripts/vue_shared/components/clipboard_button.vue b/app/assets/javascripts/vue_shared/components/clipboard_button.vue index 671b4909839..a620f560b52 100644 --- a/app/assets/javascripts/vue_shared/components/clipboard_button.vue +++ b/app/assets/javascripts/vue_shared/components/clipboard_button.vue @@ -7,7 +7,7 @@ * * @example * diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss index 2e38b260f5f..fc488b85138 100644 --- a/app/assets/stylesheets/framework/common.scss +++ b/app/assets/stylesheets/framework/common.scss @@ -5,6 +5,9 @@ .cgreen { color: $green-600; } .cdark { color: $common-gray-dark; } +.fwhite { fill: $white-light; } +.fgray { fill: $gray-700; } + .text-plain, .text-plain:hover { color: $gl-text-color; diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index 709940ba6c8..44b558dd5ff 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -972,10 +972,6 @@ } } - .btn svg { - fill: $gray-700; - } - .dropdown-menu { width: 400px; } diff --git a/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_container_spec.js b/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_container_spec.js index e5155573f6f..dfbc68c48b9 100644 --- a/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_container_spec.js +++ b/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_container_spec.js @@ -1,4 +1,4 @@ -import { shallowMount, createLocalVue } from '@vue/test-utils'; +import { mount, createLocalVue } from '@vue/test-utils'; import MrWidgetPipelineContainer from '~/vue_merge_request_widget/components/mr_widget_pipeline_container.vue'; import MrWidgetPipeline from '~/vue_merge_request_widget/components/mr_widget_pipeline.vue'; import { mockStore } from '../mock_data'; @@ -9,7 +9,7 @@ describe('MrWidgetPipelineContainer', () => { const factory = (props = {}) => { const localVue = createLocalVue(); - wrapper = shallowMount(localVue.extend(MrWidgetPipelineContainer), { + wrapper = mount(localVue.extend(MrWidgetPipelineContainer), { propsData: { mr: Object.assign({}, mockStore), ...props, diff --git a/spec/javascripts/vue_mr_widget/mock_data.js b/spec/javascripts/vue_mr_widget/mock_data.js index dda16375103..bec16b0aab0 100644 --- a/spec/javascripts/vue_mr_widget/mock_data.js +++ b/spec/javascripts/vue_mr_widget/mock_data.js @@ -235,11 +235,44 @@ export default { troubleshooting_docs_path: 'help', merge_request_pipelines_docs_path: '/help/ci/merge_request_pipelines/index.md', squash: true, + visual_review_app_available: true, }; export const mockStore = { - pipeline: { id: 0 }, - mergePipeline: { id: 1 }, + pipeline: { + id: 0, + details: { + status: { + details_path: '/root/review-app-tester/pipelines/66', + favicon: + '/assets/ci_favicons/favicon_status_success-8451333011eee8ce9f2ab25dc487fe24a8758c694827a582f17f42b0a90446a2. png', + group: 'success-with-warnings', + has_details: true, + icon: 'status_warning', + illustration: null, + label: 'passed with warnings', + text: 'passed', + tooltip: 'passed', + }, + }, + }, + mergePipeline: { + id: 1, + details: { + status: { + details_path: '/root/review-app-tester/pipelines/66', + favicon: + '/assets/ci_favicons/favicon_status_success-8451333011eee8ce9f2ab25dc487fe24a8758c694827a582f17f42b0a90446a2. png', + group: 'success-with-warnings', + has_details: true, + icon: 'status_warning', + illustration: null, + label: 'passed with warnings', + text: 'passed', + tooltip: 'passed', + }, + }, + }, targetBranch: 'target-branch', sourceBranch: 'source-branch', sourceBranchLink: 'source-branch-link', -- cgit v1.2.1 From 489021a36bc8ec69f8a2cd5848c676fe1560236a Mon Sep 17 00:00:00 2001 From: Evan Read Date: Mon, 20 May 2019 18:07:48 +0000 Subject: Fix content to not contradict --- doc/ci/merge_request_pipelines/index.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/ci/merge_request_pipelines/index.md b/doc/ci/merge_request_pipelines/index.md index 4492362e915..b3ff55daea2 100644 --- a/doc/ci/merge_request_pipelines/index.md +++ b/doc/ci/merge_request_pipelines/index.md @@ -70,15 +70,18 @@ when a merge request was created or updated. For example: ## Pipelines for Merged Results **[PREMIUM]** > [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/7380) in [GitLab Premium](https://about.gitlab.com/pricing/) 11.10. +> This feature is disabled by default until we resolve issues with [contention handling](https://gitlab.com/gitlab-org/gitlab-ee/issues/9186), but [can be enabled manually](#enabling-pipelines-for-merged-results). It's possible for your source and target branches to diverge, which can result in the scenario that source branch's pipeline was green, the target's pipeline was green, -but the combined output fails. By having your merge request pipeline automatically +but the combined output fails. + +By having your merge request pipeline automatically create a new ref that contains the merge result of the source and target branch (then running a pipeline on that ref), we can better test that the combined result is also valid. -From GitLab 11.10, pipelines for merge requests run by default +GitLab can run pipelines for merge requests on this merged result. That is, where the source and target branches are combined into a new ref and a pipeline for this ref validates the result prior to merging. @@ -95,7 +98,7 @@ get out of WIP status or resolve merge conflicts as soon as possible. ### Enabling Pipelines for Merged Results -This feature disabled by default until we resolve issues with [contention handling](https://gitlab.com/gitlab-org/gitlab-ee/issues/9186). It can be enabled at the project level: +To enable pipelines on merged results at the project level: 1. Visit your project's **Settings > General** and expand **Merge requests**. 1. Check **Merge pipelines will try to validate the post-merge result prior to merging**. -- cgit v1.2.1 From 09ef4348cf7c399c4a4ac9ce3f5a84139dc2b611 Mon Sep 17 00:00:00 2001 From: Lucas Charles Date: Mon, 20 May 2019 18:13:10 +0000 Subject: Update dependency scanning docs - Clarify sort order --- doc/user/application_security/dependency_scanning/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/user/application_security/dependency_scanning/index.md b/doc/user/application_security/dependency_scanning/index.md index 2d0c2be4233..5d2bb4e572b 100644 --- a/doc/user/application_security/dependency_scanning/index.md +++ b/doc/user/application_security/dependency_scanning/index.md @@ -19,8 +19,9 @@ merge request. ![Dependency Scanning Widget](img/dependency_scanning.png) -The results are sorted by the priority of the vulnerability: +The results are sorted by the severity of the vulnerability: +1. Critical 1. High 1. Medium 1. Low -- cgit v1.2.1 From c68d77117ad7636c6c61e0f708ca4ddd421c7bdf Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 20 May 2019 18:27:49 +0000 Subject: Link to JUnit test reports from the MR index page --- doc/user/project/merge_requests/index.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md index 2bb2d906453..723195224d0 100644 --- a/doc/user/project/merge_requests/index.md +++ b/doc/user/project/merge_requests/index.md @@ -397,6 +397,14 @@ GitLab can scan and report any vulnerabilities found in your project. [Read more about security reports.](https://docs.gitlab.com/ee/user/application_security/index.html) +## JUnit test reports + +Configure your CI jobs to use JUnit test reports, and let GitLab display a report +on the merge request so that it’s easier and faster to identify the failure +without having to check the entire job log. + +[Read more about JUnit test reports](../../../ci/junit_test_reports.md). + ## Live preview with Review Apps If you configured [Review Apps](https://about.gitlab.com/features/review-apps/) for your project, -- cgit v1.2.1 From ddd1d42421368cea8390403780052b67438621f9 Mon Sep 17 00:00:00 2001 From: David Coy Date: Mon, 20 May 2019 18:31:52 +0000 Subject: Docs: Add TZInfo formatted timezones --- doc/workflow/timezone.md | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/doc/workflow/timezone.md b/doc/workflow/timezone.md index 338b3a32265..da51c0f2c93 100644 --- a/doc/workflow/timezone.md +++ b/doc/workflow/timezone.md @@ -1,31 +1,39 @@ # Changing your time zone The global time zone configuration parameter can be changed in `config/gitlab.yml`: + ``` - # time_zone: 'UTC' +# time_zone: 'UTC' ``` -Uncomment and customize if you want to change the default time zone of GitLab application. +Uncomment and customize if you want to change the default time zone of the GitLab application. + + +## Viewing available timezones To see all available time zones, run `bundle exec rake time:zones:all`. -With Omnibus installations, run `gitlab-rake time:zones:all`. +For Omnibus installations, run `gitlab-rake time:zones:all`. + +NOTE: **Note:** +Currently, this rake task does not list timezones in TZInfo format required by GitLab Omnibus during a reconfigure: [#58672](https://gitlab.com/gitlab-org/gitlab-ce/issues/58672). ## Changing time zone in omnibus installations GitLab defaults its time zone to UTC. It has a global timezone configuration parameter in `/etc/gitlab/gitlab.rb`. -To update, add the time zone that best applies to your location. Here are two examples: +To obtain a list of timezones, log in to your GitLab application server and run a command that generates a list of timezones in TZInfo format for the server. For example, install `timedatectl` and run `timedatectl list-timezones`. + +To update, add the timezone that best applies to your location. For example: + ``` gitlab_rails['time_zone'] = 'America/New_York' ``` -or -``` -gitlab_rails['time_zone'] = 'Europe/Brussels' -``` -After you added this field, reconfigure and restart: +After adding the configuration parameter, reconfigure and restart your GitLab instance: + ``` gitlab-ctl reconfigure gitlab-ctl restart ``` + -- cgit v1.2.1