diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-20 03:10:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-20 03:10:55 +0300 |
commit | cf0dbcbf109a51edad3533b51f2bc76163e7305a (patch) | |
tree | 2f48a49c42fb4cef1eb6ca2f3c24ea2cc67ff14e | |
parent | 83d7a3922367d95a0875f9bdbdbf34a37f84e3fb (diff) |
Add latest changes from gitlab-org/gitlab@master
41 files changed, 198 insertions, 49 deletions
diff --git a/app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue b/app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue index 6f14cc78270..fa1cb311b34 100644 --- a/app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue +++ b/app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue @@ -368,7 +368,7 @@ export default { <alert-details-table :alert="alert" :loading="loading" /> </gl-tab> <gl-tab - v-if="isThreatMonitoringPage" + v-if="!isThreatMonitoringPage" :data-testid="$options.tabsConfig[1].id" :title="$options.tabsConfig[1].title" > diff --git a/app/models/clusters/agent_token.rb b/app/models/clusters/agent_token.rb index b260822f784..8266f40133d 100644 --- a/app/models/clusters/agent_token.rb +++ b/app/models/clusters/agent_token.rb @@ -7,9 +7,11 @@ module Clusters self.table_name = 'cluster_agent_tokens' - belongs_to :agent, class_name: 'Clusters::Agent' + belongs_to :agent, class_name: 'Clusters::Agent', optional: false belongs_to :created_by_user, class_name: 'User', optional: true before_save :ensure_token + + validates :description, length: { maximum: 1024 } end end diff --git a/app/views/devise/confirmations/almost_there.haml b/app/views/devise/confirmations/almost_there.haml index bf321bb690b..684af933f3a 100644 --- a/app/views/devise/confirmations/almost_there.haml +++ b/app/views/devise/confirmations/almost_there.haml @@ -1,14 +1,14 @@ -.well-confirmation.text-center.gl-mb-6 +.well-confirmation.gl-text-center.gl-mb-6 %h1.gl-mt-0 - Almost there... + = _("Almost there...") %p.lead.gl-mb-6 - Please check your email to confirm your account + = _("Please check your email to confirm your account") %hr - if Gitlab::CurrentSettings.after_sign_up_text.present? - .well-confirmation.text-center + .well-confirmation.gl-text-center = markdown_field(Gitlab::CurrentSettings, :after_sign_up_text) %p.text-center - No confirmation email received? Please check your spam folder or -.gl-mb-6.prepend-top-20.text-center - %a.btn.btn-lg.btn-success{ href: new_user_confirmation_path } - Request new confirmation email + = _("No confirmation email received? Please check your spam folder or") +.gl-mb-6.prepend-top-20.gl-text-center + %a.btn.gl-button.btn-confirm{ href: new_user_confirmation_path } + = _("Request new confirmation email") diff --git a/bin/actioncable b/bin/actioncable index 0aacb19e070..14600ec1177 100755 --- a/bin/actioncable +++ b/bin/actioncable @@ -36,7 +36,7 @@ start_foreground() stop() { get_puma_pid - kill -QUIT "$(get_puma_pid)" + kill -INT "$(get_puma_pid)" } reload() diff --git a/bin/web_puma b/bin/web_puma index 6a9b729f6dd..c1ab4718f0d 100755 --- a/bin/web_puma +++ b/bin/web_puma @@ -36,7 +36,7 @@ start_foreground() stop() { get_puma_pid - kill -QUIT "$(get_puma_pid)" + kill -INT "$(get_puma_pid)" } reload() diff --git a/changelogs/unreleased/300417-agent-token-description.yml b/changelogs/unreleased/300417-agent-token-description.yml new file mode 100644 index 00000000000..2ec438ac75f --- /dev/null +++ b/changelogs/unreleased/300417-agent-token-description.yml @@ -0,0 +1,5 @@ +--- +title: Add description field to cluster agent token +merge_request: 54091 +author: +type: changed diff --git a/changelogs/unreleased/322198-fix-metrics-tab.yml b/changelogs/unreleased/322198-fix-metrics-tab.yml new file mode 100644 index 00000000000..d7600177be7 --- /dev/null +++ b/changelogs/unreleased/322198-fix-metrics-tab.yml @@ -0,0 +1,5 @@ +--- +title: Fix Metric tab not showing up on operations page +merge_request: 54736 +author: +type: fixed diff --git a/changelogs/unreleased/ab-index-rename.yml b/changelogs/unreleased/ab-index-rename.yml new file mode 100644 index 00000000000..3fe01db7581 --- /dev/null +++ b/changelogs/unreleased/ab-index-rename.yml @@ -0,0 +1,5 @@ +--- +title: Rename indexes to remove inconsistencies +merge_request: 51011 +author: +type: other diff --git a/changelogs/unreleased/gl-button-email-request.yml b/changelogs/unreleased/gl-button-email-request.yml new file mode 100644 index 00000000000..d5c26d4e124 --- /dev/null +++ b/changelogs/unreleased/gl-button-email-request.yml @@ -0,0 +1,5 @@ +--- +title: Apply new GitLab UI for request email button +merge_request: 53966 +author: Yogi (@yo) +type: changed diff --git a/changelogs/unreleased/puma_sigint.yml b/changelogs/unreleased/puma_sigint.yml new file mode 100644 index 00000000000..9bc6fd856f1 --- /dev/null +++ b/changelogs/unreleased/puma_sigint.yml @@ -0,0 +1,5 @@ +--- +title: Send SIGINT instead of SIGQUIT to puma +merge_request: 54446 +author: Jörg Behrmann @behrmann +type: fixed diff --git a/db/migrate/20210106191305_rename_indexes_on_git_lab_com.rb b/db/migrate/20210106191305_rename_indexes_on_git_lab_com.rb new file mode 100644 index 00000000000..5238192e1d1 --- /dev/null +++ b/db/migrate/20210106191305_rename_indexes_on_git_lab_com.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# This migration aligns an existing database schema with what we actually expect +# and fixes inconsistencies with index names and similar issues. +# +# This is intended for GitLab.com, but can be run on any instance. +class RenameIndexesOnGitLabCom < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + rename_index_if_exists :ldap_group_links, 'ldap_groups_pkey', 'ldap_group_links_pkey' + + # Removes unique constraint, add unique index instead + replace_unique_constraint_with_index :emails, :email, 'emails_email_key', 'index_emails_on_email' + replace_unique_constraint_with_index :users, :confirmation_token, 'users_confirmation_token_key', 'index_users_on_confirmation_token' + replace_unique_constraint_with_index :users, :reset_password_token, 'users_reset_password_token_key', 'index_users_on_reset_password_token' + replace_unique_constraint_with_index :users, :email, 'users_email_key', 'index_users_on_email' + + upgrade_to_primary_key(:schema_migrations, :version, 'schema_migrations_version_key', 'schema_migrations_pkey') + end + + def down + # no-op + end + + private + + def replace_unique_constraint_with_index(table, columns, old_name, new_name) + return unless index_exists_by_name?(table, old_name) + + add_concurrent_index table, columns, unique: true, name: new_name + execute "ALTER TABLE #{quote_table_name(table)} DROP CONSTRAINT #{quote_table_name(old_name)}" + end + + def rename_index_if_exists(table, old_name, new_name) + return unless index_exists_by_name?(table, old_name) + return if index_exists_by_name?(table, new_name) + + with_lock_retries do + rename_index table, old_name, new_name + end + end + + def upgrade_to_primary_key(table, column, old_name, new_name) + return unless index_exists_by_name?(table, old_name) + return if index_exists_by_name?(table, new_name) + + return if primary_key(table) + + execute "ALTER TABLE #{quote_table_name(table)} ADD CONSTRAINT #{new_name} PRIMARY KEY (#{column})" + execute "ALTER TABLE #{quote_table_name(table)} DROP CONSTRAINT #{old_name}" + end +end diff --git a/db/migrate/20210216193620_add_description_to_cluster_token.rb b/db/migrate/20210216193620_add_description_to_cluster_token.rb new file mode 100644 index 00000000000..67f7c6bd522 --- /dev/null +++ b/db/migrate/20210216193620_add_description_to_cluster_token.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class AddDescriptionToClusterToken < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + unless column_exists?(:cluster_agent_tokens, :description) + add_column :cluster_agent_tokens, :description, :text + end + + add_text_limit :cluster_agent_tokens, :description, 1024 + end + + def down + remove_column :cluster_agent_tokens, :description + end +end diff --git a/db/schema_migrations/20210106191305 b/db/schema_migrations/20210106191305 new file mode 100644 index 00000000000..5fd79e227e6 --- /dev/null +++ b/db/schema_migrations/20210106191305 @@ -0,0 +1 @@ +938977d6379e484a53857304c339a024c32d8b71c2175574a72314e461d67e3b
\ No newline at end of file diff --git a/db/schema_migrations/20210216193620 b/db/schema_migrations/20210216193620 new file mode 100644 index 00000000000..6c8e8d4c1c4 --- /dev/null +++ b/db/schema_migrations/20210216193620 @@ -0,0 +1 @@ +3587ba61d003385ea63ce900c1dd1c2bd1f2386abd921615b50421f1b798f553
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 3507cb74614..3611e0ae9cd 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -11026,6 +11026,8 @@ CREATE TABLE cluster_agent_tokens ( agent_id bigint NOT NULL, token_encrypted text NOT NULL, created_by_user_id bigint, + description text, + CONSTRAINT check_4e4ec5070a CHECK ((char_length(description) <= 1024)), CONSTRAINT check_c60daed227 CHECK ((char_length(token_encrypted) <= 255)) ); diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index 337932dc6f9..b0f15e7a951 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -717,6 +717,7 @@ Autogenerated return type of ClusterAgentDelete. | `clusterAgent` | ClusterAgent | Cluster agent this token is associated with. | | `createdAt` | Time | Timestamp the token was created. | | `createdByUser` | User | The user who created the token. | +| `description` | String | Description of the token. | | `id` | ClustersAgentTokenID! | Global ID of the token. | ### ClusterAgentTokenCreatePayload diff --git a/doc/integration/github.md b/doc/integration/github.md index 026e4c99593..4258b1c3c76 100644 --- a/doc/integration/github.md +++ b/doc/integration/github.md @@ -12,7 +12,7 @@ with their GitHub account. ## Enabling GitHub OAuth -To enable the GitHub OmniAuth provider, you need an OAuth 2 Client ID and Client Secret from GitHub. To get these credentials, sign into GitHub and follow their procedure for [Creating an OAuth App](https://docs.github.com/apps/building-oauth-apps/creating-an-oauth-app/). +To enable the GitHub OmniAuth provider, you need an OAuth 2 Client ID and Client Secret from GitHub. To get these credentials, sign into GitHub and follow their procedure for [Creating an OAuth App](https://docs.github.com/en/developers/apps/creating-an-oauth-app). When you create an OAuth 2 app in GitHub, you need the following information: diff --git a/doc/operations/feature_flags.md b/doc/operations/feature_flags.md index f23880554a6..de6b2985786 100644 --- a/doc/operations/feature_flags.md +++ b/doc/operations/feature_flags.md @@ -79,8 +79,8 @@ is 200. For GitLab SaaS, the maximum number is determined by [tier](https://abou You can apply a feature flag strategy across multiple environments, without defining the strategy multiple times. -GitLab Feature Flags use [Unleash](https://unleash.github.io) as the feature flag -engine. In Unleash, there are [strategies](https://unleash.github.io/docs/activation_strategy) +GitLab Feature Flags use [Unleash](https://docs.getunleash.ai/) as the feature flag +engine. In Unleash, there are [strategies](https://docs.getunleash.ai/docs/activation_strategy) for granular feature flag controls. GitLab Feature Flags can have multiple strategies, and the supported strategies are: @@ -95,7 +95,7 @@ and clicking **{pencil}** (edit). ### All users -Enables the feature for all users. It uses the [`default`](https://unleash.github.io/docs/activation_strategy#default) +Enables the feature for all users. It uses the [`default`](https://docs.getunleash.ai/docs/activation_strategy#default) Unleash activation strategy. ### Percent Rollout diff --git a/doc/topics/git/index.md b/doc/topics/git/index.md index 9c3918b89c0..d6e1dcf0998 100644 --- a/doc/topics/git/index.md +++ b/doc/topics/git/index.md @@ -14,7 +14,7 @@ large projects with speed and efficiency. [GitLab](https://about.gitlab.com) is a Git-based fully integrated platform for software development. Besides Git's functionalities, GitLab has a lot of powerful [features](https://about.gitlab.com/features/) to enhance your -[workflow](https://about.gitlab.com/blog/2016/10/25/gitlab-workflow-an-overview/). +[workflow](https://about.gitlab.com/topics/version-control/what-is-gitlab-workflow/). We've gathered some resources to help you to get the best from Git with GitLab. diff --git a/doc/topics/git/numerous_undo_possibilities_in_git/index.md b/doc/topics/git/numerous_undo_possibilities_in_git/index.md index c263609125f..76fc9bc92b0 100644 --- a/doc/topics/git/numerous_undo_possibilities_in_git/index.md +++ b/doc/topics/git/numerous_undo_possibilities_in_git/index.md @@ -64,7 +64,7 @@ To avoid chaos with development workflows have to be followed. It depends on your internal workflow how certain changes or commits can be undone or changed. -[GitLab Flow](https://about.gitlab.com/blog/2014/09/29/gitlab-flow/) provides a good +[GitLab Flow](https://about.gitlab.com/topics/version-control/what-is-gitlab-flow/) provides a good balance between developers clashing with each other while developing the same feature and cooperating seamlessly. However, it does not enable joined development of the same feature by multiple developers by default. diff --git a/doc/university/index.md b/doc/university/index.md index a003d58b2f3..0d194c7708d 100644 --- a/doc/university/index.md +++ b/doc/university/index.md @@ -120,7 +120,7 @@ The GitLab University curriculum is composed of GitLab videos, screencasts, pres 1. [GitLab and Docker - Video](https://www.youtube.com/watch?v=ugOrCcbdHko&index=12&list=PLFGfElNsQthbQu_IWlNOxul0TbS_2JH-e) 1. [How we scale GitLab with built in Docker](https://about.gitlab.com/blog/2016/06/21/how-we-scale-gitlab-by-having-docker-built-in/) 1. [Continuous Integration, Delivery, and Deployment with GitLab](https://about.gitlab.com/blog/2016/08/05/continuous-integration-delivery-and-deployment-with-gitlab/) -1. [Deployments and Environments](https://about.gitlab.com/blog/2016/08/26/ci-deployment-and-environments/) +1. [Deployments and Environments](https://about.gitlab.com/blog/2021/02/05/ci-deployment-and-environments/) 1. [Sequential, Parallel or Custom Pipelines](https://about.gitlab.com/blog/2016/07/29/the-basics-of-gitlab-ci/) 1. [Setting up GitLab Runner For Continuous Integration](https://about.gitlab.com/blog/2016/03/01/gitlab-runner-with-docker/) 1. [Setting up GitLab Runner on DigitalOcean](https://about.gitlab.com/blog/2016/04/19/how-to-set-up-gitlab-runner-on-digitalocean/) @@ -134,7 +134,7 @@ The GitLab University curriculum is composed of GitLab videos, screencasts, pres 1. [GitLab Flow - Video](https://youtu.be/enMumwvLAug?list=PLFGfElNsQthZnwMUFi6rqkyUZkI00OxIV) 1. [GitLab Flow vs Forking in GitLab - Video](https://www.youtube.com/watch?v=UGotqAUACZA) -1. [GitLab Flow Overview](https://about.gitlab.com/blog/2014/09/29/gitlab-flow/) +1. [GitLab Flow Overview](https://about.gitlab.com/topics/version-control/what-is-gitlab-flow/) 1. [Always Start with an Issue](https://about.gitlab.com/blog/2016/03/03/start-with-an-issue/) 1. [GitLab Flow Documentation](../topics/gitlab_flow.md) diff --git a/doc/user/index.md b/doc/user/index.md index a678038507f..47a9699543a 100644 --- a/doc/user/index.md +++ b/doc/user/index.md @@ -31,10 +31,10 @@ For more information, see [All GitLab Features](https://about.gitlab.com/feature To get familiar with the concepts needed to develop code on GitLab, read the following articles: - [Demo: Mastering Code Review With GitLab](https://about.gitlab.com/blog/2017/03/17/demo-mastering-code-review-with-gitlab/). -- [GitLab Workflow: An Overview](https://about.gitlab.com/blog/2016/10/25/gitlab-workflow-an-overview/#gitlab-workflow-use-case-scenario). +- [GitLab Workflow: An Overview](https://about.gitlab.com/topics/version-control/what-is-gitlab-workflow/#gitlab-workflow-a-use-case-scenario). - [Tutorial: It's all connected in GitLab](https://about.gitlab.com/blog/2016/03/08/gitlab-tutorial-its-all-connected/): an overview on code collaboration with GitLab. - [Trends in Version Control Land: Microservices](https://about.gitlab.com/blog/2016/08/16/trends-in-version-control-land-microservices/). -- [Trends in Version Control Land: Innersourcing](https://about.gitlab.com/blog/2016/07/07/trends-version-control-innersourcing/). +- [Trends in Version Control Land: Innersourcing](https://about.gitlab.com/topics/version-control/what-is-innersource/). ## Use cases diff --git a/doc/user/infrastructure/index.md b/doc/user/infrastructure/index.md index 6ba5e49d553..b202359847c 100644 --- a/doc/user/infrastructure/index.md +++ b/doc/user/infrastructure/index.md @@ -52,9 +52,9 @@ This video from January 2021 walks you through all the GitLab Terraform integrat ## GitLab Managed Terraform state -[Terraform remote backends](https://www.terraform.io/docs/backends/index.html) +[Terraform remote backends](https://www.terraform.io/docs/language/settings/backends/index.html) enable you to store the state file in a remote, shared store. GitLab uses the -[Terraform HTTP backend](https://www.terraform.io/docs/backends/types/http.html) +[Terraform HTTP backend](https://www.terraform.io/docs/language/settings/backends/http.html) to securely store the state files in local storage (the default) or [the remote store of your choice](../../administration/terraform_state.md). diff --git a/doc/user/infrastructure/terraform_state.md b/doc/user/infrastructure/terraform_state.md index ae35ebce0dc..786665ec47c 100644 --- a/doc/user/infrastructure/terraform_state.md +++ b/doc/user/infrastructure/terraform_state.md @@ -8,9 +8,9 @@ info: To determine the technical writer assigned to the Stage/Group associated w > [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/2673) in GitLab 13.0. -[Terraform remote backends](https://www.terraform.io/docs/backends/index.html) +[Terraform remote backends](https://www.terraform.io/docs/language/settings/backends/index.html) enable you to store the state file in a remote, shared store. GitLab uses the -[Terraform HTTP backend](https://www.terraform.io/docs/backends/types/http.html) +[Terraform HTTP backend](https://www.terraform.io/docs/language/settings/backends/http.html) to securely store the state files in local storage (the default) or [the remote store of your choice](../../administration/terraform_state.md). @@ -96,7 +96,7 @@ Next, [configure the backend](#configure-the-backend). After executing the `terraform init` command, you must configure the Terraform backend and the CI YAML file: -1. In your Terraform project, define the [HTTP backend](https://www.terraform.io/docs/backends/types/http.html) +1. In your Terraform project, define the [HTTP backend](https://www.terraform.io/docs/language/settings/backends/http.html) by adding the following code block in a `.tf` file (such as `backend.tf`) to define the remote backend: @@ -203,9 +203,9 @@ See [this reference project](https://gitlab.com/gitlab-org/configure/examples/gi ## Using a GitLab managed Terraform state backend as a remote data source You can use a GitLab-managed Terraform state as a -[Terraform data source](https://www.terraform.io/docs/providers/terraform/d/remote_state.html). +[Terraform data source](https://www.terraform.io/docs/language/state/remote-state-data.html). To use your existing Terraform state backend as a data source, provide the following details -as [Terraform input variables](https://www.terraform.io/docs/configuration/variables.html): +as [Terraform input variables](https://www.terraform.io/docs/language/values/variables.html): - **address**: The URL of the remote state backend you want to use as a data source. For example, `https://gitlab.com/api/v4/projects/<TARGET-PROJECT-ID>/terraform/state/<TARGET-STATE-NAME>`. diff --git a/doc/user/markdown.md b/doc/user/markdown.md index 5f974d75522..cba7354cd82 100644 --- a/doc/user/markdown.md +++ b/doc/user/markdown.md @@ -22,7 +22,7 @@ We encourage you to view this document as [rendered by GitLab itself](https://gi GitLab uses "GitLab Flavored Markdown" (GFM). It extends the [CommonMark specification](https://spec.commonmark.org/current/) (which is based on standard Markdown) in several ways to add more features. -It was inspired by [GitHub Flavored Markdown](https://docs.github.com/en/free-pro-team@latest/github/writing-on-github/basic-writing-and-formatting-syntax). +It was inspired by [GitHub Flavored Markdown](https://docs.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax). You can use GFM in the following areas: diff --git a/doc/user/packages/go_proxy/index.md b/doc/user/packages/go_proxy/index.md index c9397f8d9f6..1fdc34e820e 100644 --- a/doc/user/packages/go_proxy/index.md +++ b/doc/user/packages/go_proxy/index.md @@ -96,7 +96,7 @@ following steps work only if GitLab is configured for HTTPS: Create a [personal access token](../../profile/personal_access_tokens.md) with the scope set to `api` or `read_api`. -Open your [`~/.netrc`](https://ec.haxx.se/usingcurl/usingcurl-netrc) file +Open your [`~/.netrc`](https://everything.curl.dev/usingcurl/netrc) file and add the following text. Replace the variables in `< >` with your values. ```plaintext diff --git a/doc/user/packages/npm_registry/index.md b/doc/user/packages/npm_registry/index.md index f64b86c7200..68b421ec73b 100644 --- a/doc/user/packages/npm_registry/index.md +++ b/doc/user/packages/npm_registry/index.md @@ -86,8 +86,8 @@ A `package.json` file is created. To use the GitLab endpoint for npm packages, choose an option: - **Project-level**: Use when you have few npm packages and they are not in - the same GitLab group. The [package naming convention](#package-naming-convention) is not enforced at this level. - Instead, you should use a [scope](https://docs.npmjs.com/cli/v6/using-npm/scope) for your package. + the same GitLab group. The [package naming convention](#package-naming-convention) is not enforced at this level. + Instead, you should use a [scope](https://docs.npmjs.com/cli/v6/using-npm/scope) for your package. When you use a scope, the registry URL is [updated](#authenticate-to-the-package-registry) only for that scope. - **Instance-level**: Use when you have many npm packages in different GitLab groups or in their own namespace. Be sure to comply with the [package naming convention](#package-naming-convention). diff --git a/doc/user/project/import/github.md b/doc/user/project/import/github.md index c135b1be54a..11b7f2445e7 100644 --- a/doc/user/project/import/github.md +++ b/doc/user/project/import/github.md @@ -62,7 +62,7 @@ must meet one of the following conditions prior to the import: - Have previously logged in to a GitLab account using the GitHub icon. - Have a GitHub account with a publicly visible - [primary email address](https://docs.github.com/en/free-pro-team@latest/rest/reference/users#get-a-user) + [primary email address](https://docs.github.com/en/rest/reference/users#get-a-user) on their profile that matches their GitLab account's primary or secondary email address. If a user referenced in the project is not found in the GitLab database, the project creator (typically the user @@ -91,7 +91,7 @@ Before you begin, ensure that any GitHub users who you want to map to GitLab use - A GitLab account that has logged in using the GitHub icon \- or - -- A GitLab account with an email address that matches the [publicly visible email address](https://docs.github.com/en/free-pro-team@latest/rest/reference/users#get-a-user) in the profile of the GitHub user +- A GitLab account with an email address that matches the [publicly visible email address](https://docs.github.com/en/rest/reference/users#get-a-user) in the profile of the GitHub user User-matching attempts occur in that order, and if a user is not identified either way, the activity is associated with the user account that is performing the import. diff --git a/doc/user/project/integrations/github.md b/doc/user/project/integrations/github.md index 5ef36ff4074..1c0309cab87 100644 --- a/doc/user/project/integrations/github.md +++ b/doc/user/project/integrations/github.md @@ -20,7 +20,7 @@ and is automatically configured on [GitHub import](../../../integration/github.m ### Complete these steps on GitHub -This integration requires a [GitHub API token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) +This integration requires a [GitHub API token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with `repo:status` access granted: 1. Go to your "Personal access tokens" page at <https://github.com/settings/tokens> diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index 28b463774f4..9c12591fa61 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -154,7 +154,7 @@ for them. NOTE: For a broader use case, please see the blog post -[GitLab Workflow, an Overview](https://about.gitlab.com/blog/2016/10/25/gitlab-workflow-an-overview/#gitlab-workflow-use-case-scenario). +[GitLab Workflow, an Overview](https://about.gitlab.com/topics/version-control/what-is-gitlab-workflow/#gitlab-workflow-a-use-case-scenario). For a real use case example, you can read why [Codepen decided to adopt issue boards](https://about.gitlab.com/blog/2017/01/27/codepen-welcome-to-gitlab/#project-management-everything-in-one-place) to improve their workflow with multiple boards. diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md index 8ccf50e48b8..b91b26b3eb8 100644 --- a/doc/user/project/merge_requests/index.md +++ b/doc/user/project/merge_requests/index.md @@ -36,7 +36,7 @@ B. Consider you're a web developer writing a webpage for your company's website: 1. Your changes are previewed with [Review Apps](../../../ci/review_apps/index.md) 1. You request your web designers for their implementation 1. You request the [approval](merge_request_approvals.md) from your manager **(STARTER)** -1. Once approved, your merge request is [squashed and merged](squash_and_merge.md), and [deployed to staging with GitLab Pages](https://about.gitlab.com/blog/2016/08/26/ci-deployment-and-environments/) +1. Once approved, your merge request is [squashed and merged](squash_and_merge.md), and [deployed to staging with GitLab Pages](https://about.gitlab.com/blog/2021/02/05/ci-deployment-and-environments/) 1. Your production team [cherry picks](cherry_pick_changes.md) the merge commit into production ## Overview diff --git a/doc/user/project/pages/getting_started/pages_from_scratch.md b/doc/user/project/pages/getting_started/pages_from_scratch.md index 3f2df634e3a..86bbffa0fa8 100644 --- a/doc/user/project/pages/getting_started/pages_from_scratch.md +++ b/doc/user/project/pages/getting_started/pages_from_scratch.md @@ -396,7 +396,7 @@ but also pushes with **continuous tests** to feature-branches, For more information, see the following blog posts. - [Use GitLab CI/CD `environments` to deploy your - web app to staging and production](https://about.gitlab.com/blog/2016/08/26/ci-deployment-and-environments/). + web app to staging and production](https://about.gitlab.com/blog/2021/02/05/ci-deployment-and-environments/). - Learn [how to run jobs sequentially, in parallel, or build a custom pipeline](https://about.gitlab.com/blog/2016/07/29/the-basics-of-gitlab-ci/). - Learn [how to pull specific directories from different projects](https://about.gitlab.com/blog/2016/12/07/building-a-new-gitlab-docs-site-with-nanoc-gitlab-ci-and-gitlab-pages/) diff --git a/doc/user/project/pages/index.md b/doc/user/project/pages/index.md index 6eb06972945..1b04561c3c2 100644 --- a/doc/user/project/pages/index.md +++ b/doc/user/project/pages/index.md @@ -116,7 +116,7 @@ to use and adapt to your own needs: - [Posting to your GitLab Pages blog from iOS](https://about.gitlab.com/blog/2016/08/19/posting-to-your-gitlab-pages-blog-from-ios/). - [GitLab CI: Run jobs sequentially, in parallel, or build a custom pipeline](https://about.gitlab.com/blog/2016/07/29/the-basics-of-gitlab-ci/). -- [GitLab CI: Deployment & environments](https://about.gitlab.com/blog/2016/08/26/ci-deployment-and-environments/). +- [GitLab CI: Deployment & environments](https://about.gitlab.com/blog/2021/02/05/ci-deployment-and-environments/). - [Building a new GitLab docs site with Nanoc, GitLab CI, and GitLab Pages](https://about.gitlab.com/blog/2016/12/07/building-a-new-gitlab-docs-site-with-nanoc-gitlab-ci-and-gitlab-pages/). - [Publish code coverage reports with GitLab Pages](https://about.gitlab.com/blog/2016/11/03/publish-code-coverage-report-with-gitlab-pages/). diff --git a/doc/user/project/repository/repository_mirroring.md b/doc/user/project/repository/repository_mirroring.md index a24eead5930..d9d9fd8bcd3 100644 --- a/doc/user/project/repository/repository_mirroring.md +++ b/doc/user/project/repository/repository_mirroring.md @@ -110,7 +110,7 @@ After the mirror is created, this option can currently only be modified via the To set up a mirror from GitLab to GitHub, you need to follow these steps: -1. Create a [GitHub personal access token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) with the `public_repo` box checked. +1. Create a [GitHub personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with the `public_repo` box checked. 1. Fill in the **Git repository URL** field using this format: `https://<your_github_username>@github.com/<your_github_group>/<your_github_project>.git`. 1. Fill in **Password** field with your GitHub personal access token. 1. Click the **Mirror repository** button. @@ -370,7 +370,7 @@ fingerprints in the open for you to check: - [AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/regions.html#regions-fingerprints) - [Bitbucket](https://support.atlassian.com/bitbucket-cloud/docs/configure-ssh-and-two-step-verification/) -- [GitHub](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/githubs-ssh-key-fingerprints) +- [GitHub](https://docs.github.com/en/github/authenticating-to-github/githubs-ssh-key-fingerprints) - [GitLab.com](../../gitlab_com/index.md#ssh-host-keys-fingerprints) - [Launchpad](https://help.launchpad.net/SSHFingerprints) - [Savannah](http://savannah.gnu.org/maintenance/SshAccess/) diff --git a/doc/user/project/working_with_projects.md b/doc/user/project/working_with_projects.md index 3fe6193c414..04d2cf07068 100644 --- a/doc/user/project/working_with_projects.md +++ b/doc/user/project/working_with_projects.md @@ -278,7 +278,7 @@ databases if the module name or a prefix of it appears in `GONOPRIVATE` or ### Authenticate Go requests To authenticate requests to private projects made by Go, use a [`.netrc` -file](https://ec.haxx.se/usingcurl-netrc.html) and a [personal access +file](https://everything.curl.dev/usingcurl/netrc) and a [personal access token](../profile/personal_access_tokens.md) in the password field. **This only works if your GitLab instance can be accessed with HTTPS.** The `go` command does not transmit credentials over insecure connections. This authenticates diff --git a/lib/gitlab/tracking/standard_context.rb b/lib/gitlab/tracking/standard_context.rb index 92fdd008249..8ce16c11267 100644 --- a/lib/gitlab/tracking/standard_context.rb +++ b/lib/gitlab/tracking/standard_context.rb @@ -15,10 +15,14 @@ module Gitlab end def environment - return 'production' if Gitlab.com_and_canary? - return 'staging' if Gitlab.staging? + return 'production' if Gitlab.com? + + return 'org' if Gitlab.org? + + return 'self-managed' if Rails.env.production? + 'development' end diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 613a9f395c7..d55571ab580 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -3148,6 +3148,9 @@ msgstr "" msgid "Almost there" msgstr "" +msgid "Almost there..." +msgstr "" + msgid "Already blocked" msgstr "" @@ -20148,6 +20151,9 @@ msgstr "" msgid "No compliance frameworks are in use. Create one using the GraphQL API." msgstr "" +msgid "No confirmation email received? Please check your spam folder or" +msgstr "" + msgid "No connection could be made to a Gitaly Server, please check your logs!" msgstr "" @@ -22181,6 +22187,9 @@ msgstr "" msgid "Please check your email (%{email}) to verify that you own this address and unlock the power of CI/CD. Didn't receive it? %{resend_link}. Wrong email address? %{update_link}." msgstr "" +msgid "Please check your email to confirm your account" +msgstr "" + msgid "Please choose a file" msgstr "" @@ -25196,6 +25205,9 @@ msgstr "" msgid "Request details" msgstr "" +msgid "Request new confirmation email" +msgstr "" + msgid "Request parameter %{param} is missing." msgstr "" diff --git a/rubocop/cop/migration/with_lock_retries_disallowed_method.rb b/rubocop/cop/migration/with_lock_retries_disallowed_method.rb index aef19517a9d..f423bde8343 100644 --- a/rubocop/cop/migration/with_lock_retries_disallowed_method.rb +++ b/rubocop/cop/migration/with_lock_retries_disallowed_method.rb @@ -21,6 +21,7 @@ module RuboCop change_column_null remove_foreign_key_if_exists remove_foreign_key_without_error + rename_index table_exists? index_exists_by_name? foreign_key_exists? diff --git a/spec/frontend/vue_shared/alert_details/alert_details_spec.js b/spec/frontend/vue_shared/alert_details/alert_details_spec.js index dd9a7be6268..ce410a8b3e7 100644 --- a/spec/frontend/vue_shared/alert_details/alert_details_spec.js +++ b/spec/frontend/vue_shared/alert_details/alert_details_spec.js @@ -128,6 +128,10 @@ describe('AlertDetails', () => { expect(wrapper.findByTestId('startTimeItem').exists()).toBe(true); expect(wrapper.findByTestId('startTimeItem').props('time')).toBe(mockAlert.startedAt); }); + + it('renders the metrics tab', () => { + expect(findMetricsTab().exists()).toBe(true); + }); }); describe('individual alert fields', () => { @@ -179,7 +183,8 @@ describe('AlertDetails', () => { describe('Threat Monitoring details', () => { it('should not render the metrics tab', () => { mountComponent({ - data: { alert: mockAlert, provide: { isThreatMonitoringPage: true } }, + data: { alert: mockAlert }, + provide: { isThreatMonitoringPage: true }, }); expect(findMetricsTab().exists()).toBe(false); }); diff --git a/spec/lib/gitlab/tracking/standard_context_spec.rb b/spec/lib/gitlab/tracking/standard_context_spec.rb index 7a0a4f0cc46..561edbd38f8 100644 --- a/spec/lib/gitlab/tracking/standard_context_spec.rb +++ b/spec/lib/gitlab/tracking/standard_context_spec.rb @@ -22,7 +22,7 @@ RSpec.describe Gitlab::Tracking::StandardContext do context 'staging' do before do - allow(Gitlab).to receive(:staging?).and_return(true) + stub_config_setting(url: 'https://staging.gitlab.com') end include_examples 'contains environment', 'staging' @@ -30,11 +30,27 @@ RSpec.describe Gitlab::Tracking::StandardContext do context 'production' do before do - allow(Gitlab).to receive(:com_and_canary?).and_return(true) + stub_config_setting(url: 'https://gitlab.com') end include_examples 'contains environment', 'production' end + + context 'org' do + before do + stub_config_setting(url: 'https://dev.gitlab.org') + end + + include_examples 'contains environment', 'org' + end + + context 'other self-managed instance' do + before do + stub_rails_env('production') + end + + include_examples 'contains environment', 'self-managed' + end end it 'contains source' do diff --git a/spec/models/clusters/agent_token_spec.rb b/spec/models/clusters/agent_token_spec.rb index 5cb84ee131a..8107b5b1388 100644 --- a/spec/models/clusters/agent_token_spec.rb +++ b/spec/models/clusters/agent_token_spec.rb @@ -3,8 +3,9 @@ require 'spec_helper' RSpec.describe Clusters::AgentToken do - it { is_expected.to belong_to(:agent).class_name('Clusters::Agent') } + it { is_expected.to belong_to(:agent).class_name('Clusters::Agent').required } it { is_expected.to belong_to(:created_by_user).class_name('User').optional } + it { is_expected.to validate_length_of(:description).is_at_most(1024) } describe '#token' do it 'is generated on save' do |