Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-01-05 00:11:07 +00:00
parent 6bf2842594
commit 7e4c117ea0
11 changed files with 113 additions and 44 deletions

View File

@ -62,8 +62,8 @@ export default {
<gl-button
v-if="mr.newBlobPath"
:href="mr.newBlobPath"
category="secondary"
variant="success"
category="primary"
variant="confirm"
data-testid="createFileButton"
@click="onClickNewFile"
>

View File

@ -0,0 +1,18 @@
# frozen_string_literal: true
class AddUniqueIndexToVulnerabilityFindingLinks < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
NAME_URL_INDEX_NAME = 'finding_link_name_url_idx'
URL_INDEX_NAME = 'finding_link_url_idx'
def up
add_concurrent_index :vulnerability_finding_links, [:vulnerability_occurrence_id, :name, :url], unique: true, name: NAME_URL_INDEX_NAME
add_concurrent_index :vulnerability_finding_links, [:vulnerability_occurrence_id, :url], unique: true, where: 'name is null', name: URL_INDEX_NAME
end
def down
remove_concurrent_index :vulnerability_finding_links, [:vulnerability_occurrence_id, :name, :url], name: NAME_URL_INDEX_NAME
remove_concurrent_index :vulnerability_finding_links, [:vulnerability_occurrence_id, :url], name: URL_INDEX_NAME
end
end

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
class AddIndexOnCiPipelinesUserIdIdFailureReason < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
INDEX_NAME = 'index_ci_pipelines_on_user_id_and_id_desc_and_user_not_verified'
def up
add_concurrent_index :ci_pipelines, [:user_id, :id], order: { id: :desc }, where: 'failure_reason = 3', name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :ci_pipelines, INDEX_NAME
end
end

View File

@ -0,0 +1 @@
a7e259fa72dfdfa40137d278499d6b63b84f939f46936c0f4ed289ed152d9356

View File

@ -0,0 +1 @@
157128732c321577b7fa7a1b3d252ff70a2a62b34cd1e6edea59da4e632a1755

View File

@ -24949,6 +24949,10 @@ CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_index ON epic_user_mentions US
CREATE UNIQUE INDEX finding_evidences_on_unique_vulnerability_occurrence_id ON vulnerability_finding_evidences USING btree (vulnerability_occurrence_id);
CREATE UNIQUE INDEX finding_link_name_url_idx ON vulnerability_finding_links USING btree (vulnerability_occurrence_id, name, url);
CREATE UNIQUE INDEX finding_link_url_idx ON vulnerability_finding_links USING btree (vulnerability_occurrence_id, url) WHERE (name IS NULL);
CREATE INDEX finding_links_on_vulnerability_occurrence_id ON vulnerability_finding_links USING btree (vulnerability_occurrence_id);
CREATE UNIQUE INDEX i_ci_job_token_project_scope_links_on_source_and_target_project ON ci_job_token_project_scope_links USING btree (source_project_id, target_project_id);
@ -25563,6 +25567,8 @@ CREATE INDEX index_ci_pipelines_on_user_id_and_created_at_and_source ON ci_pipel
CREATE INDEX index_ci_pipelines_on_user_id_and_id_and_cancelable_status ON ci_pipelines USING btree (user_id, id) WHERE ((status)::text = ANY (ARRAY[('running'::character varying)::text, ('waiting_for_resource'::character varying)::text, ('preparing'::character varying)::text, ('pending'::character varying)::text, ('created'::character varying)::text, ('scheduled'::character varying)::text]));
CREATE INDEX index_ci_pipelines_on_user_id_and_id_desc_and_user_not_verified ON ci_pipelines USING btree (user_id, id DESC) WHERE (failure_reason = 3);
CREATE INDEX index_ci_project_mirrors_on_namespace_id ON ci_project_mirrors USING btree (namespace_id);
CREATE UNIQUE INDEX index_ci_project_mirrors_on_project_id ON ci_project_mirrors USING btree (project_id);

View File

@ -987,7 +987,7 @@ This is needed for example in a known edge-case with
### Remove licenses
To clean up the [License History table](../../user/admin_area/license.md#license-history):
To clean up the [License History table](../../user/admin_area/license.md#view-license-details-and-history):
```ruby
TYPE = :trial?

View File

@ -2,29 +2,43 @@
stage: Growth
group: Conversion
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
type: howto
---
# Activating GitLab EE **(PREMIUM SELF)**
# Activate GitLab Enterprise Edition (EE) **(PREMIUM SELF)**
To enable features of GitLab Enterprise Edition (EE), you need to activate your instance. Ensure you are running an enterprise edition. To verify, sign in to GitLab and browse to `/help`. The GitLab edition and version are listed at the top of the **Help** page.
When you install a new GitLab instance without a license, it only has the Free features
enabled. To enable all features of GitLab Enterprise Edition (EE), activate
your instance with an activation code or a license file. When [the license expires](#what-happens-when-your-license-expires),
some functionality is locked.
If you are running GitLab Community Edition (CE), upgrade your installation to GitLab Enterprise Edition (EE). For more details, see [Upgrading between editions](../../update/index.md#upgrading-between-editions). If you have questions or need assistance upgrading from GitLab CE to EE please [contact GitLab Support](https://about.gitlab.com/support/#contact-support).
## Verify your GitLab edition
As of GitLab Enterprise Edition 9.4.0, a newly-installed instance without an
uploaded license only has the Free features active. A trial license activates all Ultimate features, but after [the trial expires](#what-happens-when-your-license-expires), some functionality
is locked.
To activate your instance, make sure you are running GitLab Enterprise Edition (EE).
## Activate GitLab EE with an Activation Code
To verify the edition, sign in to GitLab and select
**Help** (**{question-o}**) > **Help**. The GitLab edition and version are listed
at the top of the page.
As of GitLab Enterprise Edition 14.1, you need an activation code to activate your instance. You can obtain an activation code by [purchasing a license](https://about.gitlab.com/pricing/) or by signing up for a [free trial](https://about.gitlab.com/free-trial/). This activation code is a 24-character alphanumeric string you receive in a confirmation email. You can also sign in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in) to copy the activation code to your clipboard.
If you are running GitLab Community Edition (CE), upgrade your installation to GitLab
EE. For more details, see [Upgrading between editions](../../update/index.md#upgrading-between-editions).
If you have questions or need assistance upgrading from GitLab CE to EE,
[contact GitLab Support](https://about.gitlab.com/support/#contact-support).
To begin the activation process with your activation code:
## Activate GitLab EE with an activation code
In GitLab Enterprise Edition 14.1 and later, you need an activation code to activate
your instance. To get an activation code, [purchase a license](https://about.gitlab.com/pricing/)
or sign up for a [free trial](https://about.gitlab.com/free-trial/). The activation
code is a 24-character alphanumeric string you receive in a confirmation email.
You can also sign in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in)
to copy the activation code to your clipboard.
To activate your instance with an activation code:
1. Sign in to your GitLab self-managed instance.
1. From the top menu, select the Admin Area **{admin}**.
1. From the left sidebar, select **Subscription**.
1. Paste the activation code onto the input field.
1. On the top bar, select **Menu > Admin**.
1. On the left sidebar, select **Subscription**.
1. Enter the activation code in **Activation code**.
1. Read and accept the terms of service.
1. Select **Activate**.
@ -91,47 +105,47 @@ is active until the end of the license period. When that period ends, the
instance will [fall back](#what-happens-when-your-license-expires) to Free-only
functionality.
You can review the license details at any time by going to **Admin Area > Subscription**.
## Notification before the license expires
One month before the license expires, a message informing about the expiration
date is displayed to GitLab administrators. Make sure that you update your
license, otherwise you miss all the paid features if your license expires.
## What happens when your license expires
When your license expires, GitLab locks down features, like Git pushes
and issue creation. Then, your instance becomes read-only and
an expiration message is displayed to all administrators.
One month before the license expires, a message with the upcoming expiration
date displays to GitLab administrators.
For GitLab self-managed instances, you have a 14-day grace period
When your license expires, GitLab locks features, like Git pushes
and issue creation. Your instance becomes read-only and
an expiration message displays to all administrators. You have a 14-day grace period
before this occurs.
- To resume functionality, upload a new license.
- To fall back to Free features, delete all expired licenses.
To resume functionality, [upload a new license](#uploading-your-license).
### Remove a license file
To go back to Free features, [delete all expired licenses](#remove-a-license-file).
## Remove a license file
To remove a license file from a self-managed instance:
1. From the top menu, select the Admin Area **{admin}**.
1. From the left sidebar, select **Subscription**.
1. On the top bar, select **Menu > Admin**.
1. On the left sidebar, select **Subscription**.
1. Select **Remove license**.
These steps may need to be repeated to completely remove all licenses, including those applied in the past.
Repeat these steps to remove all licenses, including those applied in the past.
## License history
## View license details and history
You can upload and view more than one license, but only the latest license in the current date
range is used as the active license.
To view your license details:
1. On the top bar, select **Menu > Admin**.
1. On the left sidebar, select **Subscription**.
You can upload and view more than one license, but only the latest license in
the current date range is the active license.
When you upload a future-dated license, it doesn't take effect until its applicable date.
You can view all of your active subscriptions in the **Subscription history** table.
You can view all active subscriptions in the **Subscription history** table.
NOTE:
In GitLab 13.6 and earlier, a notification banner about an expiring license may continue to be displayed even after a new license has been uploaded.
This happens when the newly uploaded license's start date is in the future and the expiring one is still active.
In GitLab 13.6 and earlier, a banner about an expiring license may continue to display
when you upload a new license. This happens when the start date of the new license
is in the future and the expiring one is still active.
The banner disappears after the new license becomes active.
## Troubleshooting

View File

@ -1,8 +1,12 @@
# frozen_string_literal: true
module QA
RSpec.describe 'Manage', :requires_admin do
describe 'Bulk group import' do
describe 'Manage', :requires_admin do
describe 'Gitlab migration', quarantine: {
only: { subdomain: :staging },
issue: "https://gitlab.com/gitlab-org/gitlab/-/issues/349556",
type: :bug
} do
let!(:staging?) { Runtime::Scenario.gitlab_address.include?('staging.gitlab.com') }
let!(:admin_api_client) { Runtime::API::Client.as_admin }
let!(:user) do

View File

@ -26,6 +26,16 @@
"value": "PREDICTABLE_RANDOM",
"url": "https://find-sec-bugs.github.io/bugs.htm#PREDICTABLE_RANDOM"
}
],
"links": [
{
"name": "Link1",
"url": "https://www.url1.com"
},
{
"name": "Link2",
"url": "https://www.url2.com"
}
]
},
{

View File

@ -41,8 +41,8 @@ RSpec.describe Gitlab::BackgroundMigration::RemoveVulnerabilityFindingLinks, :mi
# vulnerability finding links
let!(:links) do
{
findings.first => Array.new(5) { |id| finding_links.create!(vulnerability_occurrence_id: findings.first.id, name: "Link Name 1", url: "link_url1.example") },
findings.second => Array.new(5) { |id| finding_links.create!(vulnerability_occurrence_id: findings.second.id, name: "Link Name 2", url: "link_url2.example") }
findings.first => Array.new(5) { |id| finding_links.create!(vulnerability_occurrence_id: findings.first.id, name: "Link Name 1", url: "link_url1_#{id}.example") },
findings.second => Array.new(5) { |id| finding_links.create!(vulnerability_occurrence_id: findings.second.id, name: "Link Name 2", url: "link_url2_#{id}.example") }
}
end