Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
		
							parent
							
								
									a7d30d92f8
								
							
						
					
					
						commit
						5e544154e1
					
				|  | @ -707,6 +707,7 @@ | ||||||
|       when: never |       when: never | ||||||
|     - <<: *if-dot-com-gitlab-org-and-security-merge-request |     - <<: *if-dot-com-gitlab-org-and-security-merge-request | ||||||
|       changes: *feature-flag-config-patterns |       changes: *feature-flag-config-patterns | ||||||
|  |       when: manual | ||||||
|       allow_failure: true |       allow_failure: true | ||||||
| 
 | 
 | ||||||
| ############### | ############### | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| import $ from 'jquery'; | import $ from 'jquery'; | ||||||
| import '~/lib/utils/jquery_at_who'; | import '~/lib/utils/jquery_at_who'; | ||||||
| import { escape as lodashEscape, sortBy, template } from 'lodash'; | import { escape as lodashEscape, sortBy, template, escapeRegExp } from 'lodash'; | ||||||
| import * as Emoji from '~/emoji'; | import * as Emoji from '~/emoji'; | ||||||
| import axios from '~/lib/utils/axios_utils'; | import axios from '~/lib/utils/axios_utils'; | ||||||
| import { s__, __, sprintf } from '~/locale'; | import { s__, __, sprintf } from '~/locale'; | ||||||
|  | @ -65,6 +65,17 @@ export function membersBeforeSave(members) { | ||||||
|   }); |   }); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | export const highlighter = (li, query) => { | ||||||
|  |   // override default behaviour to escape dot character
 | ||||||
|  |   // see https://github.com/ichord/At.js/pull/576
 | ||||||
|  |   if (!query) { | ||||||
|  |     return li; | ||||||
|  |   } | ||||||
|  |   const escapedQuery = escapeRegExp(query); | ||||||
|  |   const regexp = new RegExp(`>\\s*([^<]*?)(${escapedQuery})([^<]*)\\s*<`, 'ig'); | ||||||
|  |   return li.replace(regexp, (str, $1, $2, $3) => `> ${$1}<strong>${$2}</strong>${$3} <`); | ||||||
|  | }; | ||||||
|  | 
 | ||||||
| export const defaultAutocompleteConfig = { | export const defaultAutocompleteConfig = { | ||||||
|   emojis: true, |   emojis: true, | ||||||
|   members: true, |   members: true, | ||||||
|  | @ -664,16 +675,7 @@ class GfmAutoComplete { | ||||||
|         } |         } | ||||||
|         return null; |         return null; | ||||||
|       }, |       }, | ||||||
|       highlighter(li, query) { |       highlighter, | ||||||
|         // override default behaviour to escape dot character
 |  | ||||||
|         // see https://github.com/ichord/At.js/pull/576
 |  | ||||||
|         if (!query) { |  | ||||||
|           return li; |  | ||||||
|         } |  | ||||||
|         const escapedQuery = query.replace(/[.+]/, '\\$&'); |  | ||||||
|         const regexp = new RegExp(`>\\s*([^<]*?)(${escapedQuery})([^<]*)\\s*<`, 'ig'); |  | ||||||
|         return li.replace(regexp, (str, $1, $2, $3) => `> ${$1}<strong>${$2}</strong>${$3} <`); |  | ||||||
|       }, |  | ||||||
|     }; |     }; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ export const MAX_TITLE_LENGTH = 50; | ||||||
| export const MAX_BODY_LENGTH = 72; | export const MAX_BODY_LENGTH = 72; | ||||||
| 
 | 
 | ||||||
| export const SIDEBAR_INIT_WIDTH = 340; | export const SIDEBAR_INIT_WIDTH = 340; | ||||||
| export const SIDEBAR_MIN_WIDTH = 340; | export const SIDEBAR_MIN_WIDTH = 260; | ||||||
| export const SIDEBAR_NAV_WIDTH = 60; | export const SIDEBAR_NAV_WIDTH = 60; | ||||||
| 
 | 
 | ||||||
| // File view modes
 | // File view modes
 | ||||||
