From 3774672ae1b0941688c555be24bfc629ca7514d7 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 20 Dec 2021 21:10:56 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .dockerignore | 2 +- GITALY_SERVER_VERSION | 2 +- app/graphql/types/merge_request_type.rb | 2 +- ...mporter_use_diff_note_with_suggestions.yml | 2 +- .../development/track_geo_proxy_events.yml | 8 +++++ .../0_inject_enterprise_edition_module.rb | 2 +- doc/administration/monitoring/ip_whitelist.md | 2 -- .../monitoring/prometheus/gitlab_metrics.md | 8 ++--- doc/development/snowplow/schemas.md | 1 + .../admin_area/monitoring/health_check.md | 29 ------------------- doc/user/project/import/github.md | 1 + doc/user/project/integrations/prometheus.md | 12 ++------ .../prometheus_library/haproxy.md | 2 -- .../integrations/prometheus_library/index.md | 2 -- .../prometheus_library/kubernetes.md | 4 --- .../integrations/prometheus_library/nginx.md | 2 -- .../prometheus_library/nginx_ingress_vts.md | 2 -- .../merge_requests/creating_merge_requests.md | 2 +- lib/gitlab/tracking/standard_context.rb | 5 ++-- .../known_events/common.yml | 6 ++++ qa/Dockerfile | 2 +- qa/qa.rb | 2 +- qa/qa/tools/reliable_report.rb | 22 +++++++++----- qa/spec/tools/reliable_report_spec.rb | 23 +++++++++++---- .../inject_enterprise_edition_module_spec.rb | 2 +- .../gitlab/tracking/standard_context_spec.rb | 4 +++ .../hll_redis_counter_spec.rb | 3 +- workhorse/internal/proxy/proxy.go | 20 +++++++++++-- workhorse/internal/upstream/upstream.go | 8 ++++- workhorse/internal/upstream/upstream_test.go | 17 +++++++++++ workhorse/proxy_test.go | 22 ++++++++++++-- 31 files changed, 135 insertions(+), 86 deletions(-) create mode 100644 config/feature_flags/development/track_geo_proxy_events.yml diff --git a/.dockerignore b/.dockerignore index d20c733313d..b2aef4d31cd 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,7 +5,7 @@ # Following are the files we need: # - ./config/initializers/0_inject_enterprise_edition_module.rb # - ./ee/app/models/license.rb -# - ./lib/gitlab.rb +# - ./lib/gitlab_edition.rb # - ./lib/gitlab/utils.rb # - ./qa/ # - ./INSTALLATION_TYPE diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 8c08aa82118..b0c1791443b 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -2ed3a40e02e3b5d284af33f14dbad2f5aff044d6 +2db02e932c25bb96b269a9ac7a93f5bf52869865 diff --git a/app/graphql/types/merge_request_type.rb b/app/graphql/types/merge_request_type.rb index 0672ec6f0f8..c2ee04463d8 100644 --- a/app/graphql/types/merge_request_type.rb +++ b/app/graphql/types/merge_request_type.rb @@ -258,7 +258,7 @@ module Types end def commits_without_merge_commits - object.recent_commits.without_merge_commits + object.commits.without_merge_commits end def security_auto_fix diff --git a/config/feature_flags/development/github_importer_use_diff_note_with_suggestions.yml b/config/feature_flags/development/github_importer_use_diff_note_with_suggestions.yml index c106d5131ff..c7f8d9f4943 100644 --- a/config/feature_flags/development/github_importer_use_diff_note_with_suggestions.yml +++ b/config/feature_flags/development/github_importer_use_diff_note_with_suggestions.yml @@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/344309 milestone: '14.5' type: development group: group::import -default_enabled: false +default_enabled: true diff --git a/config/feature_flags/development/track_geo_proxy_events.yml b/config/feature_flags/development/track_geo_proxy_events.yml new file mode 100644 index 00000000000..911c6b610c3 --- /dev/null +++ b/config/feature_flags/development/track_geo_proxy_events.yml @@ -0,0 +1,8 @@ +--- +name: track_geo_proxy_events +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/76587 +rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/348414 +milestone: '14.6' +type: development +group: group::geo +default_enabled: false diff --git a/config/initializers/0_inject_enterprise_edition_module.rb b/config/initializers/0_inject_enterprise_edition_module.rb index 41d1043af38..1951940a2a1 100644 --- a/config/initializers/0_inject_enterprise_edition_module.rb +++ b/config/initializers/0_inject_enterprise_edition_module.rb @@ -46,7 +46,7 @@ module InjectEnterpriseEditionModule end def each_extension_for(constant_name, namespace) - Gitlab.extensions.each do |extension_name| + GitlabEdition.extensions.each do |extension_name| extension_namespace = const_get_maybe_false(namespace, extension_name.upcase) diff --git a/doc/administration/monitoring/ip_whitelist.md b/doc/administration/monitoring/ip_whitelist.md index b6df176ea87..75b09f8a366 100644 --- a/doc/administration/monitoring/ip_whitelist.md +++ b/doc/administration/monitoring/ip_whitelist.md @@ -6,8 +6,6 @@ info: To determine the technical writer assigned to the Stage/Group associated w # IP whitelist **(FREE SELF)** -> Introduced in GitLab 9.4. - NOTE: We intend to [rename IP whitelist as `IP allowlist`](https://gitlab.com/groups/gitlab-org/-/epics/3478). diff --git a/doc/administration/monitoring/prometheus/gitlab_metrics.md b/doc/administration/monitoring/prometheus/gitlab_metrics.md index 4a504b07a1b..8f816c388cc 100644 --- a/doc/administration/monitoring/prometheus/gitlab_metrics.md +++ b/doc/administration/monitoring/prometheus/gitlab_metrics.md @@ -22,10 +22,8 @@ GitLab monitors its own internal service metrics, and makes them available at th `/-/metrics` endpoint. Unlike other [Prometheus](https://prometheus.io) exporters, to access the metrics, the client IP address must be [explicitly allowed](../ip_whitelist.md). -For [Omnibus GitLab](https://docs.gitlab.com/omnibus/) and Chart installations, -these metrics are enabled and collected as of -[GitLab 9.4](https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/1702). -For source installations, these metrics must be enabled +These metrics are enabled and collected for [Omnibus GitLab](https://docs.gitlab.com/omnibus/) +and Chart installations. For source installations, these metrics must be enabled manually and collected by a Prometheus server. For enabling and viewing metrics from Sidekiq nodes, see [Sidekiq metrics](#sidekiq-metrics). @@ -107,7 +105,7 @@ The following metrics are available: | `pipelines_created_total` | Counter | 9.4 | Counter of pipelines created | | | `rack_uncaught_errors_total` | Counter | 9.4 | Rack connections handling uncaught errors count | | | `user_session_logins_total` | Counter | 9.4 | Counter of how many users have logged in since GitLab was started or restarted | | -| `upload_file_does_not_exist` | Counter | 10.7 | Number of times an upload record could not find its file. Made available in all tiers in GitLab 11.5. | | +| `upload_file_does_not_exist` | Counter | 10.7 | Number of times an upload record could not find its file. | | | `failed_login_captcha_total` | Gauge | 11.0 | Counter of failed CAPTCHA attempts during login | | | `successful_login_captcha_total` | Gauge | 11.0 | Counter of successful CAPTCHA attempts during login | | | `auto_devops_pipelines_completed_total` | Counter | 12.7 | Counter of completed Auto DevOps pipelines, labeled by status | | diff --git a/doc/development/snowplow/schemas.md b/doc/development/snowplow/schemas.md index f66e0566a9c..890feabb43e 100644 --- a/doc/development/snowplow/schemas.md +++ b/doc/development/snowplow/schemas.md @@ -19,6 +19,7 @@ The [`StandardContext`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/g | `project_id` | **{dotted-circle}** | integer | | | `namespace_id` | **{dotted-circle}** | integer | | | `user_id` | **{dotted-circle}** | integer | User database record ID attribute. This file undergoes a pseudonymization process at the collector level. | +| `context_generated_at` | **{dotted-circle}** | string (date time format) | Timestamp indicating when context was generated. | | `environment` | **{check-circle}** | string (max 32 chars) | Name of the source environment, such as `production` or `staging` | | `source` | **{check-circle}** | string (max 32 chars) | Name of the source application, such as `gitlab-rails` or `gitlab-javascript` | | `plan` | **{dotted-circle}** | string (max 32 chars) | Name of the plan for the namespace, such as `free`, `premium`, or `ultimate`. Automatically picked from the `namespace`. | diff --git a/doc/user/admin_area/monitoring/health_check.md b/doc/user/admin_area/monitoring/health_check.md index 1d2d7be146c..bbba67ec60f 100644 --- a/doc/user/admin_area/monitoring/health_check.md +++ b/doc/user/admin_area/monitoring/health_check.md @@ -6,12 +6,6 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Health Check **(FREE SELF)** -> - Liveness and readiness probes were [introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/10416) in GitLab 9.1. -> - The `health_check` endpoint was [introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3888) in GitLab 8.8 and was -> deprecated in GitLab 9.1. -> - [Access token](#access-token-deprecated) has been deprecated in GitLab 9.4 -> in favor of [IP whitelist](#ip-whitelist). - GitLab provides liveness and readiness probes to indicate service health and reachability to required services. These probes report on the status of the database connection, Redis connection, and access to the file system. These @@ -137,29 +131,6 @@ On failure, the endpoint returns a `503` HTTP status code. This check is being exempt from Rack Attack. -## Access token (Deprecated) - -NOTE: -Access token has been deprecated in GitLab 9.4 in favor of [IP whitelist](#ip-whitelist). - -An access token needs to be provided while accessing the probe endpoints. You can -find the current accepted token in the user interface: - -1. On the top bar, select **Menu > Admin**. -1. On the left sidebar, select **Monitoring > Health Check**. (`admin/health_check`) - -![access token](img/health_check_token.png) - -The access token can be passed as a URL parameter: - -```plaintext -https://gitlab.example.com/-/readiness?token=ACCESS_TOKEN -``` - -NOTE: -In case the database or Redis service are inaccessible, the probe endpoints response is not guaranteed to be correct. -You should switch to [IP whitelist](#ip-whitelist) from deprecated access token to avoid it. -