From e566469060dfa8fdf91567cf4df400496018ed8f Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 28 Mar 2022 03:09:02 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- app/assets/stylesheets/framework/header.scss | 9 ++------- .../stylesheets/framework/variables.scss | 1 + .../stylesheets/startup/startup-dark.scss | 5 +---- app/assets/stylesheets/themes/_dark.scss | 2 -- .../themes/dark_mode_overrides.scss | 4 ++-- ..._change_search_rate_limit_default_values.rb | 8 ++++++++ ...22205008_change_search_rate_limit_values.rb | 18 ++++++++++++++++++ db/schema_migrations/20220322205004 | 1 + db/schema_migrations/20220322205008 | 1 + db/structure.sql | 4 ++-- doc/administration/job_artifacts.md | 10 +++++----- doc/api/project_access_tokens.md | 3 ++- 12 files changed, 43 insertions(+), 23 deletions(-) create mode 100644 db/migrate/20220322205004_change_search_rate_limit_default_values.rb create mode 100644 db/post_migrate/20220322205008_change_search_rate_limit_values.rb create mode 100644 db/schema_migrations/20220322205004 create mode 100644 db/schema_migrations/20220322205008 diff --git a/app/assets/stylesheets/framework/header.scss b/app/assets/stylesheets/framework/header.scss index 1004383cfd3..b4ee6afa9a3 100644 --- a/app/assets/stylesheets/framework/header.scss +++ b/app/assets/stylesheets/framework/header.scss @@ -1,5 +1,3 @@ -$top-nav-hover-bg: var(--indigo-900-alpha-008, $indigo-900-alpha-008) !important; - .navbar-gitlab { padding: 0 16px; z-index: $header-zindex; @@ -574,7 +572,7 @@ $top-nav-hover-bg: var(--indigo-900-alpha-008, $indigo-900-alpha-008) !important } .frequent-items-list-item-container > a:hover { - background-color: $top-nav-hover-bg; + background-color: $nav-active-bg; } } @@ -589,11 +587,9 @@ $top-nav-hover-bg: var(--indigo-900-alpha-008, $indigo-900-alpha-008) !important } .top-nav-menu-item { - color: var(--indigo-900, $theme-indigo-900) !important; - &.active, &:hover { - background-color: $top-nav-hover-bg; + background-color: $nav-active-bg; } .gl-icon { @@ -603,7 +599,6 @@ $top-nav-hover-bg: var(--indigo-900-alpha-008, $indigo-900-alpha-008) !important .top-nav-responsive { @include gl-display-none; - color: var(--indigo-900, $theme-indigo-900); } .top-nav-responsive-open { diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss index 31ef5ae0646..8e3b34e4eaf 100644 --- a/app/assets/stylesheets/framework/variables.scss +++ b/app/assets/stylesheets/framework/variables.scss @@ -363,6 +363,7 @@ $well-expand-item: #e8f2f7 !default; $well-inner-border: #eef0f2 !default; $well-light-border: #f1f1f1; $well-light-text-color: #5b6169; +$nav-active-bg: var(--nav-active-bg, rgba($black, 0.08)) !important; /* * Text diff --git a/app/assets/stylesheets/startup/startup-dark.scss b/app/assets/stylesheets/startup/startup-dark.scss index 00195f553dc..1b76f41a7be 100644 --- a/app/assets/stylesheets/startup/startup-dark.scss +++ b/app/assets/stylesheets/startup/startup-dark.scss @@ -9,7 +9,6 @@ body.gl-dark { --gray-900: #fafafa; --green-100: #0d532a; --green-700: #91d4a8; - --indigo-900-alpha-008: rgba(235, 235, 250, 0.08); --gl-text-color: #fafafa; --border-color: #4f4f4f; --black: #fff; @@ -1739,7 +1738,6 @@ body.gl-dark { --indigo-800: #d1d1f0; --indigo-900: #ebebfa; --indigo-950: #f7f7ff; - --indigo-900-alpha-008: rgba(235, 235, 250, 0.08); --purple-50: #232150; --purple-100: #2f2a6b; --purple-200: #453894; @@ -1769,7 +1767,7 @@ body.gl-dark { box-shadow: none; } .nav-sidebar li.active:not(.fly-out-top-item) > a:not(.has-sub-items) { - background-color: var(--indigo-900-alpha-008); + background-color: var(--nav-active-bg); } body.gl-dark { --gl-theme-accent: #868686; @@ -1972,7 +1970,6 @@ body.gl-dark { --indigo-800: #d1d1f0; --indigo-900: #ebebfa; --indigo-950: #f7f7ff; - --indigo-900-alpha-008: rgba(235, 235, 250, 0.08); --purple-50: #232150; --purple-100: #2f2a6b; --purple-200: #453894; diff --git a/app/assets/stylesheets/themes/_dark.scss b/app/assets/stylesheets/themes/_dark.scss index 3cb8c58a380..550e3981401 100644 --- a/app/assets/stylesheets/themes/_dark.scss +++ b/app/assets/stylesheets/themes/_dark.scss @@ -70,7 +70,6 @@ $indigo-700: #a6a6de; $indigo-800: #d1d1f0; $indigo-900: #ebebfa; $indigo-950: #f7f7ff; -$indigo-900-alpha-008: rgba($indigo-900, 0.08); $purple-50: #232150; $purple-100: #2f2a6b; @@ -174,7 +173,6 @@ body.gl-dark { --indigo-800: #{$indigo-800}; --indigo-900: #{$indigo-900}; --indigo-950: #{$indigo-950}; - --indigo-900-alpha-008: #{$indigo-900-alpha-008}; --purple-50: #{$purple-50}; --purple-100: #{$purple-100}; diff --git a/app/assets/stylesheets/themes/dark_mode_overrides.scss b/app/assets/stylesheets/themes/dark_mode_overrides.scss index bb9a9cf0497..83254fe1a52 100644 --- a/app/assets/stylesheets/themes/dark_mode_overrides.scss +++ b/app/assets/stylesheets/themes/dark_mode_overrides.scss @@ -48,7 +48,7 @@ } > a:hover { - background-color: var(--indigo-900-alpha-008); + background-color: var(--nav-active-bg); } &.active { @@ -56,7 +56,7 @@ &:not(.fly-out-top-item) { > a:not(.has-sub-items) { - background-color: var(--indigo-900-alpha-008); + background-color: var(--nav-active-bg); } } } diff --git a/db/migrate/20220322205004_change_search_rate_limit_default_values.rb b/db/migrate/20220322205004_change_search_rate_limit_default_values.rb new file mode 100644 index 00000000000..34ebdddb8eb --- /dev/null +++ b/db/migrate/20220322205004_change_search_rate_limit_default_values.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +class ChangeSearchRateLimitDefaultValues < Gitlab::Database::Migration[1.0] + def change + change_column_default :application_settings, :search_rate_limit, from: 30, to: 300 + change_column_default :application_settings, :search_rate_limit_unauthenticated, from: 10, to: 100 + end +end diff --git a/db/post_migrate/20220322205008_change_search_rate_limit_values.rb b/db/post_migrate/20220322205008_change_search_rate_limit_values.rb new file mode 100644 index 00000000000..ed4aad72ddf --- /dev/null +++ b/db/post_migrate/20220322205008_change_search_rate_limit_values.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class ChangeSearchRateLimitValues < Gitlab::Database::Migration[1.0] + def up + # Change search_rate_limits to a more reasonable value + # as long as they are still using the default values. + # + # The reason why `search_rate_limit` could be either 30 or 60 + # is because its value was ported over from the now deprecated + # `user_email_lookup_limit` which had a default value of 60. + execute("update application_settings set search_rate_limit=300 where search_rate_limit IN (30,60)") + execute("update application_settings set search_rate_limit_unauthenticated=100 where search_rate_limit_unauthenticated = 10") + end + + def down + # noop. Because this migration is updating values, it is not reversible. + end +end diff --git a/db/schema_migrations/20220322205004 b/db/schema_migrations/20220322205004 new file mode 100644 index 00000000000..3a5e26a69ce --- /dev/null +++ b/db/schema_migrations/20220322205004 @@ -0,0 +1 @@ +af69da66a3deb250494204fecf4bc91b4fd10f529ab766746ae98072f54bf245 \ No newline at end of file diff --git a/db/schema_migrations/20220322205008 b/db/schema_migrations/20220322205008 new file mode 100644 index 00000000000..bbd0003fbf3 --- /dev/null +++ b/db/schema_migrations/20220322205008 @@ -0,0 +1 @@ +465de916b1c951287a101da37156fb0f59a4bd1cb4ab7076dc48e07e326fa4e4 \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 1897e794b9d..e0dcba3107a 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -11251,8 +11251,8 @@ CREATE TABLE application_settings ( users_get_by_id_limit integer DEFAULT 300 NOT NULL, users_get_by_id_limit_allowlist text[] DEFAULT '{}'::text[] NOT NULL, container_registry_expiration_policies_caching boolean DEFAULT true NOT NULL, - search_rate_limit integer DEFAULT 30 NOT NULL, - search_rate_limit_unauthenticated integer DEFAULT 10 NOT NULL, + search_rate_limit integer DEFAULT 300 NOT NULL, + search_rate_limit_unauthenticated integer DEFAULT 100 NOT NULL, encrypted_database_grafana_api_key bytea, encrypted_database_grafana_api_key_iv bytea, database_grafana_api_url text, diff --git a/doc/administration/job_artifacts.md b/doc/administration/job_artifacts.md index 92f76136d4a..08956c0caa7 100644 --- a/doc/administration/job_artifacts.md +++ b/doc/administration/job_artifacts.md @@ -307,19 +307,19 @@ To migrate back to local storage: ## Expiring artifacts -> [In GitLab 14.6](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/76504), we improved the performance of removing expired artifacts, introduced [with a flag](feature_flags.md) named `ci_destroy_all_expired_service`. Disabled by default. +> - [In GitLab 14.6](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/76504), we improved the performance of removing expired artifacts. However, due to a bug with potential data loss, we paused removal of expired artifacts. Removal of expired artifacts was put behind a [feature flag](feature_flags.md) named `ci_destroy_all_expired_service`. Disabled by default. +> - In GitLab 14.8 and later, the bug is fixed and we have resumed the removal of expired artifacts. We are preparing backports for GitLab 14.6 and 14.7. FLAG: -On self-managed GitLab, by default this feature is not available. To make it available, ask an administrator to +On self-managed GitLab 14.6 and 14.7, this feature is not available. To make it available, ask an administrator to [enable the feature flag](feature_flags.md) named `ci_destroy_all_expired_service`. The feature is not ready for production use. -On GitLab.com, this feature is not available. -### Removing expired job artifacts on GitLab self-managed instances +### Removing expired job artifacts on GitLab 14.6 and 14.7 self-managed instances In the process of migrating old artifacts for our SaaS customers, we are working to resolve any potential unrecoverable data loss for self-managed customers for artifacts that they may not want deleted yet. Before we can use the more performant way of cleaning up expired artifacts, we need to do some remediation to make sure customers don't lose their data, which is part of our effort in [the relevant epic](https://gitlab.com/groups/gitlab-org/-/epics/7097). -Two options are available: +Two options are available for GitLab 14.6 and GitLab 14.7 self-managed instances: - If you don't need any artifacts created before 2020-06-23, an Administrator can enable the worker for removing expired CI/CD artifacts: diff --git a/doc/api/project_access_tokens.md b/doc/api/project_access_tokens.md index cee0dd523c0..b13005ec436 100644 --- a/doc/api/project_access_tokens.md +++ b/doc/api/project_access_tokens.md @@ -82,7 +82,8 @@ curl --header "PRIVATE-TOKEN: " "https://gitlab.example.com/a ## Create a project access token -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55408) in GitLab 13.10. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55408) in GitLab 13.10. +> - The `token` attribute was [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55408) in GitLab 13.10. Create a [project access token](../user/project/settings/project_access_tokens.md).