|  |  | ||||||
|  | @ -723,17 +723,31 @@ If you disabled a secondary node, either with the [replication pause task](../in | ||||||
| (13.2) or by using the user interface (13.1 and earlier), you must first | (13.2) or by using the user interface (13.1 and earlier), you must first | ||||||
| re-enable the node before you can continue. This is fixed in 13.4. | re-enable the node before you can continue. This is fixed in 13.4. | ||||||
| 
 | 
 | ||||||
| Run the following command, replacing  `https://<secondary url>/` with the URL | This can be fixed in the database. | ||||||
| for your secondary server, using either `http` or `https`, and ensuring that you |  | ||||||
| end the URL with a slash (`/`): |  | ||||||
| 
 | 
 | ||||||
| ```shell | 1. Start a database console: | ||||||
| sudo gitlab-rails dbconsole |  | ||||||
| 
 | 
 | ||||||
| UPDATE geo_nodes SET enabled = true WHERE url = 'https://<secondary url>/' AND enabled = false;" |    In [GitLab 14.2 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/341210): | ||||||
| ``` |  | ||||||
| 
 | 
 | ||||||
| This should update 1 row. |    ```shell | ||||||
|  |    sudo gitlab-rails dbconsole --database main | ||||||
|  |    ``` | ||||||
|  | 
 | ||||||
|  |    In GitLab 14.1 and earlier: | ||||||
|  | 
 | ||||||
|  |    ```shell | ||||||
|  |    sudo gitlab-rails dbconsole | ||||||
|  |    ``` | ||||||
|  | 
 | ||||||
|  | 1. Run the following command, replacing  `https://<secondary url>/` with the URL | ||||||
|  |    for your secondary server. You can use either `http` or `https`, but ensure that you | ||||||
|  |    end the URL with a slash (`/`): | ||||||
|  | 
 | ||||||
|  |    ```sql | ||||||
|  |    UPDATE geo_nodes SET enabled = true WHERE url = 'https://<secondary url>/' AND enabled = false;" | ||||||
|  |    ``` | ||||||
|  | 
 | ||||||
|  |    This should update 1 row. | ||||||
| 
 | 
 | ||||||
| ### Message: ``NoMethodError: undefined method `secondary?' for nil:NilClass`` | ### Message: ``NoMethodError: undefined method `secondary?' for nil:NilClass`` | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ group: Database | ||||||
| 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 | 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 | ||||||
| --- | --- | ||||||
| 
 | 
 | ||||||
| # Configure GitLab using an external PostgreSQL service | # Configure GitLab using an external PostgreSQL service **(FREE SELF)** | ||||||
| 
 | 
 | ||||||
| If you're hosting GitLab on a cloud provider, you can optionally use a | If you're hosting GitLab on a cloud provider, you can optionally use a | ||||||
| managed service for PostgreSQL. For example, AWS offers a managed Relational | managed service for PostgreSQL. For example, AWS offers a managed Relational | ||||||
|  |  | ||||||
|  | @ -2,15 +2,31 @@ | ||||||
| stage: Enablement | stage: Enablement | ||||||
| group: Database | group: Database | ||||||
| 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 | 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: reference |  | ||||||
| --- | --- | ||||||
| 
 | 
 | ||||||
| # Configuring PostgreSQL for scaling | # Configuring PostgreSQL for scaling **(FREE SELF)** | ||||||
| 
 | 
 | ||||||
| In this section, you'll be guided through configuring a PostgreSQL database to | In this section, you'll be guided through configuring a PostgreSQL database to | ||||||
| be used with GitLab in one of our [reference architectures](../reference_architectures/index.md). | be used with GitLab in one of our [reference architectures](../reference_architectures/index.md). | ||||||
| There are essentially three setups to choose from. | There are essentially three setups to choose from. | ||||||
| 
 | 
 | ||||||
|  | ## Standalone PostgreSQL using Omnibus GitLab | ||||||
|  | 
 | ||||||
|  | This setup is for when you have installed the | ||||||
|  | [Omnibus GitLab packages](https://about.gitlab.com/install/) (CE or EE), | ||||||
|  | to use the bundled PostgreSQL having only its service enabled. | ||||||
|  | 
 | ||||||
|  | [> Read how to set up a standalone PostgreSQL instance using Omnibus GitLab](standalone.md) | ||||||
|  | 
 | ||||||
|  | ## Provide your own PostgreSQL instance | ||||||
|  | 
 | ||||||
|  | This setup is for when you have installed GitLab using the | ||||||
|  | [Omnibus GitLab packages](https://about.gitlab.com/install/) (CE or EE), | ||||||
|  | or installed it [from source](../../install/installation.md), but you want to use | ||||||
|  | your own external PostgreSQL server. | ||||||
|  | 
 | ||||||
|  | [> Read how to set up an external PostgreSQL instance](external.md) | ||||||
|  | 
 | ||||||
| ## PostgreSQL replication and failover with Omnibus GitLab **(PREMIUM SELF)** | ## PostgreSQL replication and failover with Omnibus GitLab **(PREMIUM SELF)** | ||||||
| 
 | 
 | ||||||
| This setup is for when you have installed GitLab using the | This setup is for when you have installed GitLab using the | ||||||
|  | @ -20,20 +36,3 @@ All the tools that are needed like PostgreSQL, PgBouncer, and Patroni are bundle | ||||||
| the package, so you can it to set up the whole PostgreSQL infrastructure (primary, replica). | the package, so you can it to set up the whole PostgreSQL infrastructure (primary, replica). | ||||||
| 
 | 
 | ||||||
| [> Read how to set up PostgreSQL replication and failover using Omnibus GitLab](replication_and_failover.md) | [> Read how to set up PostgreSQL replication and failover using Omnibus GitLab](replication_and_failover.md) | ||||||
| 
 |  | ||||||
| ## Standalone PostgreSQL using Omnibus GitLab **(FREE SELF)** |  | ||||||
| 
 |  | ||||||
| This setup is for when you have installed the |  | ||||||
| [Omnibus GitLab packages](https://about.gitlab.com/install/) (CE or EE), |  | ||||||
| to use the bundled PostgreSQL having only its service enabled. |  | ||||||
| 
 |  | ||||||
| [> Read how to set up a standalone PostgreSQL instance using Omnibus GitLab](standalone.md) |  | ||||||
| 
 |  | ||||||
| ## Provide your own PostgreSQL instance **(FREE SELF)** |  | ||||||
| 
 |  | ||||||
| This setup is for when you have installed GitLab using the |  | ||||||
| [Omnibus GitLab packages](https://about.gitlab.com/install/) (CE or EE), |  | ||||||
| or installed it [from source](../../install/installation.md), but you want to use |  | ||||||
| your own external PostgreSQL server. |  | ||||||
| 
 |  | ||||||
| [> Read how to set up an external PostgreSQL instance](external.md) |  | ||||||
|  |  | ||||||
|  | @ -165,8 +165,16 @@ and they will assist you with any issues you are having. | ||||||
| 
 | 
 | ||||||
| - How to connect to a GitLab PostgreSQL database: | - How to connect to a GitLab PostgreSQL database: | ||||||
| 
 | 
 | ||||||
|  |   In GitLab 14.2 (chart 5.2) and later: | ||||||
|  | 
 | ||||||
|   ```shell |   ```shell | ||||||
|   kubectl exec -it <task-runner-pod-name> -- /srv/gitlab/bin/rails dbconsole -p |   kubectl exec -it <task-runner-pod-name> -- /srv/gitlab/bin/rails dbconsole --include-password --database main | ||||||
|  |   ``` | ||||||
|  | 
 | ||||||
|  |   In GitLab 14.1 (chart 5.1) and earlier: | ||||||
|  | 
 | ||||||
|  |   ```shell | ||||||
|  |   kubectl exec -it <task-runner-pod-name> -- /srv/gitlab/bin/rails dbconsole --include-password | ||||||
|   ``` |   ``` | ||||||
| 
 | 
 | ||||||
| - How to get information about Helm installation status: | - How to get information about Helm installation status: | ||||||
|  |  | ||||||
|  | @ -2,10 +2,9 @@ | ||||||
| stage: Enablement | stage: Enablement | ||||||
| group: Database | group: Database | ||||||
| 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 | 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: reference |  | ||||||
| --- | --- | ||||||
| 
 | 
 | ||||||
| # PostgreSQL | # PostgreSQL **(FREE SELF)** | ||||||
| 
 | 
 | ||||||
| This page contains information about PostgreSQL the GitLab Support team uses | This page contains information about PostgreSQL the GitLab Support team uses | ||||||
| when troubleshooting. GitLab makes this information public, so that anyone can | when troubleshooting. GitLab makes this information public, so that anyone can | ||||||
|  |  | ||||||
|  | @ -250,7 +250,7 @@ return new Vue({ | ||||||
|   render(createElement) { |   render(createElement) { | ||||||
|     return createElement('my-component', { |     return createElement('my-component', { | ||||||
|       props: { |       props: { | ||||||
|         username: gon.current_username, |         avatarUrl: gl.avatarUrl, | ||||||
|       }, |       }, | ||||||
|     }); |     }); | ||||||
|   }, |   }, | ||||||
|  |  | ||||||
|  | @ -6,10 +6,6 @@ info: To determine the technical writer assigned to the Stage/Group associated w | ||||||
| 
 | 
 | ||||||
| # Snowplow | # Snowplow | ||||||
| 
 | 
 | ||||||
| This page provides an overview of how Snowplow works and how to enable it. |  | ||||||
| 
 |  | ||||||
| ## What is Snowplow |  | ||||||
| 
 |  | ||||||
| Snowplow is an enterprise-grade marketing and Product Intelligence platform that tracks how users engage with our website and application. | Snowplow is an enterprise-grade marketing and Product Intelligence platform that tracks how users engage with our website and application. | ||||||
| 
 | 
 | ||||||
| [Snowplow](https://snowplowanalytics.com) consists of several loosely-coupled sub-systems: | [Snowplow](https://snowplowanalytics.com) consists of several loosely-coupled sub-systems: | ||||||
|  | @ -23,12 +19,6 @@ Snowplow is an enterprise-grade marketing and Product Intelligence platform that | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
| 
 | 
 | ||||||
| ### Useful links |  | ||||||
| 
 |  | ||||||
| - [Snowplow data structure](https://docs.snowplowanalytics.com/docs/understanding-your-pipeline/canonical-event/) |  | ||||||
| - [Our Iglu schema registry](https://gitlab.com/gitlab-org/iglu) |  | ||||||
| - [List of events used in our codebase (Event Dictionary)](https://metrics.gitlab.com/snowplow.html) |  | ||||||
| 
 |  | ||||||
| ## Enable Snowplow tracking | ## Enable Snowplow tracking | ||||||
| 
 | 
 | ||||||
| Tracking can be enabled at: | Tracking can be enabled at: | ||||||
|  | @ -165,6 +155,9 @@ Snowplow JavaScript adds [web-specific parameters](https://docs.snowplowanalytic | ||||||
| 
 | 
 | ||||||
| ## Related topics | ## Related topics | ||||||
| 
 | 
 | ||||||
|  | - [Snowplow data structure](https://docs.snowplowanalytics.com/docs/understanding-your-pipeline/canonical-event/) | ||||||
|  | - [Our Iglu schema registry](https://gitlab.com/gitlab-org/iglu) | ||||||
|  | - [List of events used in our codebase (Event Dictionary)](https://metrics.gitlab.com/snowplow.html) | ||||||
| - [Product Intelligence Guide](https://about.gitlab.com/handbook/product/product-intelligence-guide/) | - [Product Intelligence Guide](https://about.gitlab.com/handbook/product/product-intelligence-guide/) | ||||||
| - [Service Ping Guide](../service_ping/index.md) | - [Service Ping Guide](../service_ping/index.md) | ||||||
| - [Product Intelligence Direction](https://about.gitlab.com/direction/product-intelligence/) | - [Product Intelligence Direction](https://about.gitlab.com/direction/product-intelligence/) | ||||||
|  |  | ||||||
|  | @ -409,6 +409,8 @@ For Omnibus GitLab packages: | ||||||
| 
 | 
 | ||||||
| ##### S3 Encrypted Buckets | ##### S3 Encrypted Buckets | ||||||
| 
 | 
 | ||||||
|  | > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64765) in GitLab 14.3. | ||||||
|  | 
 | ||||||
| AWS supports these [modes for server side encryption](https://docs.aws.amazon.com/AmazonS3/latest/userguide/serv-side-encryption.html): | AWS supports these [modes for server side encryption](https://docs.aws.amazon.com/AmazonS3/latest/userguide/serv-side-encryption.html): | ||||||
| 
 | 
 | ||||||
| - Amazon S3-Managed Keys (SSE-S3) | - Amazon S3-Managed Keys (SSE-S3) | ||||||
|  | @ -1377,18 +1379,30 @@ after which users must reactivate 2FA. | ||||||
| 
 | 
 | ||||||
| 1. Enter the database console: | 1. Enter the database console: | ||||||
| 
 | 
 | ||||||
|    For Omnibus GitLab packages: |    For Omnibus GitLab 14.1 and earlier: | ||||||
| 
 | 
 | ||||||
|    ```shell |    ```shell | ||||||
|    sudo gitlab-rails dbconsole |    sudo gitlab-rails dbconsole | ||||||
|    ``` |    ``` | ||||||
| 
 | 
 | ||||||
|    For installations from source: |    For Omnibus GitLab 14.2 and later: | ||||||
|  | 
 | ||||||
|  |    ```shell | ||||||
|  |    sudo gitlab-rails dbconsole --database main | ||||||
|  |    ``` | ||||||
|  | 
 | ||||||
|  |    For installations from source, GitLab 14.1 and earlier: | ||||||
| 
 | 
 | ||||||
|    ```shell |    ```shell | ||||||
|    sudo -u git -H bundle exec rails dbconsole -e production |    sudo -u git -H bundle exec rails dbconsole -e production | ||||||
|    ``` |    ``` | ||||||
| 
 | 
 | ||||||
|  |    For installations from source, GitLab 14.2 and later: | ||||||
|  | 
 | ||||||
|  |    ```shell | ||||||
|  |    sudo -u git -H bundle exec rails dbconsole -e production --database main | ||||||
|  |    ``` | ||||||
|  | 
 | ||||||
| 1. Examine the `ci_group_variables` and `ci_variables` tables: | 1. Examine the `ci_group_variables` and `ci_variables` tables: | ||||||
| 
 | 
 | ||||||
|    ```sql |    ```sql | ||||||
|  | @ -1411,18 +1425,30 @@ You may need to reconfigure or restart GitLab for the changes to take effect. | ||||||
| 
 | 
 | ||||||
| 1. Enter the database console: | 1. Enter the database console: | ||||||
| 
 | 
 | ||||||
|    For Omnibus GitLab packages: |    For Omnibus GitLab 14.1 and earlier: | ||||||
| 
 | 
 | ||||||
|    ```shell |    ```shell | ||||||
|    sudo gitlab-rails dbconsole |    sudo gitlab-rails dbconsole | ||||||
|    ``` |    ``` | ||||||
| 
 | 
 | ||||||
|    For installations from source: |    For Omnibus GitLab 14.2 and later: | ||||||
|  | 
 | ||||||
|  |    ```shell | ||||||
|  |    sudo gitlab-rails dbconsole --database main | ||||||
|  |    ``` | ||||||
|  | 
 | ||||||
|  |    For installations from source, GitLab 14.1 and earlier: | ||||||
| 
 | 
 | ||||||
|    ```shell |    ```shell | ||||||
|    sudo -u git -H bundle exec rails dbconsole -e production |    sudo -u git -H bundle exec rails dbconsole -e production | ||||||
|    ``` |    ``` | ||||||
| 
 | 
 | ||||||
|  |    For installations from source, GitLab 14.2 and later: | ||||||
|  | 
 | ||||||
|  |    ```shell | ||||||
|  |    sudo -u git -H bundle exec rails dbconsole -e production --database main | ||||||
|  |    ``` | ||||||
|  | 
 | ||||||
| 1. Clear all tokens for projects, groups, and the entire instance: | 1. Clear all tokens for projects, groups, and the entire instance: | ||||||
| 
 | 
 | ||||||
|    WARNING: |    WARNING: | ||||||
|  | @ -1448,18 +1474,30 @@ You may need to reconfigure or restart GitLab for the changes to take effect. | ||||||
| 
 | 
 | ||||||
| 1. Enter the database console: | 1. Enter the database console: | ||||||
| 
 | 
 | ||||||
|    For Omnibus GitLab packages: |    For Omnibus GitLab 14.1 and earlier: | ||||||
| 
 | 
 | ||||||
|    ```shell |    ```shell | ||||||
|    sudo gitlab-rails dbconsole |    sudo gitlab-rails dbconsole | ||||||
|    ``` |    ``` | ||||||
| 
 | 
 | ||||||
|    For installations from source: |    For Omnibus GitLab 14.2 and later: | ||||||
|  | 
 | ||||||
|  |    ```shell | ||||||
|  |    sudo gitlab-rails dbconsole --database main | ||||||
|  |    ``` | ||||||
|  | 
 | ||||||
|  |    For installations from source, GitLab 14.1 and earlier: | ||||||
| 
 | 
 | ||||||
|    ```shell |    ```shell | ||||||
|    sudo -u git -H bundle exec rails dbconsole -e production |    sudo -u git -H bundle exec rails dbconsole -e production | ||||||
|    ``` |    ``` | ||||||
| 
 | 
 | ||||||
|  |    For installations from source, GitLab 14.2 and later: | ||||||
|  | 
 | ||||||
|  |    ```shell | ||||||
|  |    sudo -u git -H bundle exec rails dbconsole -e production --database main | ||||||
|  |    ``` | ||||||
|  | 
 | ||||||
| 1. Clear all the tokens for pending jobs: | 1. Clear all the tokens for pending jobs: | ||||||
| 
 | 
 | ||||||
|    ```sql |    ```sql | ||||||
|  | @ -1480,18 +1518,30 @@ The fix is to truncate the `web_hooks` table: | ||||||
| 
 | 
 | ||||||
| 1. Enter the database console: | 1. Enter the database console: | ||||||
| 
 | 
 | ||||||
|    For Omnibus GitLab packages: |    For Omnibus GitLab 14.1 and earlier: | ||||||
| 
 | 
 | ||||||
|    ```shell |    ```shell | ||||||
|    sudo gitlab-rails dbconsole |    sudo gitlab-rails dbconsole | ||||||
|    ``` |    ``` | ||||||
| 
 | 
 | ||||||
|    For installations from source: |    For Omnibus GitLab 14.2 and later: | ||||||
|  | 
 | ||||||
|  |    ```shell | ||||||
|  |    sudo gitlab-rails dbconsole --database main | ||||||
|  |    ``` | ||||||
|  | 
 | ||||||
|  |    For installations from source, GitLab 14.1 and earlier: | ||||||
| 
 | 
 | ||||||
|    ```shell |    ```shell | ||||||
|    sudo -u git -H bundle exec rails dbconsole -e production |    sudo -u git -H bundle exec rails dbconsole -e production | ||||||
|    ``` |    ``` | ||||||
| 
 | 
 | ||||||
|  |    For installations from source, GitLab 14.2 and later: | ||||||
|  | 
 | ||||||
|  |    ```shell | ||||||
|  |    sudo -u git -H bundle exec rails dbconsole -e production --database main | ||||||
|  |    ``` | ||||||
|  | 
 | ||||||
| 1. Truncate the table: | 1. Truncate the table: | ||||||
| 
 | 
 | ||||||
|    ```sql |    ```sql | ||||||
|  |  | ||||||
|  | @ -262,21 +262,36 @@ unable to add the `commit_message_regex_change` column. | ||||||
| This results in the [backport migration of EE tables](https://gitlab.com/gitlab-org/gitlab/-/blob/cf00e431024018ddd82158f8a9210f113d0f4dbc/db/migrate/20190402150158_backport_enterprise_schema.rb#L1619) not working correctly. | This results in the [backport migration of EE tables](https://gitlab.com/gitlab-org/gitlab/-/blob/cf00e431024018ddd82158f8a9210f113d0f4dbc/db/migrate/20190402150158_backport_enterprise_schema.rb#L1619) not working correctly. | ||||||
| The backport migration assumes that certain tables in the database do not exist when running CE. | The backport migration assumes that certain tables in the database do not exist when running CE. | ||||||
| 
 | 
 | ||||||
| To fix this issue, manually add the missing `commit_message_negative_regex` column and restart GitLab: | To fix this issue: | ||||||
| 
 | 
 | ||||||
| ```shell | 1. Start a database console: | ||||||
| # Access psql |  | ||||||
| sudo gitlab-rails dbconsole |  | ||||||
| 
 | 
 | ||||||
| # Add the missing column |    In GitLab 14.2 and later: | ||||||
| ALTER TABLE push_rules ADD COLUMN commit_message_negative_regex VARCHAR; |  | ||||||
| 
 | 
 | ||||||
| # Exit psql |    ```shell | ||||||
| \q |    sudo gitlab-rails dbconsole --database main | ||||||
|  |    ``` | ||||||
| 
 | 
 | ||||||
| # Restart GitLab |    In GitLab 14.1 and earlier: | ||||||
| sudo gitlab-ctl restart | 
 | ||||||
| ``` |    ```shell | ||||||
|  |    sudo gitlab-rails dbconsole | ||||||
|  |    ``` | ||||||
|  | 
 | ||||||
|  | 1. Manually add the missing `commit_message_negative_regex` column: | ||||||
|  | 
 | ||||||
|  |    ```sql | ||||||
|  |    ALTER TABLE push_rules ADD COLUMN commit_message_negative_regex VARCHAR; | ||||||
|  | 
 | ||||||
|  |    # Exit psql | ||||||
|  |    \q | ||||||
|  |    ``` | ||||||
|  | 
 | ||||||
|  | 1. Restart GitLab: | ||||||
|  | 
 | ||||||
|  |    ```shell | ||||||
|  |    sudo gitlab-ctl restart | ||||||
|  |    ``` | ||||||
| 
 | 
 | ||||||
| ### Error `Failed to connect to the internal GitLab API` on a separate GitLab Pages server | ### Error `Failed to connect to the internal GitLab API` on a separate GitLab Pages server | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -27800,6 +27800,9 @@ msgstr "" | ||||||
| msgid "Protip: %{linkStart}Auto DevOps%{linkEnd} uses Kubernetes clusters to deploy your code!" | msgid "Protip: %{linkStart}Auto DevOps%{linkEnd} uses Kubernetes clusters to deploy your code!" | ||||||
| msgstr "" | msgstr "" | ||||||
| 
 | 
 | ||||||
|  | msgid "Provide a number our sales team can use to call you." | ||||||
|  | msgstr "" | ||||||
|  | 
 | ||||||
| msgid "Provider" | msgid "Provider" | ||||||
| msgstr "" | msgstr "" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
| import MockAdapter from 'axios-mock-adapter'; | import MockAdapter from 'axios-mock-adapter'; | ||||||
| import $ from 'jquery'; | import $ from 'jquery'; | ||||||
| import labelsFixture from 'test_fixtures/autocomplete_sources/labels.json'; | import labelsFixture from 'test_fixtures/autocomplete_sources/labels.json'; | ||||||
| import GfmAutoComplete, { membersBeforeSave } from 'ee_else_ce/gfm_auto_complete'; | import GfmAutoComplete, { membersBeforeSave, highlighter } from 'ee_else_ce/gfm_auto_complete'; | ||||||
| import { initEmojiMock } from 'helpers/emoji'; | import { initEmojiMock } from 'helpers/emoji'; | ||||||
| import '~/lib/utils/jquery_at_who'; | import '~/lib/utils/jquery_at_who'; | ||||||
| import { TEST_HOST } from 'helpers/test_constants'; | import { TEST_HOST } from 'helpers/test_constants'; | ||||||
|  | @ -858,4 +858,14 @@ describe('GfmAutoComplete', () => { | ||||||
|       ); |       ); | ||||||
|     }); |     }); | ||||||
|   }); |   }); | ||||||
|  | 
 | ||||||
|  |   describe('highlighter', () => { | ||||||
|  |     it('escapes regex', () => { | ||||||
|  |       const li = '<li>couple (woman,woman) <gl-emoji data-name="couple_ww"></gl-emoji></li>'; | ||||||
|  | 
 | ||||||
|  |       expect(highlighter(li, ')')).toBe( | ||||||
|  |         '<li> couple (woman,woman<strong>)</strong>  <gl-emoji data-name="couple_ww"></gl-emoji></li>', | ||||||
|  |       ); | ||||||
|  |     }); | ||||||
|  |   }); | ||||||
| }); | }); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue