diff --git a/DUO_WORKFLOW_EXECUTOR_VERSION b/DUO_WORKFLOW_EXECUTOR_VERSION index e4a35e8bc5d..12a74d75439 100644 --- a/DUO_WORKFLOW_EXECUTOR_VERSION +++ b/DUO_WORKFLOW_EXECUTOR_VERSION @@ -1 +1 @@ -0.0.38 +0.0.39 diff --git a/Gemfile b/Gemfile index 2e3d0f9d1a8..0fea84bd12b 100644 --- a/Gemfile +++ b/Gemfile @@ -514,7 +514,7 @@ group :development, :test do gem 'awesome_print', require: false, feature_category: :shared gem 'database_cleaner-active_record', '~> 2.2.0', feature_category: :database - gem 'rspec-rails', '~> 7.0.0', feature_category: :shared + gem 'rspec-rails', '~> 7.1.0', feature_category: :shared gem 'factory_bot_rails', '~> 6.4.3', feature_category: :tooling # Prevent occasions where minitest is not bundled in packaged versions of ruby (see #3826) diff --git a/Gemfile.checksum b/Gemfile.checksum index b19f78ad5d8..d71fd0dc7bf 100644 --- a/Gemfile.checksum +++ b/Gemfile.checksum @@ -629,7 +629,7 @@ {"name":"rspec-parameterized","version":"1.0.2","platform":"ruby","checksum":"b456dec0091924175ac13963e173cdbaa2ab3e1581a405a948addc34e3f3f4c2"}, {"name":"rspec-parameterized-core","version":"1.0.0","platform":"ruby","checksum":"287b494985e79821160af63aba4f91db8dbfa9a21cb200db34ba38f40e16ccc1"}, {"name":"rspec-parameterized-table_syntax","version":"1.0.0","platform":"ruby","checksum":"d7df951eff9c5dd367ca7d5f9ae4853bb7ab7941f9d5b35bba361d112704988c"}, -{"name":"rspec-rails","version":"7.0.1","platform":"ruby","checksum":"ad2b2cb6dabca072260e21b188059645bac10659466c02a674f9ad5fd97b92f9"}, +{"name":"rspec-rails","version":"7.1.1","platform":"ruby","checksum":"e15dccabed211e2fd92f21330c819adcbeb1591c1d66c580d8f2d8288557e331"}, {"name":"rspec-retry","version":"0.6.2","platform":"ruby","checksum":"6101ba23a38809811ae3484acde4ab481c54d846ac66d5037ccb40131a60d858"}, {"name":"rspec-support","version":"3.13.1","platform":"ruby","checksum":"48877d4f15b772b7538f3693c22225f2eda490ba65a0515c4e7cf6f2f17de70f"}, {"name":"rspec_junit_formatter","version":"0.6.0","platform":"ruby","checksum":"40dde674e6ae4e6cc0ff560da25497677e34fefd2338cc467a8972f602b62b15"}, diff --git a/Gemfile.lock b/Gemfile.lock index 794c8d7e8b3..33927eb28ce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1688,7 +1688,7 @@ GEM rspec-parameterized-table_syntax (1.0.0) binding_of_caller rspec-parameterized-core (< 2) - rspec-rails (7.0.1) + rspec-rails (7.1.1) actionpack (>= 7.0) activesupport (>= 7.0) railties (>= 7.0) @@ -2353,7 +2353,7 @@ DEPENDENCIES rqrcode (~> 2.2) rspec-benchmark (~> 0.6.0) rspec-parameterized (~> 1.0, >= 1.0.2) - rspec-rails (~> 7.0.0) + rspec-rails (~> 7.1.0) rspec-retry (~> 0.6.2) rspec_junit_formatter rspec_profiling (~> 0.0.9) diff --git a/Gemfile.next.checksum b/Gemfile.next.checksum index 571fc4652ab..bb2aec07a75 100644 --- a/Gemfile.next.checksum +++ b/Gemfile.next.checksum @@ -629,7 +629,7 @@ {"name":"rspec-parameterized","version":"1.0.2","platform":"ruby","checksum":"b456dec0091924175ac13963e173cdbaa2ab3e1581a405a948addc34e3f3f4c2"}, {"name":"rspec-parameterized-core","version":"1.0.0","platform":"ruby","checksum":"287b494985e79821160af63aba4f91db8dbfa9a21cb200db34ba38f40e16ccc1"}, {"name":"rspec-parameterized-table_syntax","version":"1.0.0","platform":"ruby","checksum":"d7df951eff9c5dd367ca7d5f9ae4853bb7ab7941f9d5b35bba361d112704988c"}, -{"name":"rspec-rails","version":"7.0.1","platform":"ruby","checksum":"ad2b2cb6dabca072260e21b188059645bac10659466c02a674f9ad5fd97b92f9"}, +{"name":"rspec-rails","version":"7.1.1","platform":"ruby","checksum":"e15dccabed211e2fd92f21330c819adcbeb1591c1d66c580d8f2d8288557e331"}, {"name":"rspec-retry","version":"0.6.2","platform":"ruby","checksum":"6101ba23a38809811ae3484acde4ab481c54d846ac66d5037ccb40131a60d858"}, {"name":"rspec-support","version":"3.13.1","platform":"ruby","checksum":"48877d4f15b772b7538f3693c22225f2eda490ba65a0515c4e7cf6f2f17de70f"}, {"name":"rspec_junit_formatter","version":"0.6.0","platform":"ruby","checksum":"40dde674e6ae4e6cc0ff560da25497677e34fefd2338cc467a8972f602b62b15"}, diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 3a3b1a2c6de..536575e8c34 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -1682,7 +1682,7 @@ GEM rspec-parameterized-table_syntax (1.0.0) binding_of_caller rspec-parameterized-core (< 2) - rspec-rails (7.0.1) + rspec-rails (7.1.1) actionpack (>= 7.0) activesupport (>= 7.0) railties (>= 7.0) @@ -2348,7 +2348,7 @@ DEPENDENCIES rqrcode (~> 2.2) rspec-benchmark (~> 0.6.0) rspec-parameterized (~> 1.0, >= 1.0.2) - rspec-rails (~> 7.0.0) + rspec-rails (~> 7.1.0) rspec-retry (~> 0.6.2) rspec_junit_formatter rspec_profiling (~> 0.0.9) diff --git a/db/database_connections/ci.yaml b/db/database_connections/ci.yaml index 2c2136f413a..a65ef24effd 100644 --- a/db/database_connections/ci.yaml +++ b/db/database_connections/ci.yaml @@ -8,7 +8,7 @@ gitlab_schemas: lock_gitlab_schemas: - gitlab_main - gitlab_main_clusterwide - - gitlab_main_clusterwide_setting + - gitlab_main_cell_setting - gitlab_main_user - gitlab_main_cell - gitlab_main_cell_local diff --git a/db/database_connections/main.yaml b/db/database_connections/main.yaml index 71a17ba8932..a12f58a3ef0 100644 --- a/db/database_connections/main.yaml +++ b/db/database_connections/main.yaml @@ -8,7 +8,7 @@ gitlab_schemas: - gitlab_main_cell_local - gitlab_pm - gitlab_main_clusterwide - - gitlab_main_clusterwide_setting + - gitlab_main_cell_setting - gitlab_main_user lock_gitlab_schemas: - gitlab_ci diff --git a/db/database_connections/sec.yaml b/db/database_connections/sec.yaml index 5c6054e8164..28e848ca619 100644 --- a/db/database_connections/sec.yaml +++ b/db/database_connections/sec.yaml @@ -7,7 +7,7 @@ gitlab_schemas: lock_gitlab_schemas: - gitlab_main - gitlab_main_clusterwide - - gitlab_main_clusterwide_setting + - gitlab_main_cell_setting - gitlab_main_user - gitlab_main_cell - gitlab_main_cell_local diff --git a/db/docs/ai_settings.yml b/db/docs/ai_settings.yml index b634d455bf2..ed0585cdd5f 100644 --- a/db/docs/ai_settings.yml +++ b/db/docs/ai_settings.yml @@ -7,5 +7,5 @@ feature_categories: description: Stores instance-wide AI-related settings introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/172007 milestone: '17.6' -gitlab_schema: gitlab_main_clusterwide_setting +gitlab_schema: gitlab_main_cell_setting table_size: small diff --git a/db/docs/appearance_uploads.yml b/db/docs/appearance_uploads.yml index 4310e3cbaa1..4a8e488867d 100644 --- a/db/docs/appearance_uploads.yml +++ b/db/docs/appearance_uploads.yml @@ -9,4 +9,4 @@ description: Stores uploads for Appearance model introduced_by_url: milestone: '17.11' table_size: small -gitlab_schema: gitlab_main_clusterwide_setting +gitlab_schema: gitlab_main_cell_setting diff --git a/db/docs/appearances.yml b/db/docs/appearances.yml index 6b1a4dc8367..083a940955e 100644 --- a/db/docs/appearances.yml +++ b/db/docs/appearances.yml @@ -7,5 +7,5 @@ feature_categories: description: TODO introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/40104eead753e7e8ea77951a74a3941546c35aab milestone: '6.8' -gitlab_schema: gitlab_main_clusterwide_setting +gitlab_schema: gitlab_main_cell_setting table_size: small diff --git a/db/docs/application_setting_terms.yml b/db/docs/application_setting_terms.yml index 24f92f3a362..128fe298128 100644 --- a/db/docs/application_setting_terms.yml +++ b/db/docs/application_setting_terms.yml @@ -7,5 +7,5 @@ feature_categories: description: TODO introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/cf37bef287d7dd5d2dce3e2276489767b8c0671f milestone: '10.8' -gitlab_schema: gitlab_main_clusterwide_setting +gitlab_schema: gitlab_main_cell_setting table_size: small diff --git a/db/docs/application_settings.yml b/db/docs/application_settings.yml index 92708c129b9..0404c956f68 100644 --- a/db/docs/application_settings.yml +++ b/db/docs/application_settings.yml @@ -11,5 +11,5 @@ feature_categories: description: GitLab application settings introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/8589b4e137f50293952923bb07e2814257d7784d milestone: '7.7' -gitlab_schema: gitlab_main_clusterwide_setting +gitlab_schema: gitlab_main_cell_setting table_size: small diff --git a/db/docs/broadcast_messages.yml b/db/docs/broadcast_messages.yml index 99c5f10f11e..cb56425f496 100644 --- a/db/docs/broadcast_messages.yml +++ b/db/docs/broadcast_messages.yml @@ -7,5 +7,5 @@ feature_categories: description: GitLab can display broadcast messages to users of a GitLab instance introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/f1ecf53c1e55fbbc66cb2d7d12fb411cbfc2ace8 milestone: '6.3' -gitlab_schema: gitlab_main_clusterwide_setting +gitlab_schema: gitlab_main_cell_setting table_size: small diff --git a/db/docs/cloud_connector_access.yml b/db/docs/cloud_connector_access.yml index b0c92af8c3f..bfa924fc1b9 100644 --- a/db/docs/cloud_connector_access.yml +++ b/db/docs/cloud_connector_access.yml @@ -7,5 +7,5 @@ feature_categories: description: Information about Cloud Connector features introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/140456 milestone: '16.8' -gitlab_schema: gitlab_main_clusterwide_setting +gitlab_schema: gitlab_main_cell_setting table_size: small diff --git a/db/docs/licenses.yml b/db/docs/licenses.yml index 47d32e1f7c8..b3174a037cf 100644 --- a/db/docs/licenses.yml +++ b/db/docs/licenses.yml @@ -7,5 +7,5 @@ feature_categories: description: Used to store information related to the instance's license introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/d1f2b09fadcfba210c5121bd214b910b9f9809fd milestone: '7.11' -gitlab_schema: gitlab_main_clusterwide_setting +gitlab_schema: gitlab_main_cell_setting table_size: small diff --git a/db/docs/plan_limits.yml b/db/docs/plan_limits.yml index bc33e532cc6..38f87694ddf 100644 --- a/db/docs/plan_limits.yml +++ b/db/docs/plan_limits.yml @@ -7,5 +7,5 @@ feature_categories: description: Contains Plan specific limits (CI minute quantities for example) introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/19438 milestone: '12.5' -gitlab_schema: gitlab_main_clusterwide_setting +gitlab_schema: gitlab_main_cell_setting table_size: small diff --git a/db/docs/security_policy_settings.yml b/db/docs/security_policy_settings.yml index 7db099dc56a..1f96451ba4b 100644 --- a/db/docs/security_policy_settings.yml +++ b/db/docs/security_policy_settings.yml @@ -7,5 +7,5 @@ feature_categories: description: Stores instance-wide security policies related settings introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/191298 milestone: '18.1' -gitlab_schema: gitlab_main_clusterwide_setting +gitlab_schema: gitlab_main_cell_setting table_size: small diff --git a/db/docs/service_access_tokens.yml b/db/docs/service_access_tokens.yml index 552b196ca98..ca779b8eef9 100644 --- a/db/docs/service_access_tokens.yml +++ b/db/docs/service_access_tokens.yml @@ -8,5 +8,5 @@ description: Persists JWT tokens for AI features (e.g. Code Suggestions) to auth the GitLab instance introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125383 milestone: '16.2' -gitlab_schema: gitlab_main_clusterwide_setting +gitlab_schema: gitlab_main_cell_setting table_size: small diff --git a/db/docs/targeted_messages.yml b/db/docs/targeted_messages.yml index 78d5fcbd924..85536274f9a 100644 --- a/db/docs/targeted_messages.yml +++ b/db/docs/targeted_messages.yml @@ -7,5 +7,5 @@ feature_categories: description: In-app messages targeted at specific namespaces introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/179303 milestone: '17.10' -gitlab_schema: gitlab_main_clusterwide_setting +gitlab_schema: gitlab_main_cell_setting table_size: small diff --git a/db/gitlab_schemas/gitlab_main_clusterwide_setting.yaml b/db/gitlab_schemas/gitlab_main_clusterwide_setting.yaml index 3df133112b6..7431b18c82f 100644 --- a/db/gitlab_schemas/gitlab_main_clusterwide_setting.yaml +++ b/db/gitlab_schemas/gitlab_main_clusterwide_setting.yaml @@ -1,5 +1,5 @@ -name: gitlab_main_clusterwide_setting -description: Schema for all Cluster setting tables, ex. application_settings, etc. +name: gitlab_main_cell_setting +description: Schema for all cell setting tables, ex. application_settings, etc. allow_cross_joins: - gitlab_shared - gitlab_main diff --git a/db/gitlab_schemas/gitlab_main_user.yaml b/db/gitlab_schemas/gitlab_main_user.yaml index 5bfe4ab636a..d8a682a10ec 100644 --- a/db/gitlab_schemas/gitlab_main_user.yaml +++ b/db/gitlab_schemas/gitlab_main_user.yaml @@ -16,7 +16,7 @@ allow_cross_transactions: - gitlab_main_cell - gitlab_main_cell_local - gitlab_main_clusterwide - - gitlab_main_clusterwide_setting + - gitlab_main_cell_setting allow_cross_foreign_keys: - gitlab_main - gitlab_main_cell diff --git a/db/migrate/20250501083748_set_api_rate_limits_to_zero.rb b/db/migrate/20250501083748_set_api_rate_limits_to_zero.rb index 20f88b47fb6..39966ba98db 100644 --- a/db/migrate/20250501083748_set_api_rate_limits_to_zero.rb +++ b/db/migrate/20250501083748_set_api_rate_limits_to_zero.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class SetApiRateLimitsToZero < Gitlab::Database::Migration[2.3] - restrict_gitlab_migration gitlab_schema: :gitlab_main_clusterwide_setting + restrict_gitlab_migration gitlab_schema: :gitlab_main_cell_setting milestone '18.0' diff --git a/db/migrate/20250519112444_set_zoekt_lost_node_threshold.rb b/db/migrate/20250519112444_set_zoekt_lost_node_threshold.rb index 10e742ebe4e..085828148c4 100644 --- a/db/migrate/20250519112444_set_zoekt_lost_node_threshold.rb +++ b/db/migrate/20250519112444_set_zoekt_lost_node_threshold.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class SetZoektLostNodeThreshold < Gitlab::Database::Migration[2.3] - restrict_gitlab_migration gitlab_schema: :gitlab_main_clusterwide_setting + restrict_gitlab_migration gitlab_schema: :gitlab_main_cell_setting milestone '18.1' diff --git a/db/migrate/20250603015001_drop_index_on_external_name_for_compliance_controls.rb b/db/migrate/20250603015001_drop_index_on_external_name_for_compliance_controls.rb new file mode 100644 index 00000000000..b7ba8c0a27a --- /dev/null +++ b/db/migrate/20250603015001_drop_index_on_external_name_for_compliance_controls.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +class DropIndexOnExternalNameForComplianceControls < Gitlab::Database::Migration[2.3] + disable_ddl_transaction! + milestone '18.1' + + TABLE_NAME = :compliance_requirements_controls + INDEX_NAME = :i_unique_external_control_name_per_requirement + NEW_INDEX_NAME = :i_uniq_external_control_name_per_requirement + + def up + add_concurrent_index TABLE_NAME, + [:compliance_requirement_id, :external_control_name], + unique: true, + where: "external_control_name IS NOT NULL AND external_control_name != ''", + name: NEW_INDEX_NAME + + remove_concurrent_index_by_name TABLE_NAME, name: INDEX_NAME + end + + def down + add_concurrent_index TABLE_NAME, + [:compliance_requirement_id, :external_control_name], + unique: true, + where: "external_control_name IS NOT NULL", + name: INDEX_NAME + + remove_concurrent_index_by_name TABLE_NAME, name: NEW_INDEX_NAME + end +end diff --git a/db/post_migrate/20250528234834_drop_workspaces_actual_state_updated_at_default.rb b/db/post_migrate/20250528234834_drop_workspaces_actual_state_updated_at_default.rb new file mode 100644 index 00000000000..c6e221dbc91 --- /dev/null +++ b/db/post_migrate/20250528234834_drop_workspaces_actual_state_updated_at_default.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class DropWorkspacesActualStateUpdatedAtDefault < Gitlab::Database::Migration[2.3] + milestone '18.1' + + def change + change_column_default :workspaces, :actual_state_updated_at, from: '1970-01-01', to: nil + end +end diff --git a/db/post_migrate/20250605122235_populate_default_value_for_personal_access_tokens_prefix.rb b/db/post_migrate/20250605122235_populate_default_value_for_personal_access_tokens_prefix.rb index 205b011361d..fffcf12423a 100644 --- a/db/post_migrate/20250605122235_populate_default_value_for_personal_access_tokens_prefix.rb +++ b/db/post_migrate/20250605122235_populate_default_value_for_personal_access_tokens_prefix.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class PopulateDefaultValueForPersonalAccessTokensPrefix < Gitlab::Database::Migration[2.3] - restrict_gitlab_migration gitlab_schema: :gitlab_main_clusterwide_setting + restrict_gitlab_migration gitlab_schema: :gitlab_main_cell_setting milestone '18.1' def up diff --git a/db/schema_migrations/20250528234834 b/db/schema_migrations/20250528234834 new file mode 100644 index 00000000000..e9eda46d6ae --- /dev/null +++ b/db/schema_migrations/20250528234834 @@ -0,0 +1 @@ +164e1321d00ffdde7517c43b945c1da62183040ee3cb91675c2c1b9b3308e778 \ No newline at end of file diff --git a/db/schema_migrations/20250603015001 b/db/schema_migrations/20250603015001 new file mode 100644 index 00000000000..425ff488074 --- /dev/null +++ b/db/schema_migrations/20250603015001 @@ -0,0 +1 @@ +3a0167beb437c5918d787f5abe6309b47f921485ebc70dcdb79593e8a1e44cc4 \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 0dcd270ee7d..e7429f902ee 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -26168,7 +26168,7 @@ CREATE TABLE workspaces ( workspaces_agent_config_version integer NOT NULL, desired_config_generator_version integer, project_ref text, - actual_state_updated_at timestamp with time zone DEFAULT '1970-01-01 00:00:00+00'::timestamp with time zone NOT NULL, + actual_state_updated_at timestamp with time zone NOT NULL, CONSTRAINT check_15543fb0fa CHECK ((char_length(name) <= 64)), CONSTRAINT check_157d5f955c CHECK ((char_length(namespace) <= 64)), CONSTRAINT check_2b401b0034 CHECK ((char_length(deployment_resource_version) <= 64)), @@ -33328,7 +33328,7 @@ CREATE UNIQUE INDEX i_sbom_occurrences_vulnerabilities_on_occ_id_and_vuln_id ON CREATE INDEX i_software_license_policies_on_custom_software_license_id ON software_license_policies USING btree (custom_software_license_id); -CREATE UNIQUE INDEX i_unique_external_control_name_per_requirement ON compliance_requirements_controls USING btree (compliance_requirement_id, external_control_name) WHERE (external_control_name IS NOT NULL); +CREATE UNIQUE INDEX i_uniq_external_control_name_per_requirement ON compliance_requirements_controls USING btree (compliance_requirement_id, external_control_name) WHERE ((external_control_name IS NOT NULL) AND (external_control_name <> ''::text)); CREATE INDEX i_vuln_occurrences_on_proj_report_loc_dep_pkg_ver_file_img ON vulnerability_occurrences USING btree (project_id, report_type, ((((location -> 'dependency'::text) -> 'package'::text) ->> 'name'::text)), (((location -> 'dependency'::text) ->> 'version'::text)), COALESCE((location ->> 'file'::text), (location ->> 'image'::text))) WHERE (report_type = ANY (ARRAY[2, 1])); diff --git a/doc/ci/inputs/examples.md b/doc/ci/inputs/examples.md index 80b41bf47b5..2564ddd86e9 100644 --- a/doc/ci/inputs/examples.md +++ b/doc/ci/inputs/examples.md @@ -228,3 +228,27 @@ include: In this example, the `.gitlab/ci/development.gitlab-ci.yml` file is included by default. But if a different `pipeline-type` input option is used, a different configuration file is included. + +### Use CI/CD inputs in variable expressions + +You can use [CI/CD inputs](_index.md) to customize variable expressions. +For example: + +```yaml +example-job: + script: echo "Testing" + rules: + - if: '"$[[ inputs.some_example ]]" == "test-branch"' +``` + +The expression is evaluated in two steps: + +1. Input interpolation: Before the pipeline is created, inputs are replaced with the input value. + In this example, the `$[[ inputs.some_example ]]` input is replaced with the [set value](_index.md#set-input-values). + For example, if the value is: + + - `test-branch`, the expression becomes `if: '"test-branch" == "test-branch"'`. + - `$CI_COMMIT_BRANCH`, the expression becomes `if: '"$CI_COMMIT_BRANCH" == "test-branch"'`. + +1. Expression evaluation: After the inputs are interpolated, GitLab attempts to create the pipeline. + During pipeline creation, the expressions are evaluated to determine which jobs to add to the pipeline. diff --git a/doc/ci/jobs/job_rules.md b/doc/ci/jobs/job_rules.md index 6e691769911..3dc0257878a 100644 --- a/doc/ci/jobs/job_rules.md +++ b/doc/ci/jobs/job_rules.md @@ -411,6 +411,8 @@ the expression. For example: - `if: $VARIABLE` +You can also [use CI/CD inputs in variable expressions](../inputs/examples.md#use-cicd-inputs-in-variable-expressions). + ### Compare a variable to a regular expression You can do regular expression matching on variable values with the `=~` and `!~` operators. diff --git a/doc/development/cells/_index.md b/doc/development/cells/_index.md index 3e460c7b2a1..72fbe753e6f 100644 --- a/doc/development/cells/_index.md +++ b/doc/development/cells/_index.md @@ -14,7 +14,7 @@ Below are available schemas related to Cells and Organizations: | Schema | Description | | ------ | ----------- | | `gitlab_main_cell`| Use for all tables in the `main:` database that are for an Organization. For example, `projects` and `groups` | -| `gitlab_main_clusterwide_setting` | All tables in the `main:` database related to Cluster settings. For example, `application_settings`. | +| `gitlab_main_cell_setting` | All tables in the `main:` database related to cell settings. For example, `application_settings`. | | `gitlab_main_clusterwide` (deprecated) | All tables in the `main:` database where all rows, or a subset of rows needs to be present across the cluster, in the [Cells](https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/cells/) architecture. For example, `plans`. For the [Cells 1.0 architecture](https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/cells/iterations/cells-1.0/), there are no real clusterwide tables as each cell will have its own database. In effect, these tables will still be stored locally in each cell. | | `gitlab_main_cell_local` | For tables in the `main:` database that are related to features that is distinct for each cell. For example, `zoekt_nodes`, or `shards`. These cell-local tables should not have any foreign key references from/to organization tables. | | `gitlab_ci` | Use for all tables in the `ci:` database that are for an Organization. For example, `ci_pipelines` and `ci_builds` | diff --git a/doc/development/database/multiple_databases.md b/doc/development/database/multiple_databases.md index f916fc639e8..82284742640 100644 --- a/doc/development/database/multiple_databases.md +++ b/doc/development/database/multiple_databases.md @@ -29,7 +29,7 @@ Each table of GitLab needs to have a `gitlab_schema` assigned: | -------- | ----------- | ------- | | `gitlab_main`| All tables that are being stored in the `main:` database. | Currently, this is being replaced with `gitlab_main_cell`, for the purpose of building the [Cells](https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/cells/) architecture. | | `gitlab_main_cell` | See [Cells / Organizations schemas](../cells/_index.md#available-cells--organization-schemas) | | -| `gitlab_main_clusterwide_setting` | See [Cells / Organizations schemas](../cells/_index.md#available-cells--organization-schemas) | | +| `gitlab_main_cell_setting` | See [Cells / Organizations schemas](../cells/_index.md#available-cells--organization-schemas) | | | `gitlab_main_clusterwide` | See [Cells / Organizations schemas](../cells/_index.md#available-cells--organization-schemas) | | | `gitlab_main_cell_local` | See [Cells / Organizations schemas](../cells/_index.md#available-cells--organization-schemas) | | | `gitlab_ci` | All CI tables that are being stored in the `ci:` database (for example, `ci_pipelines`, `ci_builds`) | | diff --git a/doc/operations/observability.md b/doc/operations/observability.md index 0c11c15d978..c32ac16b831 100644 --- a/doc/operations/observability.md +++ b/doc/operations/observability.md @@ -35,7 +35,9 @@ Use GitLab Observability (O11y) to: - View distributed traces, logs, and metrics in a single platform. - Identify and troubleshoot performance bottlenecks in your applications. -Support for improvements is proposed in [issue 8](https://gitlab.com/experimental-observability/gitlab_o11y/-/issues/8). +{{< alert type="disclaimer" />}} + +By adding observability to GitLab itself users can gain [these (planned) features](https://gitlab.com/gitlab-org/embody-team/experimental-observability/gitlab_o11y/-/issues/8). ## Set up a GitLab Observability instance @@ -120,7 +122,7 @@ docker info | grep "Docker Root Dir" ```shell cd /mnt/data -git clone -b main https://gitlab.com/experimental-observability/gitlab_o11y.git +git clone -b main https://gitlab.com/gitlab-org/embody-team/experimental-observability/gitlab_o11y.git cd gitlab_o11y/deploy/docker docker-compose up -d ``` @@ -189,10 +191,32 @@ docker run --detach \ --publish 443:443 --publish 80:80 --publish 22:22 \ --name gitlab \ --restart always \ - --env O11Y_URL="http://[your-o11y-instance-ip]:8080" \ gitlab/gitlab-ce:latest ``` +The `O11Y_URL` environment variable must be configured in the GitLab configuration file: + +1. Access the container: + + ```shell + docker exec -it gitlab /bin/bash + ``` + +1. Edit `/etc/gitlab/gitlab.rb`: + + ```ruby + gitlab_rails['env'] = { + 'O11Y_URL' => 'http://[your-o11y-instance-ip]:8080' + } + ``` + +1. Reconfigure GitLab: + + ```shell + gitlab-ctl reconfigure + gitlab-ctl restart + ``` + {{< /tab >}} {{< /tabs >}} @@ -204,23 +228,23 @@ The Observability feature is behind a feature flag. To enable it: 1. Access the Rails console: {{< tabs >}} - + {{< tab title="Linux package (Omnibus)" >}} - + ```shell sudo gitlab-rails console ``` - + {{< /tab >}} - + {{< tab title="Docker" >}} - + ```shell docker exec -it gitlab gitlab-rails console ``` - + {{< /tab >}} - + {{< /tabs >}} 1. Enable the feature flag for your group: diff --git a/doc/user/compliance/compliance_frameworks/_index.md b/doc/user/compliance/compliance_frameworks/_index.md index 4ba51d7c540..896510d62df 100644 --- a/doc/user/compliance/compliance_frameworks/_index.md +++ b/doc/user/compliance/compliance_frameworks/_index.md @@ -179,6 +179,7 @@ If the import is successful, the new compliance framework appears in the list. A {{< history >}} - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/186525) in GitLab 17.11 [with a flag](../../../administration/feature_flags.md) named `enable_standards_adherence_dashboard_v2`. Enabled by default. +- External control name [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/192177) in GitLab 18.1. {{< /history >}} @@ -289,7 +290,7 @@ To add an external control when creating or editing a framework: 1. Select **New framework** or edit an existing one. 1. In the **Requirements** section, select **New requirement**. 1. Select **Add an external control**. -1. In the fields edit **External URL** and **`HMAC` shared secret**. +1. In the fields edit **External Control Name**, **External URL** and **`HMAC` shared secret**. 1. Select **Save changes to the framework** to save the requirement. #### External control lifecycle diff --git a/doc/user/profile/notifications.md b/doc/user/profile/notifications.md index 730061213dc..4f52da57961 100644 --- a/doc/user/profile/notifications.md +++ b/doc/user/profile/notifications.md @@ -51,22 +51,42 @@ You might receive notifications for one of the following reasons: > - [A comment is edited to include a user mention](../discussions/_index.md#edit-a-comment-to-add-a-mention). > - An administrator has blocked notifications. -## Edit notification settings +## Global notification settings -Getting many notifications can be overwhelming. You can tune the notifications you receive. +Your global notification settings are the default settings, unless you specify +different settings for a project or a group. For example, you might want to be notified about all activity in a specific project. For other projects, you only want to be notified when you are mentioned by name. These notification settings apply only to you. They do not affect the notifications received by anyone else. +### Edit notification settings + To edit your notification settings: 1. On the left sidebar, select your avatar. 1. Select **Preferences**. 1. On the left sidebar, select **Notifications**. -1. Edit the desired global, group, or project notification settings. - Edited settings are automatically saved. +1. In **Global notification email**, enter the email address your notifications are sent to. + Defaults to your primary email address. +1. For **Global notification level**, select the default [notification level](#notification-levels) + to apply to your notifications. +1. Select the **Receive notifications about your own activity** checkbox to receive + notifications about your own activity. Not selected by default. + +### Notification levels + +For each project and group you can select one of the following levels: + +| Level | Description | +| ----------- | ----------- | +| Global | Your default global settings apply. | +| Watch | Receive notifications for [most activity](#events-not-included-in-the-watch-level). | +| Participate | Receive notifications for threads you have participated in. | +| On mention | Receive notifications when you are [mentioned](../discussions/_index.md#mentions) in a comment. | +| Disabled | Receive no notifications. | +| Custom | Receive notifications for selected events and threads you have participated in. | ### Notification scope @@ -75,10 +95,10 @@ project and group. Notification scope is applied from the broadest to most specific levels: -- Your **global**, or default, notification level applies if you +- Your global, or _default_, notification level applies if you have not selected a notification level for the project or group in which the activity occurred. -- Your **group** setting overrides your default setting. -- Your **project** setting overrides the group setting. +- Your group setting overrides your default setting. +- Your project setting overrides the group setting. When you set the notification level to **Global** for a project or subgroup, it does not directly inherit your global notification settings. Instead, it goes up the hierarchy and inherits the next non-global notification level that is configured, in the following order: @@ -88,44 +108,26 @@ Instead, it goes up the hierarchy and inherits the next non-global notification 1. The ancestor groups' settings (going up the hierarchy). 1. The global notification setting as the final fallback setting. -#### Example +For example, you set your default global notification setting to **Watch**, and your group and project notification levels as follows: -You set your global notification setting to **Watch**, and your group and project notification levels as follows: +```mermaid +%%{init: { "fontFamily": "GitLab Sans", 'theme':'neutral' }}%% +flowchart TD + accTitle: Notification hierarchy + accDescr: Example of a group, subgroup, and project -```plaintext -Group A: Global -├── Subgroup B: Participate - └── Project C: Global + N[Default/global notification level set to Watch] + N --> A + A[Group A: Notification level set to Global] + A-. Inherits Watch level .-> N + A --> B[Subgroup B: Notification level set to Participate] + B --> C[Project C: Notification level set to Global] + C-. Inherits Participate level .-> B ``` -In this example, project C inherits the **Participate** notification level from subgroup B. +Project C inherits the **Participate** notification level from subgroup B. It does not inherit the **Watch** notification level from your global notification settings. -### Notification levels - -For each project and group you can select one of the following levels: - -| Level | Description | -| ----------- | ----------- | -| Global | Your global settings apply. | -| Watch | Receive notifications for [most activity](#events-not-included-in-the-watch-level). | -| Participate | Receive notifications for threads you have participated in. | -| On mention | Receive notifications when you are [mentioned](../discussions/_index.md#mentions) in a comment. | -| Disabled | Receive no notifications. | -| Custom | Receive notifications for selected events and threads you have participated in. | - -### Global notification settings - -Your **Global notification settings** are the default settings unless you select -different values for a project or a group. - -- **Notification email**: the email address your notifications are sent to. - Defaults to your primary email address. -- **Global notification level**: the default [notification level](#notification-levels) - which applies to all your notifications. -- **Receive notifications about your own activity**: select this checkbox to receive - notifications about your own activity. Not selected by default. - ### Group notifications You can select a notification level and email address for each group. diff --git a/lib/gitlab/database/query_analyzers/restrict_allowed_schemas.rb b/lib/gitlab/database/query_analyzers/restrict_allowed_schemas.rb index 2a600fe557b..4e588e4df68 100644 --- a/lib/gitlab/database/query_analyzers/restrict_allowed_schemas.rb +++ b/lib/gitlab/database/query_analyzers/restrict_allowed_schemas.rb @@ -23,7 +23,7 @@ module Gitlab gitlab_main_cell: :gitlab_main, gitlab_main_cell_local: :gitlab_main, gitlab_ci_cell_local: :gitlab_ci, - gitlab_main_clusterwide_setting: :gitlab_main, + gitlab_main_cell_setting: :gitlab_main, gitlab_main_user: :gitlab_main }.freeze diff --git a/spec/lib/gitlab/database/dictionary_spec.rb b/spec/lib/gitlab/database/dictionary_spec.rb index 34da4af5b42..90eb4d0cc9d 100644 --- a/spec/lib/gitlab/database/dictionary_spec.rb +++ b/spec/lib/gitlab/database/dictionary_spec.rb @@ -37,7 +37,7 @@ RSpec.describe Gitlab::Database::Dictionary, feature_category: :database do it 'returns a hash of name and schema mappings' do expect(dictionary.to_name_and_schema_mapping).to include( { - 'application_settings' => :gitlab_main_clusterwide_setting, + 'application_settings' => :gitlab_main_cell_setting, 'members' => :gitlab_main_cell } ) @@ -49,7 +49,7 @@ RSpec.describe Gitlab::Database::Dictionary, feature_category: :database do entry = dictionary.find_by_table_name('application_settings') expect(entry).to be_instance_of(Gitlab::Database::Dictionary::Entry) expect(entry.key_name).to eq('application_settings') - expect(entry.gitlab_schema).to eq('gitlab_main_clusterwide_setting') + expect(entry.gitlab_schema).to eq('gitlab_main_cell_setting') end it 'returns nil if the entry is not found' do @@ -108,7 +108,7 @@ RSpec.describe Gitlab::Database::Dictionary, feature_category: :database do it 'returns the name of the table and its gitlab schema' do expect(database_dictionary.name_and_schema).to match_array([ 'application_settings', - :gitlab_main_clusterwide_setting + :gitlab_main_cell_setting ]) end end @@ -171,7 +171,7 @@ RSpec.describe Gitlab::Database::Dictionary, feature_category: :database do describe '#schema?' do it 'checks if the given schema matches the schema of the table' do expect(database_dictionary.schema?('gitlab_main')).to eq(false) - expect(database_dictionary.schema?('gitlab_main_clusterwide_setting')).to eq(true) + expect(database_dictionary.schema?('gitlab_main_cell_setting')).to eq(true) end end