Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
6419f48839
commit
67cddd762d
|
|
@ -2,6 +2,9 @@ import { GlColumnChart } from '@gitlab/ui/dist/charts';
|
|||
import Vue from 'vue';
|
||||
import { waitForCSSLoaded } from '~/helpers/startup_css_helper';
|
||||
import { __ } from '~/locale';
|
||||
import { visitUrl } from '~/lib/utils/url_utility';
|
||||
import { REF_TYPE_BRANCHES, REF_TYPE_TAGS } from '~/ref/constants';
|
||||
import RefSelector from '~/ref/components/ref_selector.vue';
|
||||
import CodeCoverage from '../components/code_coverage.vue';
|
||||
import SeriesDataMixin from './series_data_mixin';
|
||||
|
||||
|
|
@ -13,6 +16,7 @@ waitForCSSLoaded(() => {
|
|||
const monthContainer = document.getElementById('js-month-chart');
|
||||
const weekdayContainer = document.getElementById('js-weekday-chart');
|
||||
const hourContainer = document.getElementById('js-hour-chart');
|
||||
const branchSelector = document.getElementById('js-project-graph-ref-switcher');
|
||||
const LANGUAGE_CHART_HEIGHT = 300;
|
||||
const reorderWeekDays = (weekDays, firstDayOfWeek = 0) => {
|
||||
if (firstDayOfWeek === 0) {
|
||||
|
|
@ -173,4 +177,38 @@ waitForCSSLoaded(() => {
|
|||
});
|
||||
},
|
||||
});
|
||||
|
||||
const { projectId, projectBranch, graphPath } = branchSelector.dataset;
|
||||
|
||||
const GRAPHS_PATH_REGEX = /^(.*?)\/-\/graphs/g;
|
||||
const graphsPathPrefix = graphPath.match(GRAPHS_PATH_REGEX)?.[0];
|
||||
if (!graphsPathPrefix) {
|
||||
// eslint-disable-next-line @gitlab/require-i18n-strings
|
||||
throw new Error('Path is not correct');
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-new
|
||||
new Vue({
|
||||
el: branchSelector,
|
||||
name: 'RefSelector',
|
||||
render(createComponent) {
|
||||
return createComponent(RefSelector, {
|
||||
props: {
|
||||
enabledRefTypes: [REF_TYPE_BRANCHES, REF_TYPE_TAGS],
|
||||
value: projectBranch,
|
||||
translations: {
|
||||
dropdownHeader: __('Switch branch/tag'),
|
||||
searchPlaceholder: __('Search branches and tags'),
|
||||
},
|
||||
projectId,
|
||||
},
|
||||
class: 'gl-w-20',
|
||||
on: {
|
||||
input(selected) {
|
||||
visitUrl(`${graphsPathPrefix}/${encodeURIComponent(selected)}/charts`);
|
||||
},
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ export default {
|
|||
data-testid="ci-header-content"
|
||||
>
|
||||
<section class="header-main-content gl-mr-3">
|
||||
<ci-badge-link :status="status" />
|
||||
<ci-badge-link class="gl-mr-3" :status="status" />
|
||||
|
||||
<strong data-testid="ci-header-item-text">{{ item }}</strong>
|
||||
|
||||
|
|
|
|||
|
|
@ -42,8 +42,4 @@
|
|||
margin: 0 2px 0 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.ci-status {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,10 +13,6 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
|
|||
|
||||
before_action :disable_query_limiting, only: [:usage_data]
|
||||
|
||||
before_action do
|
||||
push_frontend_feature_flag(:ci_remove_character_limitation_raw_masked_var, type: :development)
|
||||
end
|
||||
|
||||
feature_category :not_owned, [ # rubocop:todo Gitlab/AvoidFeatureCategoryNotOwned
|
||||
:general, :reporting, :metrics_and_profiling, :network,
|
||||
:preferences, :update, :reset_health_check_token
|
||||
|
|
|
|||
|
|
@ -11,10 +11,6 @@ module Groups
|
|||
before_action :push_licensed_features, only: [:show]
|
||||
before_action :assign_variables_to_gon, only: [:show]
|
||||
|
||||
before_action do
|
||||
push_frontend_feature_flag(:ci_remove_character_limitation_raw_masked_var, type: :development)
|
||||
end
|
||||
|
||||
feature_category :continuous_integration
|
||||
urgency :low
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class Projects::ReleasesController < Projects::ApplicationController
|
|||
before_action :validate_suffix_path, :fetch_latest_tag, only: :latest_permalink
|
||||
|
||||
prepend_before_action(only: [:downloads]) do
|
||||
authenticate_sessionless_user!(:download) if Feature.enabled?(:allow_release_as_web_access_format)
|
||||
authenticate_sessionless_user!(:download)
|
||||
end
|
||||
|
||||
feature_category :release_orchestration
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ module Projects
|
|||
before_action :define_variables
|
||||
|
||||
before_action do
|
||||
push_frontend_feature_flag(:ci_remove_character_limitation_raw_masked_var, type: :development)
|
||||
push_frontend_feature_flag(:ci_inbound_job_token_scope, @project)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -25,14 +25,12 @@ module Ci
|
|||
end
|
||||
|
||||
def masked_and_raw?
|
||||
return false unless Feature.enabled?(:ci_remove_character_limitation_raw_masked_var)
|
||||
return false unless self.class.method_defined?(:raw)
|
||||
|
||||
masked? && raw?
|
||||
end
|
||||
|
||||
def masked_and_expanded?
|
||||
return masked? unless Feature.enabled?(:ci_remove_character_limitation_raw_masked_var)
|
||||
return masked? unless self.class.method_defined?(:raw)
|
||||
|
||||
masked? && !raw?
|
||||
|
|
|
|||
|
|
@ -3072,7 +3072,6 @@ class Project < ApplicationRecord
|
|||
|
||||
def enqueue_record_project_target_platforms
|
||||
return unless Gitlab.com?
|
||||
return unless Feature.enabled?(:record_projects_target_platforms, self)
|
||||
|
||||
Projects::RecordTargetPlatformsWorker.perform_async(id)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
.col-md-6
|
||||
.tree-ref-container
|
||||
.tree-ref-holder
|
||||
= render 'shared/ref_switcher', destination: 'graphs_commits', path: @path
|
||||
#js-project-graph-ref-switcher{ data: { project_id: @project.id, graph_path: project_graph_path(@project, @id), project_branch: current_ref } }
|
||||
%ul.breadcrumb.repo-breadcrumb
|
||||
= commits_breadcrumbs
|
||||
|
||||
|
|
|
|||
|
|
@ -3164,7 +3164,7 @@
|
|||
:tags: []
|
||||
- :name: projects_record_target_platforms
|
||||
:worker_name: Projects::RecordTargetPlatformsWorker
|
||||
:feature_category: :experimentation_activation
|
||||
:feature_category: :projects
|
||||
:has_external_dependencies: false
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ module Projects
|
|||
APPLE_PLATFORM_LANGUAGES = %w(swift objective-c).freeze
|
||||
ANDROID_PLATFORM_LANGUAGES = %w(java kotlin).freeze
|
||||
|
||||
feature_category :experimentation_activation
|
||||
feature_category :projects
|
||||
data_consistency :always
|
||||
deduplicate :until_executed
|
||||
urgency :low
|
||||
|
|
|
|||
|
|
@ -18,6 +18,14 @@ production:
|
|||
# port: 8600
|
||||
# record: secondary.postgresql.service.consul
|
||||
# interval: 300
|
||||
# ci:
|
||||
# adapter: postgresql
|
||||
# encoding: unicode
|
||||
# database: gitlabhq_production
|
||||
# database_tasks: false
|
||||
# username: git
|
||||
# password: "secure password"
|
||||
# host: localhost
|
||||
geo:
|
||||
adapter: postgresql
|
||||
encoding: unicode
|
||||
|
|
@ -39,6 +47,16 @@ development:
|
|||
host: localhost
|
||||
variables:
|
||||
statement_timeout: 15s
|
||||
# ci:
|
||||
# adapter: postgresql
|
||||
# encoding: unicode
|
||||
# database: gitlabhq_development
|
||||
# database_tasks: false
|
||||
# username: postgres
|
||||
# password: "secure password"
|
||||
# host: localhost
|
||||
# variables:
|
||||
# statement_timeout: 15s
|
||||
geo:
|
||||
adapter: postgresql
|
||||
encoding: unicode
|
||||
|
|
@ -58,6 +76,14 @@ staging:
|
|||
username: git
|
||||
password: "secure password"
|
||||
host: localhost
|
||||
# ci:
|
||||
# adapter: postgresql
|
||||
# encoding: unicode
|
||||
# database: gitlabhq_staging
|
||||
# database_tasks: false
|
||||
# username: git
|
||||
# password: "secure password"
|
||||
# host: localhost
|
||||
geo:
|
||||
adapter: postgresql
|
||||
encoding: unicode
|
||||
|
|
@ -80,6 +106,17 @@ test: &test
|
|||
prepared_statements: false
|
||||
variables:
|
||||
statement_timeout: 15s
|
||||
# ci:
|
||||
# adapter: postgresql
|
||||
# encoding: unicode
|
||||
# database: gitlabhq_test
|
||||
# database_tasks: false
|
||||
# username: postgres
|
||||
# password:
|
||||
# host: localhost
|
||||
# prepared_statements: false
|
||||
# variables:
|
||||
# statement_timeout: 15s
|
||||
geo:
|
||||
adapter: postgresql
|
||||
encoding: unicode
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
name: allow_release_as_web_access_format
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/109217
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/388471
|
||||
milestone: '15.8'
|
||||
type: development
|
||||
group: group::release
|
||||
default_enabled: false
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
name: ci_remove_character_limitation_raw_masked_var
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/109008
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/388414
|
||||
milestone: '15.9'
|
||||
type: development
|
||||
group: group::pipeline authoring
|
||||
default_enabled: false
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
name: record_projects_target_platforms
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/80361
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/354286
|
||||
milestone: '14.10'
|
||||
type: development
|
||||
group: group::activation
|
||||
default_enabled: false
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
- title: "Queue selector for running Sidekiq is deprecated" # (required) Clearly explain the change, or planned change. For example, "The `confidential` field for a `Note` is deprecated" or "CI/CD job names will be limited to 250 characters."
|
||||
announcement_milestone: "15.9" # (required) The milestone when this feature was first announced as deprecated.
|
||||
removal_milestone: "17.0" # (required) The milestone when this feature is planned to be removed
|
||||
end_of_support_milestone: "16.0"
|
||||
breaking_change: true # (required) Change to false if this is not a breaking change.
|
||||
reporter: marcogreg # (required) GitLab username of the person reporting the change
|
||||
stage: scalability # (required) String value of the stage that the feature was created in. e.g., Growth
|
||||
issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/390787 # (required) Link to the deprecation issue in GitLab
|
||||
body: | # (required) Do not modify this line, instead modify the lines below.
|
||||
Running Sidekiq with a [queue selector](https://docs.gitlab.com/ee/administration/sidekiq/processing_specific_job_classes.html#queue-selectors) (having multiple processes listening to a set of queues) and [negate settings](https://docs.gitlab.com/ee/administration/sidekiq/processing_specific_job_classes.html#negate-settings) is deprecated and will be fully removed in 17.0.
|
||||
|
||||
You can migrate away from queue selectors to [listening to all queues in all processes](https://docs.gitlab.com/ee/administration/sidekiq/extra_sidekiq_processes.html#start-multiple-processes). For example, if Sidekiq is currently running with 4 processes (denoted by 4 elements in `sidekiq['queue_groups']` in `/etc/gitlab/gitlab.rb`) with queue selector (`sidekiq['queue_selector'] = true`), you can change Sidekiq to listen to all queues in all 4 processes,for example `sidekiq['queue_groups'] = ['*'] * 4`. This approach is also recommended in our [Reference Architecture](https://docs.gitlab.com/ee/administration/reference_architectures/5k_users.html#configure-sidekiq). Note that Sidekiq can effectively run as many processes as the number of CPUs in the machine.
|
||||
|
||||
While the above approach is recommended for most instances, Sidekiq can also be run using [routing rules](https://docs.gitlab.com/ee/administration/sidekiq/processing_specific_job_classes.html#routing-rules) which is also being used on GitLab.com. You can follow the [migration guide from queue selectors to routing rules](https://docs.gitlab.com/ee/administration/sidekiq/processing_specific_job_classes.html#migrating-from-queue-selectors-to-routing-rules). You need to take care with the migration to avoid losing jobs entirely.
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class FixPartitionIdsForCiStage < Gitlab::Database::Migration[2.1]
|
||||
MIGRATION = 'RebalancePartitionId'
|
||||
DELAY_INTERVAL = 2.minutes.freeze
|
||||
TABLE = :ci_stages
|
||||
BATCH_SIZE = 3_000
|
||||
SUB_BATCH_SIZE = 300
|
||||
|
||||
restrict_gitlab_migration gitlab_schema: :gitlab_ci
|
||||
|
||||
def up
|
||||
return unless Gitlab.com?
|
||||
|
||||
queue_batched_background_migration(
|
||||
MIGRATION,
|
||||
TABLE,
|
||||
:id,
|
||||
job_interval: DELAY_INTERVAL,
|
||||
batch_size: BATCH_SIZE,
|
||||
sub_batch_size: SUB_BATCH_SIZE
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
return unless Gitlab.com?
|
||||
|
||||
delete_batched_background_migration(MIGRATION, TABLE, :id, [])
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
a4709b533b0ef420e5a14088fcf7e2646d4601019f62429b528ea3c715da87ca
|
||||
|
|
@ -200,6 +200,7 @@ This list of limitations only reflects the latest version of GitLab. If you are
|
|||
- [Pages access control](../../user/project/pages/pages_access_control.md) doesn't work on secondaries. See [GitLab issue #9336](https://gitlab.com/gitlab-org/gitlab/-/issues/9336) for details.
|
||||
- [GitLab chart with Geo](https://docs.gitlab.com/charts/advanced/geo/) does not support [Unified URLs](secondary_proxy/index.md#set-up-a-unified-url-for-geo-sites). See [GitLab issue #3522](https://gitlab.com/gitlab-org/charts/gitlab/-/issues/3522) for more details.
|
||||
- [Disaster recovery](disaster_recovery/index.md) for multi-secondary sites causes downtime due to the complete re-synchronization and re-configuration of all non-promoted secondaries.
|
||||
- For Git over SSH, secondary sites must use the same port as the primary. [GitLab issue #339262](https://gitlab.com/gitlab-org/gitlab/-/issues/339262) proposes to remove this limitation.
|
||||
|
||||
### Limitations on replication/verification
|
||||
|
||||
|
|
|
|||
|
|
@ -185,6 +185,8 @@ To find more details about failed items, check
|
|||
|
||||
If you notice replication or verification failures, you can try to [resolve them](#fixing-non-postgresql-replication-failures).
|
||||
|
||||
If there are Repository check failures, you can try to [resolve them](#find-repository-check-failures-in-a-geo-secondary-site).
|
||||
|
||||
### Check if PostgreSQL replication is working
|
||||
|
||||
To check if PostgreSQL replication is working, check if:
|
||||
|
|
@ -1578,6 +1580,49 @@ project = Project.find_by_full_path('<group/project>')
|
|||
Geo::RepositorySyncService.new(project).execute
|
||||
```
|
||||
|
||||
#### Find repository check failures in a Geo secondary site
|
||||
|
||||
When [enabled for all projects](../../repository_checks.md#enable-repository-checks-for-all-projects), [Repository checks](../../repository_checks.md) are also performed on Geo secondary sites. The metadata is stored in the Geo tracking database.
|
||||
|
||||
Repository check failures on a Geo secondary site do not necessarily imply a replication problem. Here is a general approach to resolve these failures.
|
||||
|
||||
1. Find affected repositories as mentioned below, as well as their [logged errors](../../repository_checks.md#what-to-do-if-a-check-failed).
|
||||
1. Try to diagnose specific `git fsck` errors. The range of possible errors is wide, try putting them into search engines.
|
||||
1. Test normal functions of the affected repositories. Pull from the secondary, view the files.
|
||||
1. Check if the primary site's copy of the repository has an identical `git fsck` error. If you are planning a failover, then consider prioritizing that the secondary site has the same information that the primary site has. Ensure you have a backup of the primary, and follow [planned failover guidelines](../disaster_recovery/planned_failover.md).
|
||||
1. Push to the primary and check if the change gets replicated to the secondary site.
|
||||
1. If replication is not automatically working, try to manually sync the repository.
|
||||
|
||||
[Start a Rails console session](../../operations/rails_console.md#starting-a-rails-console-session)
|
||||
to enact the following, basic troubleshooting steps.
|
||||
|
||||
WARNING:
|
||||
Commands that change data can cause damage if not run correctly or under the right conditions. Always run commands in a test environment first and have a backup instance ready to restore.
|
||||
|
||||
##### Get the number of repositories that failed the repository check
|
||||
|
||||
```ruby
|
||||
Geo::ProjectRegistry.where(last_repository_check_failed: true).count
|
||||
```
|
||||
|
||||
##### Find the repositories that failed the repository check
|
||||
|
||||
```ruby
|
||||
Geo::ProjectRegistry.where(last_repository_check_failed: true)
|
||||
```
|
||||
|
||||
##### Recheck repositories that failed the repository check
|
||||
|
||||
When you run this, `fsck` is executed against each failed repository.
|
||||
|
||||
The [`fsck` Rake command](../../raketasks/check.md#check-project-code-repositories) can be used on the secondary site to understand why the repository check might be failing.
|
||||
|
||||
```ruby
|
||||
Geo::ProjectRegistry.where(last_repository_check_failed: true).each do |pr|
|
||||
RepositoryCheck::SingleRepositoryWorker.new.perform(pr.project_id)
|
||||
end
|
||||
```
|
||||
|
||||
## Fixing client errors
|
||||
|
||||
### Authorization errors from LFS HTTP(S) client requests
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ Step 4 involves rewriting some Sidekiq job data for jobs that are already stored
|
|||
- `gitlab:sidekiq:migrate_jobs:retry` for jobs to be retried.
|
||||
- `gitlab:sidekiq:migrate_jobs:scheduled` for scheduled jobs.
|
||||
|
||||
Queued jobs that are yet to be run can also be migrated with a Rake task:
|
||||
Queued jobs that are yet to be run can also be migrated with a Rake task ([available in GitLab 15.6](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/101348) and later):
|
||||
|
||||
- `gitlab:sidekiq:migrate_jobs:queued` for queued jobs to be performed asynchronously.
|
||||
|
||||
Most of the time, running all three at the same time is the correct choice. There are three separate tasks to allow for more fine-grained control where needed. To run all three at once:
|
||||
Most of the time, running all three at the same time is the correct choice. There are three separate tasks to allow for more fine-grained control where needed. To run all three at once ([available in GitLab 15.6](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/101348) and later):
|
||||
|
||||
```shell
|
||||
# omnibus-gitlab
|
||||
|
|
|
|||
|
|
@ -78,39 +78,49 @@ An environment is either static or dynamic:
|
|||
|
||||
### Create a static environment
|
||||
|
||||
You can create an environment and deployment in the UI or in your `.gitlab-ci.yml` file.
|
||||
You can create a static environment in the UI or in your `.gitlab-ci.yml` file.
|
||||
|
||||
In the UI:
|
||||
#### In the UI
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- You must have at least the Developer role.
|
||||
|
||||
To create a static environment in the UI:
|
||||
|
||||
1. On the top bar, select **Main menu > Projects** and find your project.
|
||||
1. On the left sidebar, select **Deployments > Environments**.
|
||||
1. Select **New environment**.
|
||||
1. Enter a name and external URL.
|
||||
1. Complete the fields.
|
||||
1. Select **Save**.
|
||||
|
||||
In your `.gitlab-ci.yml` file:
|
||||
#### In your `.gitlab-ci.yml` file
|
||||
|
||||
1. Specify a name for the environment and optionally, a URL, which determines the deployment URL.
|
||||
For example:
|
||||
Prerequisites:
|
||||
|
||||
```yaml
|
||||
deploy_staging:
|
||||
stage: deploy
|
||||
script:
|
||||
- echo "Deploy to staging server"
|
||||
environment:
|
||||
name: staging
|
||||
url: https://staging.example.com
|
||||
```
|
||||
- You must have at least the Developer role.
|
||||
|
||||
1. Trigger a deployment. (For example, by creating and pushing a commit.)
|
||||
To create a static environment, in your `.gitlab-ci.yml` file:
|
||||
|
||||
When the job runs, the environment and deployment are created.
|
||||
1. Define a job in the `deploy` stage.
|
||||
1. In the job, define the environment `name` and `url`. If an
|
||||
environment of that name doesn't exist when the pipeline runs, it is created.
|
||||
|
||||
NOTE:
|
||||
Some characters cannot be used in environment names.
|
||||
For more information about the `environment` keywords, see
|
||||
[the `.gitlab-ci.yml` keyword reference](../yaml/index.md#environment).
|
||||
Some characters cannot be used in environment names. For more information about the
|
||||
`environment` keywords, see the [`.gitlab-ci.yml` keyword reference](../yaml/index.md#environment).
|
||||
|
||||
For example, to create an environment named `staging`, with URL `https://staging.example.com`:
|
||||
|
||||
```yaml
|
||||
deploy_staging:
|
||||
stage: deploy
|
||||
script:
|
||||
- echo "Deploy to staging server"
|
||||
environment:
|
||||
name: staging
|
||||
url: https://staging.example.com
|
||||
```
|
||||
|
||||
### Create a dynamic environment
|
||||
|
||||
|
|
|
|||
|
|
@ -621,10 +621,18 @@ sudo -u git -H editor config/database.yml
|
|||
# You can keep the double quotes around the password
|
||||
sudo -u git -H editor config/database.yml
|
||||
|
||||
# Uncomment the `ci:` sections in config/database.yml.
|
||||
# Ensure the `database` value in `ci:` matches the database value in `main:`.
|
||||
|
||||
# Make config/database.yml readable to git only
|
||||
sudo -u git -H chmod o-rwx config/database.yml
|
||||
```
|
||||
|
||||
NOTE:
|
||||
From GitLab 15.9, `database.yml` with only a section: `main:` is deprecated.
|
||||
In GitLab 15.10 and later, you should have two sections in your `database.yml`, `main:` and `ci:`. The `ci`: connection [must be to the same database](../administration/postgresql/multiple_databases.md).
|
||||
In GitLab 17.0 and later, you must have the two `main:` and `ci:` sections in your `database.yml`.
|
||||
|
||||
### Install Gems
|
||||
|
||||
NOTE:
|
||||
|
|
|
|||
|
|
@ -210,6 +210,25 @@ The option to delete projects immediately by default was deprecated to prevent u
|
|||
|
||||
</div>
|
||||
|
||||
<div class="deprecation removal-170 breaking-change">
|
||||
|
||||
### Queue selector for running Sidekiq is deprecated
|
||||
|
||||
End of Support: GitLab <span class="removal-milestone">16.0</span> <span class="support-end-date"></span><br />
|
||||
Planned removal: GitLab <span class="removal-milestone">17.0</span> <span class="removal-date"></span>
|
||||
|
||||
WARNING:
|
||||
This is a [breaking change](https://docs.gitlab.com/ee/development/deprecation_guidelines/).
|
||||
Review the details carefully before upgrading.
|
||||
|
||||
Running Sidekiq with a [queue selector](https://docs.gitlab.com/ee/administration/sidekiq/processing_specific_job_classes.html#queue-selectors) (having multiple processes listening to a set of queues) and [negate settings](https://docs.gitlab.com/ee/administration/sidekiq/processing_specific_job_classes.html#negate-settings) is deprecated and will be fully removed in 17.0.
|
||||
|
||||
You can migrate away from queue selectors to [listening to all queues in all processes](https://docs.gitlab.com/ee/administration/sidekiq/extra_sidekiq_processes.html#start-multiple-processes). For example, if Sidekiq is currently running with 4 processes (denoted by 4 elements in `sidekiq['queue_groups']` in `/etc/gitlab/gitlab.rb`) with queue selector (`sidekiq['queue_selector'] = true`), you can change Sidekiq to listen to all queues in all 4 processes,for example `sidekiq['queue_groups'] = ['*'] * 4`. This approach is also recommended in our [Reference Architecture](https://docs.gitlab.com/ee/administration/reference_architectures/5k_users.html#configure-sidekiq). Note that Sidekiq can effectively run as many processes as the number of CPUs in the machine.
|
||||
|
||||
While the above approach is recommended for most instances, Sidekiq can also be run using [routing rules](https://docs.gitlab.com/ee/administration/sidekiq/processing_specific_job_classes.html#routing-rules) which is also being used on GitLab.com. You can follow the [migration guide from queue selectors to routing rules](https://docs.gitlab.com/ee/administration/sidekiq/processing_specific_job_classes.html#migrating-from-queue-selectors-to-routing-rules). You need to take care with the migration to avoid losing jobs entirely.
|
||||
|
||||
</div>
|
||||
|
||||
<div class="deprecation removal-160 breaking-change">
|
||||
|
||||
### Required Pipeline Configuration is deprecated
|
||||
|
|
|
|||
|
|
@ -44,30 +44,30 @@ module Gitlab
|
|||
TRANSLATION_LEVELS = {
|
||||
'bg' => 0,
|
||||
'cs_CZ' => 0,
|
||||
'da_DK' => 35,
|
||||
'da_DK' => 34,
|
||||
'de' => 16,
|
||||
'en' => 100,
|
||||
'eo' => 0,
|
||||
'es' => 34,
|
||||
'es' => 33,
|
||||
'fil_PH' => 0,
|
||||
'fr' => 98,
|
||||
'fr' => 99,
|
||||
'gl_ES' => 0,
|
||||
'id_ID' => 0,
|
||||
'it' => 1,
|
||||
'ja' => 29,
|
||||
'ja' => 31,
|
||||
'ko' => 20,
|
||||
'nb_NO' => 24,
|
||||
'nb_NO' => 23,
|
||||
'nl_NL' => 0,
|
||||
'pl_PL' => 3,
|
||||
'pt_BR' => 57,
|
||||
'ro_RO' => 94,
|
||||
'ro_RO' => 91,
|
||||
'ru' => 26,
|
||||
'si_LK' => 11,
|
||||
'tr_TR' => 10,
|
||||
'uk' => 54,
|
||||
'uk' => 55,
|
||||
'zh_CN' => 98,
|
||||
'zh_HK' => 1,
|
||||
'zh_TW' => 99
|
||||
'zh_TW' => 98
|
||||
}.freeze
|
||||
private_constant :TRANSLATION_LEVELS
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Metrics
|
||||
module Environment
|
||||
class << self
|
||||
def web?
|
||||
service?('web')
|
||||
end
|
||||
|
||||
def api?
|
||||
service?('api')
|
||||
end
|
||||
|
||||
def git?
|
||||
service?('git')
|
||||
end
|
||||
|
||||
def service?(name)
|
||||
env_var = ENV.fetch('GITLAB_METRICS_INITIALIZE', '')
|
||||
return true unless env_var.present?
|
||||
|
||||
env_var == name
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -58,8 +58,16 @@ module Gitlab
|
|||
end
|
||||
|
||||
def endpoint_ids
|
||||
['SearchController#show', 'GET /api/:version/search', 'GET /api/:version/projects/:id/(-/)search',
|
||||
'GET /api/:version/groups/:id/(-/)search']
|
||||
api_endpoints = ['GET /api/:version/search', 'GET /api/:version/projects/:id/(-/)search',
|
||||
'GET /api/:version/groups/:id/(-/)search']
|
||||
web_endpoints = ['SearchController#show']
|
||||
|
||||
endpoints = []
|
||||
|
||||
endpoints += api_endpoints if Gitlab::Metrics::Environment.api?
|
||||
endpoints += web_endpoints if Gitlab::Metrics::Environment.web?
|
||||
|
||||
endpoints
|
||||
end
|
||||
|
||||
def possible_labels
|
||||
|
|
|
|||
|
|
@ -5,8 +5,10 @@ module Gitlab
|
|||
module RailsSlis
|
||||
class << self
|
||||
def initialize_request_slis!
|
||||
Gitlab::Metrics::Sli::Apdex.initialize_sli(:rails_request, possible_request_labels)
|
||||
Gitlab::Metrics::Sli::ErrorRate.initialize_sli(:rails_request, possible_request_labels)
|
||||
request_labels = possible_request_labels
|
||||
|
||||
Gitlab::Metrics::Sli::Apdex.initialize_sli(:rails_request, request_labels)
|
||||
Gitlab::Metrics::Sli::ErrorRate.initialize_sli(:rails_request, request_labels)
|
||||
Gitlab::Metrics::Sli::Apdex.initialize_sli(:graphql_query, possible_graphql_query_labels)
|
||||
end
|
||||
|
||||
|
|
@ -25,6 +27,8 @@ module Gitlab
|
|||
private
|
||||
|
||||
def possible_graphql_query_labels
|
||||
return [] unless Gitlab::Metrics::Environment.api?
|
||||
|
||||
::Gitlab::Graphql::KnownOperations.default.operations.map do |op|
|
||||
{
|
||||
endpoint_id: op.to_caller_id,
|
||||
|
|
@ -39,7 +43,27 @@ module Gitlab
|
|||
possible_controller_labels + possible_api_labels
|
||||
end
|
||||
|
||||
def possible_controller_labels
|
||||
all_controller_labels.select do |labelset|
|
||||
if known_git_endpoints.include?(labelset[:endpoint_id])
|
||||
Gitlab::Metrics::Environment.git?
|
||||
else
|
||||
Gitlab::Metrics::Environment.web?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def possible_api_labels
|
||||
all_api_labels.select do |labelset|
|
||||
if known_git_endpoints.include?(labelset[:endpoint_id])
|
||||
Gitlab::Metrics::Environment.git?
|
||||
else
|
||||
Gitlab::Metrics::Environment.api?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def all_api_labels
|
||||
Gitlab::RequestEndpoints.all_api_endpoints.map do |route|
|
||||
endpoint_id = API::Base.endpoint_id_for_route(route)
|
||||
route_class = route.app.options[:for]
|
||||
|
|
@ -54,7 +78,7 @@ module Gitlab
|
|||
end
|
||||
end
|
||||
|
||||
def possible_controller_labels
|
||||
def all_controller_labels
|
||||
Gitlab::RequestEndpoints.all_controller_actions.map do |controller, action|
|
||||
{
|
||||
endpoint_id: controller.endpoint_id_for_action(action),
|
||||
|
|
@ -63,6 +87,29 @@ module Gitlab
|
|||
}
|
||||
end
|
||||
end
|
||||
|
||||
def known_git_endpoints
|
||||
# This is a list of endpoints that endpoints that HAProxy redirects
|
||||
# to the git fleet for GitLab.com. It is taken from
|
||||
# https://thanos-query.ops.gitlab.net/graph?g0.expr=sum%20by%20(endpoint_id)(sli_aggregations%3Agitlab_sli_rails_request_total_rate6h%7Btype%3D%22git%22%2C%20env%3D%22gprd%22%7D%20%3E%200)&g0.tab=1&g0.stacked=0&g0.range_input=1h&g0.max_source_resolution=0s&g0.deduplicate=1&g0.partial_response=0&g0.store_matches=%5B%5D
|
||||
[
|
||||
"GET /api/:version/internal/authorized_keys",
|
||||
"GET /api/:version/internal/discover",
|
||||
"POST /api/:version/internal/allowed",
|
||||
"POST /api/:version/internal/lfs_authenticate",
|
||||
"POST /api/:version/internal/two_factor_recovery_codes",
|
||||
"ProjectsController#show",
|
||||
"Repositories::GitHttpController#git_receive_pack",
|
||||
"Repositories::GitHttpController#git_upload_pack",
|
||||
"Repositories::GitHttpController#info_refs",
|
||||
"Repositories::LfsApiController#batch",
|
||||
"Repositories::LfsLocksApiController#index",
|
||||
"Repositories::LfsLocksApiController#verify",
|
||||
"Repositories::LfsStorageController#download",
|
||||
"Repositories::LfsStorageController#upload_authorize",
|
||||
"Repositories::LfsStorageController#upload_finalize"
|
||||
]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1805
locale/bg/gitlab.po
1805
locale/bg/gitlab.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1831
locale/de/gitlab.po
1831
locale/de/gitlab.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1805
locale/eo/gitlab.po
1805
locale/eo/gitlab.po
File diff suppressed because it is too large
Load Diff
1837
locale/es/gitlab.po
1837
locale/es/gitlab.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2799
locale/fr/gitlab.po
2799
locale/fr/gitlab.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1805
locale/it/gitlab.po
1805
locale/it/gitlab.po
File diff suppressed because it is too large
Load Diff
2885
locale/ja/gitlab.po
2885
locale/ja/gitlab.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1805
locale/kab/gitlab.po
1805
locale/kab/gitlab.po
File diff suppressed because it is too large
Load Diff
2031
locale/ko/gitlab.po
2031
locale/ko/gitlab.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1847
locale/ru/gitlab.po
1847
locale/ru/gitlab.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2579
locale/uk/gitlab.po
2579
locale/uk/gitlab.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue