summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/authentication/mount_2fa.js14
-rw-r--r--app/assets/javascripts/authentication/u2f/authenticate.js (renamed from app/assets/javascripts/u2f/authenticate.js)0
-rw-r--r--app/assets/javascripts/authentication/u2f/error.js (renamed from app/assets/javascripts/u2f/error.js)0
-rw-r--r--app/assets/javascripts/authentication/u2f/index.js (renamed from app/assets/javascripts/shared/sessions/u2f.js)4
-rw-r--r--app/assets/javascripts/authentication/u2f/register.js (renamed from app/assets/javascripts/u2f/register.js)0
-rw-r--r--app/assets/javascripts/authentication/u2f/util.js (renamed from app/assets/javascripts/u2f/util.js)0
-rw-r--r--app/assets/javascripts/issue.js10
-rw-r--r--app/assets/javascripts/pages/ldap/omniauth_callbacks/index.js4
-rw-r--r--app/assets/javascripts/pages/omniauth_callbacks/index.js4
-rw-r--r--app/assets/javascripts/pages/profiles/two_factor_auths/index.js6
-rw-r--r--app/assets/javascripts/pages/sessions/index.js4
-rw-r--r--app/controllers/registrations_controller.rb3
-rw-r--r--app/views/projects/issues/show.html.haml2
-rw-r--r--app/views/shared/issuable/_close_reopen_report_toggle.html.haml2
-rw-r--r--changelogs/unreleased/218036-cannot-delete-account-on-gitlab-com.yml5
-rw-r--r--changelogs/unreleased/219323-no-event-fired-at-clicking-close-issue-button-in-issue-page.yml5
-rw-r--r--config/routes.rb12
-rw-r--r--db/migrate/20200526153844_add_issues_last_edited_by_id_index.rb19
-rw-r--r--db/structure.sql5
-rw-r--r--doc/administration/feature_flags.md12
-rw-r--r--doc/development/documentation/feature_flags.md22
-rw-r--r--doc/user/compliance/license_compliance/index.md85
-rw-r--r--spec/frontend/authentication/u2f/authenticate_spec.js (renamed from spec/frontend/u2f/authenticate_spec.js)2
-rw-r--r--spec/frontend/authentication/u2f/mock_u2f_device.js (renamed from spec/frontend/u2f/mock_u2f_device.js)0
-rw-r--r--spec/frontend/authentication/u2f/register_spec.js (renamed from spec/frontend/u2f/register_spec.js)2
-rw-r--r--spec/frontend/authentication/u2f/util_spec.js (renamed from spec/frontend/u2f/util_spec.js)2
-rw-r--r--spec/frontend/fixtures/static/issue_with_mermaid_graph.html4
27 files changed, 194 insertions, 34 deletions
diff --git a/app/assets/javascripts/authentication/mount_2fa.js b/app/assets/javascripts/authentication/mount_2fa.js
new file mode 100644
index 00000000000..9917151ac81
--- /dev/null
+++ b/app/assets/javascripts/authentication/mount_2fa.js
@@ -0,0 +1,14 @@
+import $ from 'jquery';
+import initU2F from './u2f';
+import U2FRegister from './u2f/register';
+
+export const mount2faAuthentication = () => {
+ // Soon this will conditionally mount a webauthn app (see https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26692)
+ initU2F();
+};
+
+export const mount2faRegistration = () => {
+ // Soon this will conditionally mount a webauthn app (see https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26692)
+ const u2fRegister = new U2FRegister($('#js-register-u2f'), gon.u2f);
+ u2fRegister.start();
+};
diff --git a/app/assets/javascripts/u2f/authenticate.js b/app/assets/javascripts/authentication/u2f/authenticate.js
index 6244df1180e..6244df1180e 100644
--- a/app/assets/javascripts/u2f/authenticate.js
+++ b/app/assets/javascripts/authentication/u2f/authenticate.js
diff --git a/app/assets/javascripts/u2f/error.js b/app/assets/javascripts/authentication/u2f/error.js
index ca0fc0700ad..ca0fc0700ad 100644
--- a/app/assets/javascripts/u2f/error.js
+++ b/app/assets/javascripts/authentication/u2f/error.js
diff --git a/app/assets/javascripts/shared/sessions/u2f.js b/app/assets/javascripts/authentication/u2f/index.js
index 6ae9faf1dde..6e0d1c308f6 100644
--- a/app/assets/javascripts/shared/sessions/u2f.js
+++ b/app/assets/javascripts/authentication/u2f/index.js
@@ -1,5 +1,5 @@
import $ from 'jquery';
-import U2FAuthenticate from '../../u2f/authenticate';
+import U2FAuthenticate from './authenticate';
export default () => {
if (!gon.u2f) return;
@@ -12,6 +12,6 @@ export default () => {
document.querySelector('.js-2fa-form'),
);
u2fAuthenticate.start();
- // needed in rspec
+ // needed in rspec (FakeU2fDevice)
gl.u2fAuthenticate = u2fAuthenticate;
};
diff --git a/app/assets/javascripts/u2f/register.js b/app/assets/javascripts/authentication/u2f/register.js
index f5a422727ad..f5a422727ad 100644
--- a/app/assets/javascripts/u2f/register.js
+++ b/app/assets/javascripts/authentication/u2f/register.js
diff --git a/app/assets/javascripts/u2f/util.js b/app/assets/javascripts/authentication/u2f/util.js
index b706481c02f..b706481c02f 100644
--- a/app/assets/javascripts/u2f/util.js
+++ b/app/assets/javascripts/authentication/u2f/util.js
diff --git a/app/assets/javascripts/issue.js b/app/assets/javascripts/issue.js
index 4167b938148..252e8e92f5e 100644
--- a/app/assets/javascripts/issue.js
+++ b/app/assets/javascripts/issue.js
@@ -100,9 +100,10 @@ export default class Issue {
initIssueBtnEventListeners() {
const issueFailMessage = __('Unable to update this issue at this time.');
- return $(document).on(
+ // NOTE: data attribute seems unnecessary but is actually necessary
+ return $('.js-issuable-buttons[data-action="close-reopen"]').on(
'click',
- '.js-issuable-actions a.btn-close, .js-issuable-actions a.btn-reopen, a.btn-close-anyway',
+ 'a.btn-close, a.btn-reopen, a.btn-close-anyway',
e => {
e.preventDefault();
e.stopImmediatePropagation();
@@ -119,10 +120,7 @@ export default class Issue {
} else {
this.disableCloseReopenButton($button);
- const url = $button.data('close-reopen-url');
- if (!url) {
- return;
- }
+ const url = $button.attr('href');
return axios
.put(url)
diff --git a/app/assets/javascripts/pages/ldap/omniauth_callbacks/index.js b/app/assets/javascripts/pages/ldap/omniauth_callbacks/index.js
index edd7e38471b..e93def5323f 100644
--- a/app/assets/javascripts/pages/ldap/omniauth_callbacks/index.js
+++ b/app/assets/javascripts/pages/ldap/omniauth_callbacks/index.js
@@ -1,3 +1,3 @@
-import initU2F from '../../../shared/sessions/u2f';
+import { mount2faAuthentication } from '~/authentication/mount_2fa';
-document.addEventListener('DOMContentLoaded', initU2F);
+document.addEventListener('DOMContentLoaded', mount2faAuthentication);
diff --git a/app/assets/javascripts/pages/omniauth_callbacks/index.js b/app/assets/javascripts/pages/omniauth_callbacks/index.js
index c2c069d1ca8..e93def5323f 100644
--- a/app/assets/javascripts/pages/omniauth_callbacks/index.js
+++ b/app/assets/javascripts/pages/omniauth_callbacks/index.js
@@ -1,3 +1,3 @@
-import initU2F from '../../shared/sessions/u2f';
+import { mount2faAuthentication } from '~/authentication/mount_2fa';
-document.addEventListener('DOMContentLoaded', initU2F);
+document.addEventListener('DOMContentLoaded', mount2faAuthentication);
diff --git a/app/assets/javascripts/pages/profiles/two_factor_auths/index.js b/app/assets/javascripts/pages/profiles/two_factor_auths/index.js
index 95936c2d1db..1aeba6669ee 100644
--- a/app/assets/javascripts/pages/profiles/two_factor_auths/index.js
+++ b/app/assets/javascripts/pages/profiles/two_factor_auths/index.js
@@ -1,6 +1,5 @@
-import $ from 'jquery';
-import U2FRegister from '~/u2f/register';
import { parseBoolean } from '~/lib/utils/common_utils';
+import { mount2faRegistration } from '~/authentication/mount_2fa';
document.addEventListener('DOMContentLoaded', () => {
const twoFactorNode = document.querySelector('.js-two-factor-auth');
@@ -12,6 +11,5 @@ document.addEventListener('DOMContentLoaded', () => {
if (flashAlert) flashAlert.insertAdjacentHTML('beforeend', button);
}
- const u2fRegister = new U2FRegister($('#js-register-u2f'), gon.u2f);
- u2fRegister.start();
+ mount2faRegistration();
});
diff --git a/app/assets/javascripts/pages/sessions/index.js b/app/assets/javascripts/pages/sessions/index.js
index c2c069d1ca8..e93def5323f 100644
--- a/app/assets/javascripts/pages/sessions/index.js
+++ b/app/assets/javascripts/pages/sessions/index.js
@@ -1,3 +1,3 @@
-import initU2F from '../../shared/sessions/u2f';
+import { mount2faAuthentication } from '~/authentication/mount_2fa';
-document.addEventListener('DOMContentLoaded', initU2F);
+document.addEventListener('DOMContentLoaded', mount2faAuthentication);
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index c7da029d2f3..fa691af135b 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -68,6 +68,9 @@ class RegistrationsController < Devise::RegistrationsController
if result[:status] == :success
track_experiment_event(:signup_flow, 'end') # We want this event to be tracked when the user is _in_ the experimental group
+
+ return redirect_to new_users_sign_up_group_path if experiment_enabled?(:onboarding_issues) && !helpers.in_subscription_flow? && !helpers.in_invitation_flow?
+
set_flash_message! :notice, :signed_up
redirect_to path_for_signed_in_user(current_user)
else
diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml
index 9623b6edbef..4d24b510267 100644
--- a/app/views/projects/issues/show.html.haml
+++ b/app/views/projects/issues/show.html.haml
@@ -33,7 +33,7 @@
%a.btn.btn-default.float-right.d-block.d-sm-none.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" }
= icon('angle-double-left')
- .detail-page-header-actions.js-issuable-actions
+ .detail-page-header-actions.js-issuable-actions.js-issuable-buttons{ data: { "action": "close-reopen" } }
.clearfix.issue-btn-group.dropdown
%button.btn.btn-default.float-left.d-md-none.d-lg-none.d-xl-none{ type: "button", data: { toggle: "dropdown" } }
Options
diff --git a/app/views/shared/issuable/_close_reopen_report_toggle.html.haml b/app/views/shared/issuable/_close_reopen_report_toggle.html.haml
index 8575a61aae8..9d718083d2d 100644
--- a/app/views/shared/issuable/_close_reopen_report_toggle.html.haml
+++ b/app/views/shared/issuable/_close_reopen_report_toggle.html.haml
@@ -11,7 +11,7 @@
.float-left.btn-group.prepend-left-10.issuable-close-dropdown.droplab-dropdown.js-issuable-close-dropdown
= link_to "#{display_button_action} #{display_issuable_type}", close_reopen_issuable_path(issuable),
- method: button_method, class: "#{button_class} btn-#{button_action} #{(add_blocked_class ? 'btn-issue-blocked' : '')}", title: "#{display_button_action} #{display_issuable_type}", data: { qa_selector: 'close_issue_button', 'close-reopen-url': close_reopen_issuable_path(issuable) }
+ method: button_method, class: "#{button_class} btn-#{button_action} #{(add_blocked_class ? 'btn-issue-blocked' : '')}", title: "#{display_button_action} #{display_issuable_type}", data: { qa_selector: 'close_issue_button' }
= button_tag type: 'button', class: "#{toggle_class} btn-#{button_action}-color",
data: { 'dropdown-trigger' => '#issuable-close-menu' }, 'aria-label' => _('Toggle dropdown') do
diff --git a/changelogs/unreleased/218036-cannot-delete-account-on-gitlab-com.yml b/changelogs/unreleased/218036-cannot-delete-account-on-gitlab-com.yml
new file mode 100644
index 00000000000..fa95f5e36c5
--- /dev/null
+++ b/changelogs/unreleased/218036-cannot-delete-account-on-gitlab-com.yml
@@ -0,0 +1,5 @@
+---
+title: Add index to issues and epics on last_edited_by_id
+merge_request: 33075
+author:
+type: performance
diff --git a/changelogs/unreleased/219323-no-event-fired-at-clicking-close-issue-button-in-issue-page.yml b/changelogs/unreleased/219323-no-event-fired-at-clicking-close-issue-button-in-issue-page.yml
new file mode 100644
index 00000000000..8bad64fdac4
--- /dev/null
+++ b/changelogs/unreleased/219323-no-event-fired-at-clicking-close-issue-button-in-issue-page.yml
@@ -0,0 +1,5 @@
+---
+title: Fix close issue when user created the issue
+merge_request: 33294
+author:
+type: fixed
diff --git a/config/routes.rb b/config/routes.rb
index dfc9be3d4f8..e6b7315e0bb 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -45,9 +45,15 @@ Rails.application.routes.draw do
use_doorkeeper_openid_connect
# Sign up
- get 'users/sign_up/welcome' => 'registrations#welcome'
- get 'users/sign_up/experience_level' => 'registrations#experience_level'
- patch 'users/sign_up/update_registration' => 'registrations#update_registration'
+ scope path: '/users/sign_up', module: :registrations, as: :users_sign_up do
+ get :welcome
+ patch :update_registration
+ get :experience_level
+
+ Gitlab.ee do
+ resources :groups, only: [:new, :create]
+ end
+ end
# Search
get 'search' => 'search#show'
diff --git a/db/migrate/20200526153844_add_issues_last_edited_by_id_index.rb b/db/migrate/20200526153844_add_issues_last_edited_by_id_index.rb
new file mode 100644
index 00000000000..85f121a4c02
--- /dev/null
+++ b/db/migrate/20200526153844_add_issues_last_edited_by_id_index.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddIssuesLastEditedByIdIndex < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :issues, :last_edited_by_id
+ add_concurrent_index :epics, :last_edited_by_id
+ end
+
+ def down
+ remove_concurrent_index :issues, :last_edited_by_id
+ remove_concurrent_index :epics, :last_edited_by_id
+ end
+end
diff --git a/db/structure.sql b/db/structure.sql
index f35e1a2e3df..bb60f09fb6b 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -9642,6 +9642,8 @@ CREATE INDEX index_epics_on_group_id_and_iid_varchar_pattern ON public.epics USI
CREATE INDEX index_epics_on_iid ON public.epics USING btree (iid);
+CREATE INDEX index_epics_on_last_edited_by_id ON public.epics USING btree (last_edited_by_id);
+
CREATE INDEX index_epics_on_lock_version ON public.epics USING btree (lock_version) WHERE (lock_version IS NULL);
CREATE INDEX index_epics_on_parent_id ON public.epics USING btree (parent_id);
@@ -9876,6 +9878,8 @@ CREATE INDEX index_issues_on_description_trigram ON public.issues USING gin (des
CREATE INDEX index_issues_on_duplicated_to_id ON public.issues USING btree (duplicated_to_id) WHERE (duplicated_to_id IS NOT NULL);
+CREATE INDEX index_issues_on_last_edited_by_id ON public.issues USING btree (last_edited_by_id);
+
CREATE INDEX index_issues_on_lock_version ON public.issues USING btree (lock_version) WHERE (lock_version IS NULL);
CREATE INDEX index_issues_on_milestone_id ON public.issues USING btree (milestone_id);
@@ -13959,6 +13963,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200525114553
20200525121014
20200526120714
+20200526153844
20200526164946
20200526164947
20200527094322
diff --git a/doc/administration/feature_flags.md b/doc/administration/feature_flags.md
index 435c8709f8b..6dab9e39aa7 100644
--- a/doc/administration/feature_flags.md
+++ b/doc/administration/feature_flags.md
@@ -94,6 +94,18 @@ Example, to disable Evidence Collection:
Feature.disable(:release_evidence_collection)
```
+Some feature flags can be enabled or disabled on a per project basis:
+
+```ruby
+Feature.enable(:<feature flag>, Project.find(<project id>))
+```
+
+For example, to enable the [`:release_evidence_collection`](../ci/junit_test_reports.md#enabling-the-feature) feature flag for project `1234`:
+
+```ruby
+Feature.enable(:release_evidence_collection, Project.find(1234))
+```
+
When the feature is ready, GitLab will remove the feature flag, the option for
enabling and disabling it will no longer exist, and the feature will become
available in all instances.
diff --git a/doc/development/documentation/feature_flags.md b/doc/development/documentation/feature_flags.md
index 373c5a4ee7d..f3ce9ce3a83 100644
--- a/doc/development/documentation/feature_flags.md
+++ b/doc/development/documentation/feature_flags.md
@@ -43,10 +43,11 @@ For feature flags disabled by default, if they can be used by end users:
- Say that it's disabled by default.
- Say whether it's enabled on GitLab.com.
+- Say whether it can be enabled or disabled per-project.
- Say whether it's recommended for production use.
- Document how to enable and disable it.
-For example, for a feature disabled by default, disabled on GitLab.com, and
+For example, for a feature disabled by default, disabled on GitLab.com, can be enabled or disabled per-project, and
not ready for production use:
````markdown
@@ -55,6 +56,7 @@ not ready for production use:
> - [Introduced](link-to-issue) in GitLab 12.0.
> - It's deployed behind a feature flag, disabled by default.
> - It's disabled on GitLab.com.
+> - It's able to be enabled or disabled per-project
> - It's not recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#anchor-to-section). **(CORE ONLY)**
@@ -65,18 +67,24 @@ not ready for production use:
<Feature Name> is under development and not ready for production use. It is
deployed behind a feature flag that is **disabled by default**.
[GitLab administrators with access to the GitLab Rails console](../path/to/administration/feature_flags.md)
-can enable it for your instance.
+can enable it for your instance. <Feature Name> can be enabled or disabled per-project
To enable it:
```ruby
+# Instance-wide
Feature.enable(:<feature flag>)
+# or by project
+Feature.enable(:<feature flag>, Project.find(<project id>))
```
To disable it:
```ruby
+# Instance-wide
Feature.disable(:<feature flag>)
+# or by project
+Feature.disable(:<feature flag>, Project.find(<project id>))
```
````
@@ -88,10 +96,11 @@ For features that became enabled by default:
- Say that it became enabled by default.
- Say whether it's enabled on GitLab.com.
+- Say whether it can be enabled or disabled per-project.
- Say whether it's recommended for production use.
- Document how to disable and enable it.
-For example, for a feature initially deployed disabled by default, that became enabled by default, that is enabled on GitLab.com, and ready for production use:
+For example, for a feature initially deployed disabled by default, that became enabled by default, that is enabled on GitLab.com, that cannot be enabled or disabled per-project, and ready for production use:
````markdown
# Feature Name
@@ -100,6 +109,7 @@ For example, for a feature initially deployed disabled by default, that became e
> - It was deployed behind a feature flag, disabled by default.
> - [Became enabled by default](link-to-issue) on GitLab 12.1.
> - It's enabled on GitLab.com.
+> - It's not able to be enabled or disabled per-project
> - It's recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#anchor-to-section). **(CORE ONLY)**
@@ -110,7 +120,7 @@ For example, for a feature initially deployed disabled by default, that became e
<Feature Name> is under development but ready for production use.
It is deployed behind a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](..path/to/administration/feature_flags.md)
-can opt to disable it for your instance.
+can opt to disable it for your instance it cannot be enabled or disabled per-project.
To disable it:
@@ -133,10 +143,11 @@ For features enabled by default:
- Say it's enabled by default.
- Say whether it's enabled on GitLab.com.
+- Say whether it can be enabled or disabled per-project.
- Say whether it's recommended for production use.
- Document how to disable and enable it.
-For example, for a feature enabled by default, enabled on GitLab.com, and ready for production use:
+For example, for a feature enabled by default, enabled on GitLab.com, cannot be enabled or disabled per-project, and ready for production use:
````markdown
# Feature Name
@@ -144,6 +155,7 @@ For example, for a feature enabled by default, enabled on GitLab.com, and ready
> - [Introduced](link-to-issue) in GitLab 12.0.
> - It's deployed behind a feature flag, enabled by default.
> - It's enabled on GitLab.com.
+> - It's not able to be enabled or disabled per-project
> - It's recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#anchor-to-section). **(CORE ONLY)**
diff --git a/doc/user/compliance/license_compliance/index.md b/doc/user/compliance/license_compliance/index.md
index 51f8cc2e3d6..1e285acb4f1 100644
--- a/doc/user/compliance/license_compliance/index.md
+++ b/doc/user/compliance/license_compliance/index.md
@@ -68,6 +68,10 @@ The following languages and package managers are supported.
| Ruby | [gem](https://rubygems.org/) |[License Finder](https://github.com/pivotal/LicenseFinder)|
| Objective-C, Swift | [Carthage](https://github.com/Carthage/Carthage) |[License Finder](https://github.com/pivotal/LicenseFinder)|
+NOTE: **Note:**
+
+Java 8 and Gradle 1.x projects are not supported.
+
### Experimental support
The following languages and package managers are [supported experimentally](https://github.com/pivotal/LicenseFinder#experimental-project-types),
@@ -138,14 +142,18 @@ License Compliance can be configured using environment variables.
| Environment variable | Required | Description |
|-----------------------------|----------|-------------|
-| `SECURE_ANALYZERS_PREFIX` | no | Set the Docker registry base address to download the analyzer from. |
| `ADDITIONAL_CA_CERT_BUNDLE` | no | Bundle of trusted CA certificates (currently supported in Pip, Pipenv, Maven, Gradle, Yarn, and NPM projects). |
+| `ASDF_JAVA_VERSION` | no | Version of Java to use for the scan. |
+| `ASDF_NODEJS_VERSION` | no | Version of Node.js to use for the scan. |
+| `ASDF_PYTHON_VERSION` | no | Version of Python to use for the scan. |
+| `ASDF_RUBY_VERSION` | no | Version of Ruby to use for the scan. |
| `GRADLE_CLI_OPTS` | no | Additional arguments for the gradle executable. If not supplied, defaults to `--exclude-task=test`. |
| `LICENSE_FINDER_CLI_OPTS` | no | Additional arguments for the `license_finder` executable. For example, if your project has both Golang and Ruby code stored in different directories and you want to only scan the Ruby code, you can update your `.gitlab-ci-yml` template to specify which project directories to scan, like `LICENSE_FINDER_CLI_OPTS: '--debug --aggregate-paths=. ruby'`. |
| `LM_JAVA_VERSION` | no | Version of Java. If set to `11`, Maven and Gradle use Java 11 instead of Java 8. |
| `LM_PYTHON_VERSION` | no | Version of Python. If set to `3`, dependencies are installed using Python 3 instead of Python 2.7. |
| `MAVEN_CLI_OPTS` | no | Additional arguments for the mvn executable. If not supplied, defaults to `-DskipTests`. |
| `PIP_INDEX_URL` | no | Base URL of Python Package Index (default: `https://pypi.org/simple/`). |
+| `SECURE_ANALYZERS_PREFIX` | no | Set the Docker registry base address to download the analyzer from. |
| `SETUP_CMD` | no | Custom setup for the dependency installation (experimental). |
### Installing custom dependencies
@@ -584,3 +592,78 @@ Policies can be configured by maintainers of the project.
Developers of the project can view the policies configured in a project.
![View Policies](img/policies_v13_0.png)
+
+## Troubleshooting
+
+### `ERROR -- : asdf: No preset version installed for command`
+
+This error occurs when the version of the tools used by your project
+do not match the version of the pre-installed tools available in the
+`license_scanning` Docker image. The `license_scanning` job uses
+[asdf-vm](https://asdf-vm.com/) to activate the appropriate version of
+a tool that your project relies on. For example, if your project relies on a specific
+version of [Node.js](https://nodejs.org/) or any other supported tool you can
+specify the desired version by adding a
+[`.tool-versions`](https://asdf-vm.com/#/core-configuration?id=tool-versions) file to the project
+or using the appropriate [`ASDF_<tool>_VERSION`](https://asdf-vm.com/#/core-configuration?id=environment-variables) environment variable to
+activate the appropriate version.
+
+For example, the following `.tool-versions` file will activate version `12.16.3` of [Node.js](https://nodejs.org/)
+and version `2.6.6` of [Ruby](https://www.ruby-lang.org/).
+
+```plaintext
+nodejs 12.16.3
+ruby 2.6.6
+```
+
+The next example shows how to activate the same versions of the tools mentioned above by using environment variables defined in your
+project's `.gitlab-ci.yml` file.
+
+```yaml
+include:
+ - template: License-Scanning.gitlab-ci.yml
+
+license_scanning:
+ variables:
+ ASDF_NODEJS_VERSION: '12.16.3'
+ ASDF_RUBY_VERSION: '2.6.6'
+```
+
+A full list of variables can be found in [environment variables](#available-variables).
+
+To find out what tools are pre-installed in the `license_scanning` Docker image use the following command:
+
+```shell
+$ docker run --entrypoint='' registry.gitlab.com/gitlab-org/security-products/analyzers/license-finder:3 /bin/bash -lc 'asdf list'
+golang
+ 1.14
+gradle
+ 6.3
+java
+ adopt-openjdk-11.0.7+10
+ adopt-openjdk-8u242-b08
+maven
+ 3.6.3
+nodejs
+ 10.20.1
+ 12.16.3
+php
+ 7.4.5
+python
+ 2.7.18
+ 3.8.2
+ruby
+ 2.6.6
+sbt
+ 1.3.8
+```
+
+To interact with the `license_scanning` runtime environment use the following command:
+
+```shell
+$ docker run -it --entrypoint='' registry.gitlab.com/gitlab-org/security-products/analyzers/license-finder:3 /bin/bash -l
+root@6abb70e9f193:~#
+```
+
+NOTE: **Note:**
+Selecting a custom version of [Mono](https://www.mono-project.com/) or [.NET Core](https://dotnet.microsoft.com/download/dotnet-core) is currently not supported.
diff --git a/spec/frontend/u2f/authenticate_spec.js b/spec/frontend/authentication/u2f/authenticate_spec.js
index 1d39c4857ae..36cc6fb7c63 100644
--- a/spec/frontend/u2f/authenticate_spec.js
+++ b/spec/frontend/authentication/u2f/authenticate_spec.js
@@ -1,5 +1,5 @@
import $ from 'jquery';
-import U2FAuthenticate from '~/u2f/authenticate';
+import U2FAuthenticate from '~/authentication/u2f/authenticate';
import 'vendor/u2f';
import MockU2FDevice from './mock_u2f_device';
diff --git a/spec/frontend/u2f/mock_u2f_device.js b/spec/frontend/authentication/u2f/mock_u2f_device.js
index ec8425a4e3e..ec8425a4e3e 100644
--- a/spec/frontend/u2f/mock_u2f_device.js
+++ b/spec/frontend/authentication/u2f/mock_u2f_device.js
diff --git a/spec/frontend/u2f/register_spec.js b/spec/frontend/authentication/u2f/register_spec.js
index a4395a2123a..3c2ecdbba66 100644
--- a/spec/frontend/u2f/register_spec.js
+++ b/spec/frontend/authentication/u2f/register_spec.js
@@ -1,5 +1,5 @@
import $ from 'jquery';
-import U2FRegister from '~/u2f/register';
+import U2FRegister from '~/authentication/u2f/register';
import 'vendor/u2f';
import MockU2FDevice from './mock_u2f_device';
diff --git a/spec/frontend/u2f/util_spec.js b/spec/frontend/authentication/u2f/util_spec.js
index 32cd6891384..67fd4c73243 100644
--- a/spec/frontend/u2f/util_spec.js
+++ b/spec/frontend/authentication/u2f/util_spec.js
@@ -1,4 +1,4 @@
-import { canInjectU2fApi } from '~/u2f/util';
+import { canInjectU2fApi } from '~/authentication/u2f/util';
describe('U2F Utils', () => {
describe('canInjectU2fApi', () => {
diff --git a/spec/frontend/fixtures/static/issue_with_mermaid_graph.html b/spec/frontend/fixtures/static/issue_with_mermaid_graph.html
index 4b60842a655..e9fa75c8ba9 100644
--- a/spec/frontend/fixtures/static/issue_with_mermaid_graph.html
+++ b/spec/frontend/fixtures/static/issue_with_mermaid_graph.html
@@ -15,14 +15,14 @@
<g class="edgeLabels"></g>
<g class="nodes">
<g
- class="node js-issuable-actions btn-close clickable"
+ class="node js-issuable-buttons btn-close clickable"
style="opacity: 1;"
id="A"
transform="translate(92.67500305175781,25.25)"
title="click to PUT"
>
<a
- class="js-issuable-actions btn-close clickable"
+ class="js-issuable-buttons btn-close clickable"
href="https://invalid"
rel="noopener"
>