Skip to content

Commit

Permalink
Add latest changes from gitlab-org/gitlab@master
Browse files Browse the repository at this point in the history
  • Loading branch information
GitLab Bot committed Sep 24, 2020
1 parent 28b18e3 commit 5ff6f27
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 28 deletions.
1 change: 1 addition & 0 deletions app/assets/javascripts/boards/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export default () => {
boardId: $boardApp.dataset.boardId,
groupId: Number($boardApp.dataset.groupId) || null,
rootPath: $boardApp.dataset.rootPath,
canUpdate: $boardApp.dataset.canUpdate,
},
store,
apolloProvider,
Expand Down
4 changes: 2 additions & 2 deletions app/views/projects/ci/lints/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- page_title _("CI Lint")
- page_description _("Validate your GitLab CI configuration file")
- unless Feature.enabled?(:monaco_ci)
- unless Feature.enabled?(:monaco_ci, default_enabled: true)
- content_for :library_javascripts do
= page_specific_javascript_tag('lib/ace.js')

Expand All @@ -17,7 +17,7 @@
.file-holder
.js-file-title.file-title.clearfix
= _("Contents of .gitlab-ci.yml")
- if Feature.enabled?(:monaco_ci)
- if Feature.enabled?(:monaco_ci, default_enabled: true)
.file-editor.code
.js-edit-mode-pane.qa-editor#editor{ data: { 'editor-loading': true } }<
%pre.editor-loading-content= params[:content]
Expand Down
5 changes: 5 additions & 0 deletions changelogs/unreleased/198612-monaco-ci-default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Replaced ACE with Editor Lite for CI linting
merge_request: 42814
author:
type: added
5 changes: 5 additions & 0 deletions changelogs/unreleased/migrate-recover-hidden-stage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Migrate Recover hidden stage dropdown
merge_request: 43032
author:
type: other
6 changes: 3 additions & 3 deletions config/feature_flags/development/build_service_proxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: build_service_proxy
introduced_by_url:
rollout_issue_url:
group:
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/9723
rollout_issue_url:
group: group::editor
type: development
default_enabled: false
8 changes: 4 additions & 4 deletions config/feature_flags/development/monaco_ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: monaco_ci
introduced_by_url:
rollout_issue_url:
group:
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23666
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/249137
group: group::editor
type: development
default_enabled: false
default_enabled: true
6 changes: 3 additions & 3 deletions config/feature_flags/development/resource_access_token.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: resource_access_token
introduced_by_url:
rollout_issue_url:
group:
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/29622
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/235765
group: group::access
type: development
default_enabled: true
6 changes: 3 additions & 3 deletions config/feature_flags/development/snippet_multiple_files.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: snippet_multiple_files
introduced_by_url:
rollout_issue_url:
group:
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/32416
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/217809
group: group::editor
type: development
default_enabled: false
2 changes: 0 additions & 2 deletions doc/development/pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ graph RL;
click 2_2-5 "https://app.periscopedata.com/app/gitlab/652085/Engineering-Productivity---Pipeline-Build-Durations?widget=8404303&udv=0"
subgraph "Needs `setup-test-env` & `compile-test-assets`";
2_2-2 & 2_2-4 & 2_2-5 --> 1-6 & 1-3;
2_2-3 --> 1-6 & 1-4;
end
2_3-1["build-assets-image (2.5 minutes)"];
Expand Down Expand Up @@ -228,7 +227,6 @@ graph RL;
click 2_2-5 "https://app.periscopedata.com/app/gitlab/652085/Engineering-Productivity---Pipeline-Build-Durations?widget=8404303&udv=0"
subgraph "Needs `setup-test-env` & `compile-test-assets`";
2_2-2 & 2_2-4 & 2_2-5 --> 1-6 & 1-3;
2_2-3 --> 1-6 & 1-4;
end
2_3-1["build-assets-image (2.5 minutes)"];
Expand Down
18 changes: 9 additions & 9 deletions doc/user/project/merge_requests/test_coverage_visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ info: To determine the technical writer assigned to the Stage/Group associated w
type: reference, howto
---

# Test Coverage Visualization **(CORE ONLY)**
# Test Coverage Visualization

> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3708) in GitLab 12.9.
> - [Feature flag enabled](https://gitlab.com/gitlab-org/gitlab/-/issues/211410) in GitLab 13.4.
> - It's enabled on GitLab.com.
> - It can be disabled per-project.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enabling-the-feature). **(CORE ONLY)**
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-code-coverage-visualization). **(CORE ONLY)**
With the help of [GitLab CI/CD](../../../ci/README.md), you can collect the test
coverage information of your favorite testing or coverage-analysis tool, and visualize
Expand Down Expand Up @@ -74,26 +74,26 @@ test:
cobertura: coverage/cobertura-coverage.xml
```
## Enabling the feature
## Enable or disable code coverage visualization
This feature comes with the `:coverage_report_view` feature flag enabled by
default. It is enabled on GitLab.com. [GitLab administrators with access to the GitLab Rails console](../../../administration/feature_flags.md)
can disable it for your instance. Test coverage visualization can be enabled or disabled per-project.

To enable it:
To disable it:

```ruby
# Instance-wide
Feature.enable(:coverage_report_view)
Feature.disable(:coverage_report_view)
# or by project
Feature.enable(:coverage_report_view, Project.find(<project id>))
Feature.disable(:coverage_report_view, Project.find(<project id>))
```

To disable it:
To enable it:

```ruby
# Instance-wide
Feature.disable(:coverage_report_view)
Feature.enable(:coverage_report_view)
# or by project
Feature.disable(:coverage_report_view, Project.find(<project id>))
Feature.enable(:coverage_report_view, Project.find(<project id>))
```
2 changes: 1 addition & 1 deletion lib/gitlab/gon_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def add_gon_variables
# made globally available to the frontend
push_frontend_feature_flag(:snippets_vue, default_enabled: true)
push_frontend_feature_flag(:monaco_blobs, default_enabled: true)
push_frontend_feature_flag(:monaco_ci, default_enabled: false)
push_frontend_feature_flag(:monaco_ci, default_enabled: true)
push_frontend_feature_flag(:snippets_edit_vue, default_enabled: true)
push_frontend_feature_flag(:webperf_experiment, default_enabled: false)
push_frontend_feature_flag(:snippets_binary_blob, default_enabled: false)
Expand Down
8 changes: 7 additions & 1 deletion lib/gitlab/webpack/manifest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def initialize(errors)
AssetMissingError = Class.new(StandardError)

class << self
include Gitlab::Utils::StrongMemoize

def entrypoint_paths(source)
raise WebpackError, manifest["errors"] unless manifest_bundled?

Expand Down Expand Up @@ -55,6 +57,10 @@ def asset_paths(source)
end
end

def clear_manifest!
clear_memoization(:manifest)
end

private

def manifest_bundled?
Expand All @@ -67,7 +73,7 @@ def manifest
load_manifest
else
# ... otherwise cache at class level, as JSON loading/parsing can be expensive
@manifest ||= load_manifest
strong_memoize(:manifest) { load_manifest }
end
end

Expand Down
5 changes: 5 additions & 0 deletions locale/gitlab.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,11 @@ msgid_plural "%d Days"
msgstr[0] ""
msgstr[1] ""

msgid "1 Issue"
msgid_plural "%d Issues"
msgstr[0] ""
msgstr[1] ""

msgid "1 closed issue"
msgid_plural "%{issues} closed issues"
msgstr[0] ""
Expand Down
8 changes: 8 additions & 0 deletions spec/lib/gitlab/webpack/manifest_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
EOF
end

around do |example|
Gitlab::Webpack::Manifest.clear_manifest!

example.run

Gitlab::Webpack::Manifest.clear_manifest!
end

shared_examples_for "a valid manifest" do
it "returns single entry asset paths from the manifest" do
expect(Gitlab::Webpack::Manifest.asset_paths("entry2")).to eq(["/public_path/entry2.js"])
Expand Down

0 comments on commit 5ff6f27

Please sign in to comment.