{{ $options.i18n.heading }}
diff --git a/app/assets/javascripts/ide/components/terminal_sync/terminal_sync_status.vue b/app/assets/javascripts/ide/components/terminal_sync/terminal_sync_status.vue
index 9b0c194b6ba..dfd252880f8 100644
--- a/app/assets/javascripts/ide/components/terminal_sync/terminal_sync_status.vue
+++ b/app/assets/javascripts/ide/components/terminal_sync/terminal_sync_status.vue
@@ -64,8 +64,16 @@ export default {
{{ __('Terminal') }}:
-
-
+
+
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals_summary_optional.vue b/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals_summary_optional.vue
index 35f3b420005..82ecc90683c 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals_summary_optional.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals_summary_optional.vue
@@ -32,7 +32,7 @@ export default {
:href="helpPath"
:title="__('About this feature')"
target="_blank"
- class="d-flex-center"
+ class="gl-flex gl-items-center gl-justify-center"
>
diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss
index abd4c37e082..68f1452bebb 100644
--- a/app/assets/stylesheets/framework/common.scss
+++ b/app/assets/stylesheets/framework/common.scss
@@ -364,21 +364,11 @@ li.note {
.append-bottom-20 { margin-bottom: 20px; }
.center { text-align: center; }
.block { display: block; }
-.flex { display: flex; }
.vertical-align-text-top { vertical-align: text-top; }
.vertical-align-middle { vertical-align: middle; }
-.flex-align-self-center { align-self: center; }
-.flex-grow { flex-grow: 1; }
-.flex-no-shrink { flex-shrink: 0; }
.ws-normal { white-space: normal; }
.overflow-auto { overflow: auto; }
-.d-flex-center {
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
/** COMMON SIZING CLASSES **/
.w-0 { width: 0; }
.w-8em { width: 8em; }
diff --git a/app/assets/stylesheets/framework/header.scss b/app/assets/stylesheets/framework/header.scss
index 20229615268..fdf16eb1705 100644
--- a/app/assets/stylesheets/framework/header.scss
+++ b/app/assets/stylesheets/framework/header.scss
@@ -158,3 +158,9 @@
}
}
}
+
+// Override Bootstrap class with offset for system-header and
+// performance bar when present
+.fixed-top {
+ top: $calc-system-headers-height;
+}
diff --git a/app/assets/stylesheets/highlight/_white_base.scss b/app/assets/stylesheets/highlight/_white_base.scss
index 4ab70ecb1bc..b0f34a08e33 100644
--- a/app/assets/stylesheets/highlight/_white_base.scss
+++ b/app/assets/stylesheets/highlight/_white_base.scss
@@ -107,7 +107,7 @@ $white-gc-bg: #eaf2f5;
.line-numbers,
.diff-line-num,
.code-search-line {
- background-color: $gray-10;
+ background-color: $white;
&.conflict_marker,
&.conflict_our {
diff --git a/app/assets/stylesheets/utilities.scss b/app/assets/stylesheets/utilities.scss
index 4c1f260493a..aff3c0783ed 100644
--- a/app/assets/stylesheets/utilities.scss
+++ b/app/assets/stylesheets/utilities.scss
@@ -51,12 +51,6 @@ $type-scale: (
.border-radius-default { border-radius: $gl-border-radius-base; }
.box-shadow-default { box-shadow: 0 2px 4px 0 $t-gray-a-24; }
-// Override Bootstrap class with offset for system-header and
-// performance bar when present
-.fixed-top {
- top: $calc-system-headers-height;
-}
-
// stylelint-disable-next-line gitlab/no-gl-class
.gl-top-app-header {
top: $calc-application-header-height;
diff --git a/app/models/concerns/enums/sbom.rb b/app/models/concerns/enums/sbom.rb
index 9899f6ff224..cf297545e7c 100644
--- a/app/models/concerns/enums/sbom.rb
+++ b/app/models/concerns/enums/sbom.rb
@@ -23,6 +23,11 @@ module Enums
cargo: 14
}.with_indifferent_access.freeze
+ REACHABILITY_TYPES = {
+ unknown: 0,
+ in_use: 1 # In case package imported and being used in code.
+ }.with_indifferent_access.freeze
+
DEPENDENCY_SCANNING_PURL_TYPES = %w[
composer
conan
@@ -120,6 +125,10 @@ module Enums
purl_types.invert
end
+ def self.reachability_types
+ REACHABILITY_TYPES
+ end
+
def self.package_manager_from_trivy_pkg_type(pkg_type)
PACKAGE_MANAGERS_FROM_TRIVY_PKG_TYPE[pkg_type]
end
diff --git a/app/models/operations/feature_flag.rb b/app/models/operations/feature_flag.rb
index 0bffc5ebff7..cbc273ebd63 100644
--- a/app/models/operations/feature_flag.rb
+++ b/app/models/operations/feature_flag.rb
@@ -104,6 +104,10 @@ module Operations
Ability.issues_readable_by_user(issues, current_user)
end
+ def path
+ Gitlab::Routing.url_helpers.project_feature_flag_path(project, self)
+ end
+
def hook_attrs
{
id: id,
diff --git a/app/policies/personal_access_token_policy.rb b/app/policies/personal_access_token_policy.rb
index 31c973f575b..a167126c868 100644
--- a/app/policies/personal_access_token_policy.rb
+++ b/app/policies/personal_access_token_policy.rb
@@ -8,3 +8,5 @@ class PersonalAccessTokenPolicy < BasePolicy
enable :revoke_token
end
end
+
+PersonalAccessTokenPolicy.prepend_mod
diff --git a/app/services/merge_requests/base_service.rb b/app/services/merge_requests/base_service.rb
index 26fee25b890..6fcdfa58745 100644
--- a/app/services/merge_requests/base_service.rb
+++ b/app/services/merge_requests/base_service.rb
@@ -81,6 +81,7 @@ module MergeRequests
notification_service.async.changed_reviewer_of_merge_request(merge_request, current_user, old_reviewers)
todo_service.reassigned_reviewable(merge_request, current_user, old_reviewers)
invalidate_cache_counts(merge_request, users: affected_reviewers.compact)
+ invalidate_cache_counts(merge_request, users: merge_request.assignees)
new_reviewers = merge_request.reviewers - old_reviewers
merge_request_activity_counter.track_users_review_requested(users: new_reviewers)
diff --git a/app/views/profiles/usage_quotas/index.html.haml b/app/views/profiles/usage_quotas/index.html.haml
index ab4d25bec85..9863b8573ac 100644
--- a/app/views/profiles/usage_quotas/index.html.haml
+++ b/app/views/profiles/usage_quotas/index.html.haml
@@ -4,5 +4,6 @@
- content_for :usage_quotas_tabs do
= render_if_exists 'shared/usage_quotas/tabs_content/pipelines'
#js-storage-usage-app{ data: storage_usage_app_data(@namespace) }
+ = render_if_exists 'shared/usage_quotas/tabs_content/pages'
= render 'shared/usage_quotas/index'
diff --git a/app/views/shared/_mobile_clone_panel.html.haml b/app/views/shared/_mobile_clone_panel.html.haml
index 2f7fb348c17..7681511b2c4 100644
--- a/app/views/shared/_mobile_clone_panel.html.haml
+++ b/app/views/shared/_mobile_clone_panel.html.haml
@@ -4,7 +4,7 @@
.btn-group.mobile-git-clone.js-mobile-git-clone.btn-block
= clipboard_button(button_text: default_clone_label, size: :medium, category: :primary, variant: :confirm, text: default_url_to_repo(project), hide_button_icon: true, class: "clone-dropdown-btn js-clone-dropdown-label")
- %button.btn.gl-button.btn-confirm.dropdown-toggle.js-dropdown-toggle.flex-grow-0.d-flex-center.w-auto.ml-0{ type: "button", data: { toggle: "dropdown" } }
+ %button.btn.gl-button.btn-confirm.dropdown-toggle.js-dropdown-toggle.flex-grow-0.gl-flex.gl-items-center.gl-justify-center.w-auto.ml-0{ type: "button", data: { toggle: "dropdown" } }
= sprite_icon("chevron-down", css_class: "dropdown-btn-icon icon")
%ul.dropdown-menu.dropdown-menu-selectable.dropdown-menu-right.clone-options-dropdown{ data: { dropdown: true } }
- if ssh_enabled?
diff --git a/db/docs/issues_prometheus_alert_events.yml b/db/docs/deleted_tables/issues_prometheus_alert_events.yml
similarity index 80%
rename from db/docs/issues_prometheus_alert_events.yml
rename to db/docs/deleted_tables/issues_prometheus_alert_events.yml
index 0794ef61391..71055b35c8a 100644
--- a/db/docs/issues_prometheus_alert_events.yml
+++ b/db/docs/deleted_tables/issues_prometheus_alert_events.yml
@@ -9,3 +9,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17477
milestone: '12.4'
gitlab_schema: gitlab_main
sharding_key_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/461838 # table is scheduled to be dropped
+removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164288
+removed_in_milestone: '17.4'
diff --git a/db/docs/issues_self_managed_prometheus_alert_events.yml b/db/docs/deleted_tables/issues_self_managed_prometheus_alert_events.yml
similarity index 81%
rename from db/docs/issues_self_managed_prometheus_alert_events.yml
rename to db/docs/deleted_tables/issues_self_managed_prometheus_alert_events.yml
index 1eed9444917..03a3411be91 100644
--- a/db/docs/issues_self_managed_prometheus_alert_events.yml
+++ b/db/docs/deleted_tables/issues_self_managed_prometheus_alert_events.yml
@@ -9,3 +9,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18046
milestone: '12.4'
gitlab_schema: gitlab_main
sharding_key_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/461838 # table is scheduled to be dropped
+removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164288
+removed_in_milestone: '17.4'
diff --git a/db/docs/prometheus_alert_events.yml b/db/docs/deleted_tables/prometheus_alert_events.yml
similarity index 76%
rename from db/docs/prometheus_alert_events.yml
rename to db/docs/deleted_tables/prometheus_alert_events.yml
index c071d77ace0..11557f5a082 100644
--- a/db/docs/prometheus_alert_events.yml
+++ b/db/docs/deleted_tables/prometheus_alert_events.yml
@@ -12,3 +12,5 @@ allow_cross_foreign_keys:
- gitlab_main_clusterwide
sharding_key:
project_id: projects
+removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164288
+removed_in_milestone: '17.4'
diff --git a/db/docs/prometheus_alerts.yml b/db/docs/deleted_tables/prometheus_alerts.yml
similarity index 78%
rename from db/docs/prometheus_alerts.yml
rename to db/docs/deleted_tables/prometheus_alerts.yml
index b9ad57674f9..c9e63ac85a7 100644
--- a/db/docs/prometheus_alerts.yml
+++ b/db/docs/deleted_tables/prometheus_alerts.yml
@@ -12,3 +12,5 @@ allow_cross_foreign_keys:
- gitlab_main_clusterwide
sharding_key:
project_id: projects
+removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164288
+removed_in_milestone: '17.4'
diff --git a/db/docs/prometheus_metrics.yml b/db/docs/deleted_tables/prometheus_metrics.yml
similarity index 74%
rename from db/docs/prometheus_metrics.yml
rename to db/docs/deleted_tables/prometheus_metrics.yml
index 024a2ab5150..9cc43f422aa 100644
--- a/db/docs/prometheus_metrics.yml
+++ b/db/docs/deleted_tables/prometheus_metrics.yml
@@ -9,3 +9,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3799
milestone: '9.3'
gitlab_schema: gitlab_main
sharding_key_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/465327
+removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164288
+removed_in_milestone: '17.4'
diff --git a/db/docs/self_managed_prometheus_alert_events.yml b/db/docs/deleted_tables/self_managed_prometheus_alert_events.yml
similarity index 77%
rename from db/docs/self_managed_prometheus_alert_events.yml
rename to db/docs/deleted_tables/self_managed_prometheus_alert_events.yml
index 019b7ac74c7..03d6619c9dc 100644
--- a/db/docs/self_managed_prometheus_alert_events.yml
+++ b/db/docs/deleted_tables/self_managed_prometheus_alert_events.yml
@@ -12,3 +12,5 @@ allow_cross_foreign_keys:
- gitlab_main_clusterwide
sharding_key:
project_id: projects
+removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164288
+removed_in_milestone: '17.4'
diff --git a/db/migrate/20240805081832_add_reachability_column_to_sbom_occurances_table.rb b/db/migrate/20240805081832_add_reachability_column_to_sbom_occurances_table.rb
new file mode 100644
index 00000000000..d666e9637e9
--- /dev/null
+++ b/db/migrate/20240805081832_add_reachability_column_to_sbom_occurances_table.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddReachabilityColumnToSbomOccurancesTable < Gitlab::Database::Migration[2.2]
+ milestone '17.4'
+ def up
+ with_lock_retries do
+ add_column :sbom_occurrences, :reachability, :smallint, default: 0
+ end
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :sbom_occurrences, :reachability
+ end
+ end
+end
diff --git a/db/migrate/20240812081354_add_email_participants_widget_to_work_item_types.rb b/db/migrate/20240812081354_add_email_participants_widget_to_work_item_types.rb
index 61df2addfdb..3f7512ad66d 100644
--- a/db/migrate/20240812081354_add_email_participants_widget_to_work_item_types.rb
+++ b/db/migrate/20240812081354_add_email_participants_widget_to_work_item_types.rb
@@ -1,40 +1,13 @@
# frozen_string_literal: true
class AddEmailParticipantsWidgetToWorkItemTypes < Gitlab::Database::Migration[2.2]
- class WorkItemType < MigrationRecord
- self.table_name = 'work_item_types'
- end
-
- class WidgetDefinition < MigrationRecord
- self.table_name = 'work_item_widget_definitions'
- end
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
- disable_ddl_transaction!
milestone '17.4'
- WIDGET_NAME = 'Email participants'
- WIDGET_ENUM_VALUE = 25
- WORK_ITEM_TYPES = %w[
- Incident
- Issue
- Ticket
- ].freeze
-
def up
- widgets = WorkItemType.where(name: WORK_ITEM_TYPES).map do |type|
- { work_item_type_id: type.id, name: WIDGET_NAME, widget_type: WIDGET_ENUM_VALUE }
- end
-
- return if widgets.empty?
-
- WidgetDefinition.upsert_all(
- widgets,
- unique_by: :index_work_item_widget_definitions_on_default_witype_and_name
- )
+ # no-op
end
def down
- WidgetDefinition.where(widget_type: WIDGET_ENUM_VALUE).delete_all
+ # no-op
end
end
diff --git a/db/post_migrate/20240903222413_drop_issues_prometheus_alert_events_foreign_keys.rb b/db/post_migrate/20240903222413_drop_issues_prometheus_alert_events_foreign_keys.rb
new file mode 100644
index 00000000000..c22ee4b18b0
--- /dev/null
+++ b/db/post_migrate/20240903222413_drop_issues_prometheus_alert_events_foreign_keys.rb
@@ -0,0 +1,41 @@
+# frozen_string_literal: true
+
+class DropIssuesPrometheusAlertEventsForeignKeys < Gitlab::Database::Migration[2.2]
+ milestone '17.4'
+ disable_ddl_transaction!
+
+ TABLE_NAME = :issues_prometheus_alert_events
+ EVENTS_FK_NAME = 'fk_rails_b32edb790f'
+ ISSUES_FK_NAME = 'fk_rails_db5b756534'
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists TABLE_NAME, :prometheus_alert_events,
+ column: :prometheus_alert_event_id
+ end
+
+ with_lock_retries do
+ remove_foreign_key_if_exists TABLE_NAME, :issues,
+ column: :issue_id
+ end
+ end
+
+ # Original SQL:
+ #
+ # ALTER TABLE ONLY issues_prometheus_alert_events
+ # ADD CONSTRAINT fk_rails_b32edb790f FOREIGN KEY (prometheus_alert_event_id)
+ # REFERENCES prometheus_alert_events(id) ON DELETE CASCADE;
+ #
+ # ALTER TABLE ONLY issues_prometheus_alert_events
+ # ADD CONSTRAINT fk_rails_db5b756534 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+ #
+ def down
+ add_concurrent_foreign_key TABLE_NAME, :prometheus_alert_events,
+ column: :prometheus_alert_event_id,
+ name: EVENTS_FK_NAME
+
+ add_concurrent_foreign_key TABLE_NAME, :issues,
+ column: :issue_id,
+ name: ISSUES_FK_NAME
+ end
+end
diff --git a/db/post_migrate/20240903222414_drop_issues_prometheus_alert_events.rb b/db/post_migrate/20240903222414_drop_issues_prometheus_alert_events.rb
new file mode 100644
index 00000000000..e4b3623f00e
--- /dev/null
+++ b/db/post_migrate/20240903222414_drop_issues_prometheus_alert_events.rb
@@ -0,0 +1,38 @@
+# frozen_string_literal: true
+
+class DropIssuesPrometheusAlertEvents < Gitlab::Database::Migration[2.2]
+ milestone '17.4'
+
+ TABLE_NAME = :issues_prometheus_alert_events
+ PRIMARY_KEY = :issues_prometheus_alert_events_pkey
+ INDEX_NAME = :issue_id_issues_prometheus_alert_events_index
+
+ def up
+ drop_table TABLE_NAME
+ end
+
+ # Original SQL:
+ #
+ # CREATE TABLE issues_prometheus_alert_events (
+ # issue_id bigint NOT NULL,
+ # prometheus_alert_event_id bigint NOT NULL,
+ # created_at timestamp with time zone NOT NULL,
+ # updated_at timestamp with time zone NOT NULL
+ # );
+ #
+ # CREATE INDEX issue_id_issues_prometheus_alert_events_index ON issues_prometheus_alert_events
+ # USING btree (prometheus_alert_event_id);
+ #
+ # ALTER TABLE ONLY issues_prometheus_alert_events
+ # ADD CONSTRAINT issues_prometheus_alert_events_pkey PRIMARY KEY (issue_id, prometheus_alert_event_id);
+ #
+ def down
+ create_table TABLE_NAME, primary_key: [:issue_id, :prometheus_alert_event_id] do |t|
+ t.bigint :issue_id, null: false
+ t.bigint :prometheus_alert_event_id, null: false
+ t.timestamps_with_timezone null: false
+
+ t.index :prometheus_alert_event_id, name: INDEX_NAME
+ end
+ end
+end
diff --git a/db/post_migrate/20240903222526_drop_self_managed_issues_prometheus_alert_events_foreign_keys.rb b/db/post_migrate/20240903222526_drop_self_managed_issues_prometheus_alert_events_foreign_keys.rb
new file mode 100644
index 00000000000..2f1af86ecaf
--- /dev/null
+++ b/db/post_migrate/20240903222526_drop_self_managed_issues_prometheus_alert_events_foreign_keys.rb
@@ -0,0 +1,41 @@
+# frozen_string_literal: true
+
+class DropSelfManagedIssuesPrometheusAlertEventsForeignKeys < Gitlab::Database::Migration[2.2]
+ milestone '17.4'
+ disable_ddl_transaction!
+
+ TABLE_NAME = :issues_self_managed_prometheus_alert_events
+ EVENTS_FK_NAME = 'fk_rails_f7db2d72eb'
+ ISSUES_FK_NAME = 'fk_rails_cc5d88bbb0'
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists TABLE_NAME, :prometheus_alert_events,
+ column: :self_managed_prometheus_alert_event_id
+ end
+
+ with_lock_retries do
+ remove_foreign_key_if_exists TABLE_NAME, :issues,
+ column: :issue_id
+ end
+ end
+
+ # Original SQL:
+ #
+ # ALTER TABLE ONLY issues_self_managed_prometheus_alert_events
+ # ADD CONSTRAINT fk_rails_cc5d88bbb0 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+ #
+ # ALTER TABLE ONLY issues_self_managed_prometheus_alert_events
+ # ADD CONSTRAINT fk_rails_f7db2d72eb FOREIGN KEY (self_managed_prometheus_alert_event_id)
+ # REFERENCES self_managed_prometheus_alert_events(id) ON DELETE CASCADE;
+ #
+ def down
+ add_concurrent_foreign_key TABLE_NAME, :self_managed_prometheus_alert_events,
+ column: :self_managed_prometheus_alert_event_id,
+ name: EVENTS_FK_NAME
+
+ add_concurrent_foreign_key TABLE_NAME, :issues,
+ column: :issue_id,
+ name: ISSUES_FK_NAME
+ end
+end
diff --git a/db/post_migrate/20240903222527_drop_self_managed_issues_prometheus_alert_events.rb b/db/post_migrate/20240903222527_drop_self_managed_issues_prometheus_alert_events.rb
new file mode 100644
index 00000000000..05551f8d920
--- /dev/null
+++ b/db/post_migrate/20240903222527_drop_self_managed_issues_prometheus_alert_events.rb
@@ -0,0 +1,39 @@
+# frozen_string_literal: true
+
+class DropSelfManagedIssuesPrometheusAlertEvents < Gitlab::Database::Migration[2.2]
+ milestone '17.4'
+
+ TABLE_NAME = :issues_self_managed_prometheus_alert_events
+ PRIMARY_KEY = :issues_self_managed_prometheus_alert_events_pkey
+ INDEX_NAME = :issue_id_issues_self_managed_rometheus_alert_events_index
+
+ def up
+ drop_table TABLE_NAME
+ end
+
+ # Original SQL:
+ #
+ # CREATE TABLE issues_self_managed_prometheus_alert_events (
+ # issue_id bigint NOT NULL,
+ # self_managed_prometheus_alert_event_id bigint NOT NULL,
+ # created_at timestamp with time zone NOT NULL,
+ # updated_at timestamp with time zone NOT NULL
+ # );
+ #
+ # CREATE INDEX issue_id_issues_self_managed_rometheus_alert_events_index
+ # ON issues_self_managed_prometheus_alert_events USING btree (self_managed_prometheus_alert_event_id);
+ #
+ # ALTER TABLE ONLY issues_self_managed_prometheus_alert_events
+ # ADD CONSTRAINT issues_self_managed_prometheus_alert_events_pkey
+ # PRIMARY KEY (issue_id, self_managed_prometheus_alert_event_id);
+ #
+ def down
+ create_table TABLE_NAME, primary_key: [:issue_id, :self_managed_prometheus_alert_event_id] do |t|
+ t.bigint :issue_id, null: false
+ t.bigint :self_managed_prometheus_alert_event_id, null: false
+ t.timestamps_with_timezone null: false
+
+ t.index :self_managed_prometheus_alert_event_id, name: INDEX_NAME
+ end
+ end
+end
diff --git a/db/post_migrate/20240903222608_drop_prometheus_alert_events_foreign_keys.rb b/db/post_migrate/20240903222608_drop_prometheus_alert_events_foreign_keys.rb
new file mode 100644
index 00000000000..6577ee26b53
--- /dev/null
+++ b/db/post_migrate/20240903222608_drop_prometheus_alert_events_foreign_keys.rb
@@ -0,0 +1,41 @@
+# frozen_string_literal: true
+
+class DropPrometheusAlertEventsForeignKeys < Gitlab::Database::Migration[2.2]
+ milestone '17.4'
+ disable_ddl_transaction!
+
+ TABLE_NAME = :prometheus_alert_events
+ ALERTS_FK_NAME = 'fk_rails_106f901176'
+ PROJECT_FK_NAME = 'fk_rails_4675865839'
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists TABLE_NAME, :prometheus_alerts,
+ column: :prometheus_alert_id
+ end
+
+ with_lock_retries do
+ remove_foreign_key_if_exists TABLE_NAME, :projects,
+ column: :project_id
+ end
+ end
+
+ # Original SQL:
+ #
+ # ALTER TABLE ONLY prometheus_alert_events
+ # ADD CONSTRAINT fk_rails_106f901176 FOREIGN KEY (prometheus_alert_id) REFERENCES prometheus_alerts(id)
+ # ON DELETE CASCADE;
+ #
+ # ALTER TABLE ONLY prometheus_alert_events
+ # ADD CONSTRAINT fk_rails_4675865839 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ #
+ def down
+ add_concurrent_foreign_key TABLE_NAME, :prometheus_alerts,
+ column: :prometheus_alert_id,
+ name: ALERTS_FK_NAME
+
+ add_concurrent_foreign_key TABLE_NAME, :projects,
+ column: :project_id,
+ name: PROJECT_FK_NAME
+ end
+end
diff --git a/db/post_migrate/20240903222609_drop_prometheus_alert_events.rb b/db/post_migrate/20240903222609_drop_prometheus_alert_events.rb
new file mode 100644
index 00000000000..9e656bbd668
--- /dev/null
+++ b/db/post_migrate/20240903222609_drop_prometheus_alert_events.rb
@@ -0,0 +1,54 @@
+# frozen_string_literal: true
+
+class DropPrometheusAlertEvents < Gitlab::Database::Migration[2.2]
+ milestone '17.4'
+
+ TABLE_NAME = :prometheus_alert_events
+ UNIQUE_INDEX_NAME = :index_prometheus_alert_event_scoped_payload_key
+ STATUS_INDEX = :index_prometheus_alert_events_on_project_id_and_status
+
+ def up
+ drop_table TABLE_NAME
+ end
+
+ # Original SQL:
+ #
+ # CREATE TABLE prometheus_alert_events (
+ # id bigint NOT NULL,
+ # project_id bigint NOT NULL,
+ # prometheus_alert_id bigint NOT NULL,
+ # started_at timestamp with time zone NOT NULL,
+ # ended_at timestamp with time zone,
+ # status smallint,
+ # payload_key character varying
+ # );
+ #
+ # CREATE SEQUENCE prometheus_alert_events_id_seq
+ # START WITH 1
+ # INCREMENT BY 1
+ # NO MINVALUE
+ # NO MAXVALUE
+ # CACHE 1;
+ #
+ # ALTER SEQUENCE prometheus_alert_events_id_seq OWNED BY prometheus_alert_events.id;
+ #
+ # CREATE UNIQUE INDEX index_prometheus_alert_event_scoped_payload_key ON prometheus_alert_events
+ # USING btree (prometheus_alert_id, payload_key);
+ #
+ # CREATE INDEX index_prometheus_alert_events_on_project_id_and_status ON prometheus_alert_events
+ # USING btree (project_id, status);
+ #
+ def down
+ create_table TABLE_NAME do |t|
+ t.bigint :project_id, null: false
+ t.bigint :prometheus_alert_id, null: false
+ t.datetime_with_timezone :started_at, null: false
+ t.datetime_with_timezone :ended_at
+ t.integer :status, limit: 2
+ t.string :payload_key
+
+ t.index [:prometheus_alert_id, :payload_key], name: UNIQUE_INDEX_NAME, unique: true
+ t.index [:project_id, :status], name: STATUS_INDEX
+ end
+ end
+end
diff --git a/db/post_migrate/20240903222629_drop_self_managed_prometheus_alert_events_foreign_keys.rb b/db/post_migrate/20240903222629_drop_self_managed_prometheus_alert_events_foreign_keys.rb
new file mode 100644
index 00000000000..4aeee4a8aa8
--- /dev/null
+++ b/db/post_migrate/20240903222629_drop_self_managed_prometheus_alert_events_foreign_keys.rb
@@ -0,0 +1,40 @@
+# frozen_string_literal: true
+
+class DropSelfManagedPrometheusAlertEventsForeignKeys < Gitlab::Database::Migration[2.2]
+ milestone '17.4'
+ disable_ddl_transaction!
+
+ TABLE_NAME = :self_managed_prometheus_alert_events
+ PROJECTS_FK_NAME = 'fk_rails_3936dadc62'
+ ENVIRONMENTS_FK_NAME = 'fk_rails_39d83d1b65'
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists TABLE_NAME, :projects,
+ column: :project_id
+ end
+
+ with_lock_retries do
+ remove_foreign_key_if_exists TABLE_NAME, :environments,
+ column: :environment_id
+ end
+ end
+
+ # Original SQL:
+ #
+ # ALTER TABLE ONLY self_managed_prometheus_alert_events
+ # ADD CONSTRAINT fk_rails_3936dadc62 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ #
+ # ALTER TABLE ONLY self_managed_prometheus_alert_events
+ # ADD CONSTRAINT fk_rails_39d83d1b65 FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE CASCADE;
+ #
+ def down
+ add_concurrent_foreign_key TABLE_NAME, :projects,
+ column: :project_id,
+ name: PROJECTS_FK_NAME
+
+ add_concurrent_foreign_key TABLE_NAME, :environments,
+ column: :environment_id,
+ name: ENVIRONMENTS_FK_NAME
+ end
+end
diff --git a/db/post_migrate/20240903222630_drop_self_managed_prometheus_alert_events.rb b/db/post_migrate/20240903222630_drop_self_managed_prometheus_alert_events.rb
new file mode 100644
index 00000000000..0ea64c80534
--- /dev/null
+++ b/db/post_migrate/20240903222630_drop_self_managed_prometheus_alert_events.rb
@@ -0,0 +1,58 @@
+# frozen_string_literal: true
+
+class DropSelfManagedPrometheusAlertEvents < Gitlab::Database::Migration[2.2]
+ milestone '17.4'
+
+ TABLE_NAME = :self_managed_prometheus_alert_events
+ UNIQUE_INDEX_NAME = :idx_project_id_payload_key_self_managed_prometheus_alert_events
+ ENVIRONMENT_INDEX = :index_self_managed_prometheus_alert_events_on_environment_id
+
+ def up
+ drop_table TABLE_NAME
+ end
+
+ # Original SQL:
+ #
+ # CREATE TABLE self_managed_prometheus_alert_events (
+ # id bigint NOT NULL,
+ # project_id bigint NOT NULL,
+ # environment_id bigint,
+ # started_at timestamp with time zone NOT NULL,
+ # ended_at timestamp with time zone,
+ # status smallint NOT NULL,
+ # title character varying(255) NOT NULL,
+ # query_expression character varying(255),
+ # payload_key character varying(255) NOT NULL
+ # );
+ #
+ # CREATE SEQUENCE self_managed_prometheus_alert_events_id_seq
+ # START WITH 1
+ # INCREMENT BY 1
+ # NO MINVALUE
+ # NO MAXVALUE
+ # CACHE 1;
+ #
+ # ALTER SEQUENCE self_managed_prometheus_alert_events_id_seq OWNED BY self_managed_prometheus_alert_events.id;
+ #
+ # CREATE UNIQUE INDEX idx_project_id_payload_key_self_managed_prometheus_alert_events
+ # ON self_managed_prometheus_alert_events USING btree (project_id, payload_key);
+ #
+ # CREATE INDEX index_self_managed_prometheus_alert_events_on_environment_id ON self_managed_prometheus_alert_events
+ # USING btree (environment_id);
+ #
+ def down
+ create_table TABLE_NAME do |t|
+ t.bigint :project_id, null: false
+ t.bigint :environment_id
+ t.datetime_with_timezone :started_at, null: false
+ t.datetime_with_timezone :ended_at
+ t.integer :status, limit: 2, null: false
+ t.string :title, limit: 255, null: false
+ t.string :query_expression, limit: 255
+ t.string :payload_key, limit: 255, null: false
+
+ t.index [:project_id, :payload_key], name: UNIQUE_INDEX_NAME, unique: true
+ t.index :environment_id, name: ENVIRONMENT_INDEX
+ end
+ end
+end
diff --git a/db/post_migrate/20240903222645_drop_prometheus_alerts_foreign_keys.rb b/db/post_migrate/20240903222645_drop_prometheus_alerts_foreign_keys.rb
new file mode 100644
index 00000000000..2a096729953
--- /dev/null
+++ b/db/post_migrate/20240903222645_drop_prometheus_alerts_foreign_keys.rb
@@ -0,0 +1,68 @@
+# frozen_string_literal: true
+
+class DropPrometheusAlertsForeignKeys < Gitlab::Database::Migration[2.2]
+ milestone '17.4'
+ disable_ddl_transaction!
+
+ TABLE_NAME = :prometheus_alerts
+ ALERTS_FK_NAME = 'fk_51ab4b6089'
+ ENVIRONMENTS_FK_NAME = 'fk_rails_6d9b283465'
+ METRICS_FK_NAME = 'fk_rails_e6351447ec'
+ PROJECTS_FK_NAME = 'fk_rails_f0e8db86aa'
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists TABLE_NAME, :environments,
+ column: :environment_id
+ end
+
+ with_lock_retries do
+ remove_foreign_key_if_exists TABLE_NAME, :prometheus_metrics,
+ column: :prometheus_metric_id
+ end
+
+ with_lock_retries do
+ remove_foreign_key_if_exists TABLE_NAME, :projects,
+ column: :project_id
+ end
+
+ with_lock_retries do
+ remove_foreign_key_if_exists :alert_management_alerts, TABLE_NAME,
+ column: :prometheus_alert_id
+ end
+ end
+
+ # Original SQL:
+ #
+ # ALTER TABLE ONLY alert_management_alerts
+ # ADD CONSTRAINT fk_51ab4b6089 FOREIGN KEY (prometheus_alert_id) REFERENCES prometheus_alerts(id)
+ # ON DELETE CASCADE;
+ #
+ # ALTER TABLE ONLY prometheus_alerts
+ # ADD CONSTRAINT fk_rails_6d9b283465 FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE CASCADE;
+ #
+ # ALTER TABLE ONLY prometheus_alerts
+ # ADD CONSTRAINT fk_rails_e6351447ec FOREIGN KEY (prometheus_metric_id) REFERENCES prometheus_metrics(id)
+ # ON DELETE CASCADE;
+ #
+ # ALTER TABLE ONLY prometheus_alerts
+ # ADD CONSTRAINT fk_rails_f0e8db86aa FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ #
+ def down
+ add_concurrent_foreign_key :alert_management_alerts, TABLE_NAME,
+ column: :prometheus_alert_id,
+ name: ALERTS_FK_NAME
+
+ add_concurrent_foreign_key TABLE_NAME, :environments,
+ column: :environment_id,
+ name: ENVIRONMENTS_FK_NAME
+
+ add_concurrent_foreign_key TABLE_NAME, :prometheus_metrics,
+ column: :prometheus_metric_id,
+ name: METRICS_FK_NAME
+
+ add_concurrent_foreign_key TABLE_NAME, :projects,
+ column: :project_id,
+ name: PROJECTS_FK_NAME
+ end
+end
diff --git a/db/post_migrate/20240903222651_drop_prometheus_alerts.rb b/db/post_migrate/20240903222651_drop_prometheus_alerts.rb
new file mode 100644
index 00000000000..af7ad14e7e9
--- /dev/null
+++ b/db/post_migrate/20240903222651_drop_prometheus_alerts.rb
@@ -0,0 +1,62 @@
+# frozen_string_literal: true
+
+class DropPrometheusAlerts < Gitlab::Database::Migration[2.2]
+ milestone '17.4'
+
+ TABLE_NAME = :prometheus_alerts
+ UNIQUE_INDEX_NAME = :index_prometheus_alerts_metric_environment
+ ENVIRONMENT_INDEX_NAME = :index_prometheus_alerts_on_environment_id
+ METRIC_INDEX_NAME = :index_prometheus_alerts_on_prometheus_metric_id
+
+ def up
+ drop_table TABLE_NAME
+ end
+
+ # Original SQL:
+ #
+ # CREATE TABLE prometheus_alerts (
+ # id bigint NOT NULL,
+ # created_at timestamp with time zone NOT NULL,
+ # updated_at timestamp with time zone NOT NULL,
+ # threshold double precision NOT NULL,
+ # operator integer NOT NULL,
+ # environment_id bigint NOT NULL,
+ # project_id bigint NOT NULL,
+ # prometheus_metric_id bigint NOT NULL,
+ # runbook_url text,
+ # CONSTRAINT check_cb76d7e629 CHECK ((char_length(runbook_url) <= 255))
+ # );
+ #
+ # CREATE SEQUENCE prometheus_alerts_id_seq
+ # START WITH 1
+ # INCREMENT BY 1
+ # NO MINVALUE
+ # NO MAXVALUE
+ # CACHE 1;
+ #
+ # ALTER SEQUENCE prometheus_alerts_id_seq OWNED BY prometheus_alerts.id;
+ #
+ # CREATE UNIQUE INDEX index_prometheus_alerts_metric_environment ON prometheus_alerts
+ # USING btree (project_id, prometheus_metric_id, environment_id);
+ #
+ # CREATE INDEX index_prometheus_alerts_on_environment_id ON prometheus_alerts USING btree (environment_id);
+ #
+ # CREATE INDEX index_prometheus_alerts_on_prometheus_metric_id ON prometheus_alerts
+ # USING btree (prometheus_metric_id);
+ #
+ def down
+ create_table TABLE_NAME do |t|
+ t.timestamps_with_timezone null: false
+ t.float :threshold, null: false
+ t.integer :operator, null: false
+ t.bigint :environment_id, null: false
+ t.bigint :project_id, null: false
+ t.bigint :prometheus_metric_id, null: false
+ t.text :runbook_url, limit: 255
+
+ t.index [:project_id, :prometheus_metric_id, :environment_id], name: UNIQUE_INDEX_NAME, unique: true
+ t.index :environment_id, name: ENVIRONMENT_INDEX_NAME
+ t.index :prometheus_metric_id, name: METRIC_INDEX_NAME
+ end
+ end
+end
diff --git a/db/post_migrate/20240903222709_drop_prometheus_metrics_foreign_keys.rb b/db/post_migrate/20240903222709_drop_prometheus_metrics_foreign_keys.rb
new file mode 100644
index 00000000000..6540cc84f19
--- /dev/null
+++ b/db/post_migrate/20240903222709_drop_prometheus_metrics_foreign_keys.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class DropPrometheusMetricsForeignKeys < Gitlab::Database::Migration[2.2]
+ milestone '17.4'
+ disable_ddl_transaction!
+
+ TABLE_NAME = :prometheus_metrics
+ PROJECT_FK_NAME = 'fk_rails_4c8957a707'
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists TABLE_NAME, :projects,
+ column: :project_id
+ end
+ end
+
+ # Original SQL:
+ #
+ # ALTER TABLE ONLY prometheus_metrics
+ # ADD CONSTRAINT fk_rails_4c8957a707 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ #
+ def down
+ add_concurrent_foreign_key TABLE_NAME, :projects,
+ column: :project_id,
+ name: PROJECT_FK_NAME
+ end
+end
diff --git a/db/post_migrate/20240903222710_drop_prometheus_metrics.rb b/db/post_migrate/20240903222710_drop_prometheus_metrics.rb
new file mode 100644
index 00000000000..a72a52e02e4
--- /dev/null
+++ b/db/post_migrate/20240903222710_drop_prometheus_metrics.rb
@@ -0,0 +1,77 @@
+# frozen_string_literal: true
+
+class DropPrometheusMetrics < Gitlab::Database::Migration[2.2]
+ milestone '17.4'
+
+ TABLE_NAME = :prometheus_metrics
+ UNIQUE_NULL_PROJECT_INDEX = :index_prometheus_metrics_on_identifier_and_null_project
+ UNIQUE_PROJECT_INDEX = :index_prometheus_metrics_on_identifier_and_project_id
+ COMMON_INDEX = :index_prometheus_metrics_on_common
+ GROUP_INDEX = :index_prometheus_metrics_on_group
+ PROJECT_INDEX = :index_prometheus_metrics_on_project_id
+
+ def up
+ drop_table TABLE_NAME
+ end
+
+ # Original SQL:
+ #
+ # CREATE TABLE prometheus_metrics (
+ # id bigint NOT NULL,
+ # project_id bigint,
+ # title character varying NOT NULL,
+ # query character varying NOT NULL,
+ # y_label character varying NOT NULL,
+ # unit character varying NOT NULL,
+ # legend character varying,
+ # "group" integer NOT NULL,
+ # created_at timestamp with time zone NOT NULL,
+ # updated_at timestamp with time zone NOT NULL,
+ # common boolean DEFAULT false NOT NULL,
+ # identifier character varying,
+ # dashboard_path text,
+ # CONSTRAINT check_0ad9f01463 CHECK ((char_length(dashboard_path) <= 2048))
+ # );
+ # CREATE SEQUENCE prometheus_metrics_id_seq
+ # START WITH 1
+ # INCREMENT BY 1
+ # NO MINVALUE
+ # NO MAXVALUE
+ # CACHE 1;
+ #
+ # ALTER SEQUENCE prometheus_metrics_id_seq OWNED BY prometheus_metrics.id;
+ #
+ # CREATE INDEX index_prometheus_metrics_on_common ON prometheus_metrics USING btree (common);
+ #
+ # CREATE INDEX index_prometheus_metrics_on_group ON prometheus_metrics USING btree ("group");
+ #
+ # CREATE UNIQUE INDEX index_prometheus_metrics_on_identifier_and_null_project ON prometheus_metrics
+ # USING btree (identifier) WHERE (project_id IS NULL);
+ #
+ # CREATE UNIQUE INDEX index_prometheus_metrics_on_identifier_and_project_id ON prometheus_metrics
+ # USING btree (identifier, project_id);
+ #
+ # CREATE INDEX index_prometheus_metrics_on_project_id ON prometheus_metrics USING btree (project_id);
+ #
+ def down
+ create_table TABLE_NAME do |t|
+ t.bigint :project_id
+ t.string :title, null: false
+ t.string :query, null: false
+ t.string :y_label, null: false
+ t.string :unit, null: false
+ t.string :legend
+ t.integer "group", null: false
+ t.timestamps_with_timezone null: false
+ t.boolean :common, null: false, default: false
+ t.string :identifier
+ t.text :dashboard_path, limit: 2048
+
+ t.index :common, name: COMMON_INDEX
+ t.index "group", name: GROUP_INDEX
+ t.index :identifier, unique: true, name: UNIQUE_NULL_PROJECT_INDEX, where: 'project_id IS NULL'
+ t.index [:identifier, :project_id], unique: true, name: UNIQUE_PROJECT_INDEX
+ t.index :project_id, name: PROJECT_INDEX
+ end
+ end
+end
diff --git a/db/schema_migrations/20240805081832 b/db/schema_migrations/20240805081832
new file mode 100644
index 00000000000..8b3a74b154f
--- /dev/null
+++ b/db/schema_migrations/20240805081832
@@ -0,0 +1 @@
+8cee30e569bba31dc5bd81163c47426a1f2796d7c0c4329d2547d44f25980178
\ No newline at end of file
diff --git a/db/schema_migrations/20240903222413 b/db/schema_migrations/20240903222413
new file mode 100644
index 00000000000..46d29e78a55
--- /dev/null
+++ b/db/schema_migrations/20240903222413
@@ -0,0 +1 @@
+3e095ae2635398bfc8c8f81c09421cb2d37c5134a0378966ae138f7166c6699c
\ No newline at end of file
diff --git a/db/schema_migrations/20240903222414 b/db/schema_migrations/20240903222414
new file mode 100644
index 00000000000..0c60e2522ee
--- /dev/null
+++ b/db/schema_migrations/20240903222414
@@ -0,0 +1 @@
+562007a8ac4412e4f8cd598104d46e3db4970a46a9b15323b94b3941f1320dac
\ No newline at end of file
diff --git a/db/schema_migrations/20240903222526 b/db/schema_migrations/20240903222526
new file mode 100644
index 00000000000..6180e74904a
--- /dev/null
+++ b/db/schema_migrations/20240903222526
@@ -0,0 +1 @@
+6ab3237e46e64a264bdf76eb4beaa30a37e0ce7c241f9c8c7bd0832f3f232f1e
\ No newline at end of file
diff --git a/db/schema_migrations/20240903222527 b/db/schema_migrations/20240903222527
new file mode 100644
index 00000000000..3e96430d7d4
--- /dev/null
+++ b/db/schema_migrations/20240903222527
@@ -0,0 +1 @@
+16cb059ba2ad7ad65e47256a6932dd8fa3f9e956af359ccbc4979f4167e3a1fc
\ No newline at end of file
diff --git a/db/schema_migrations/20240903222608 b/db/schema_migrations/20240903222608
new file mode 100644
index 00000000000..ea3ec607964
--- /dev/null
+++ b/db/schema_migrations/20240903222608
@@ -0,0 +1 @@
+779afee3e07820550eb8f381c287183673c8910ac72d2ac66f75524cc22d755c
\ No newline at end of file
diff --git a/db/schema_migrations/20240903222609 b/db/schema_migrations/20240903222609
new file mode 100644
index 00000000000..4aea84be48c
--- /dev/null
+++ b/db/schema_migrations/20240903222609
@@ -0,0 +1 @@
+ebe7b7dfaf5b0aac570f83df38e5e23fbd5edbc7defff80c442ac58218aa976b
\ No newline at end of file
diff --git a/db/schema_migrations/20240903222629 b/db/schema_migrations/20240903222629
new file mode 100644
index 00000000000..7bd10840107
--- /dev/null
+++ b/db/schema_migrations/20240903222629
@@ -0,0 +1 @@
+4205802e8cedc81e449e6a3ac5b806d6300457cdbd4dbe96fb547b57d2556de1
\ No newline at end of file
diff --git a/db/schema_migrations/20240903222630 b/db/schema_migrations/20240903222630
new file mode 100644
index 00000000000..e1cdba99716
--- /dev/null
+++ b/db/schema_migrations/20240903222630
@@ -0,0 +1 @@
+863655adbc15360c31ab0e5c4f0ea079b4ab5481bb57df9608aea3069ce23820
\ No newline at end of file
diff --git a/db/schema_migrations/20240903222645 b/db/schema_migrations/20240903222645
new file mode 100644
index 00000000000..2a18c1f7026
--- /dev/null
+++ b/db/schema_migrations/20240903222645
@@ -0,0 +1 @@
+75b527e70d1d446cdc47a485f66531488d56e2ef61a770b1fb12d0b821aa021e
\ No newline at end of file
diff --git a/db/schema_migrations/20240903222651 b/db/schema_migrations/20240903222651
new file mode 100644
index 00000000000..5faf466fdda
--- /dev/null
+++ b/db/schema_migrations/20240903222651
@@ -0,0 +1 @@
+b56bd572ba745bedc275dee79138a28789572151ed46a40f40244acb233f5303
\ No newline at end of file
diff --git a/db/schema_migrations/20240903222709 b/db/schema_migrations/20240903222709
new file mode 100644
index 00000000000..ceacbc2470b
--- /dev/null
+++ b/db/schema_migrations/20240903222709
@@ -0,0 +1 @@
+8f32eea35b048297fcb6d835c9991b6a9f20ce809634f1c66c8335ff68dd0c5d
\ No newline at end of file
diff --git a/db/schema_migrations/20240903222710 b/db/schema_migrations/20240903222710
new file mode 100644
index 00000000000..a3d73fd536b
--- /dev/null
+++ b/db/schema_migrations/20240903222710
@@ -0,0 +1 @@
+7ff2eb3e3931c96492de17c15702a40c70e3d435a6d989139345f95fd56bd538
\ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index b0d76bf8824..9ce4f88579b 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -12403,20 +12403,6 @@ CREATE SEQUENCE issues_id_seq
ALTER SEQUENCE issues_id_seq OWNED BY issues.id;
-CREATE TABLE issues_prometheus_alert_events (
- issue_id bigint NOT NULL,
- prometheus_alert_event_id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-
-CREATE TABLE issues_self_managed_prometheus_alert_events (
- issue_id bigint NOT NULL,
- self_managed_prometheus_alert_event_id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-
CREATE TABLE iterations_cadences (
id bigint NOT NULL,
group_id bigint NOT NULL,
@@ -16844,73 +16830,6 @@ CREATE SEQUENCE projects_visits_id_seq
ALTER SEQUENCE projects_visits_id_seq OWNED BY projects_visits.id;
-CREATE TABLE prometheus_alert_events (
- id bigint NOT NULL,
- project_id bigint NOT NULL,
- prometheus_alert_id bigint NOT NULL,
- started_at timestamp with time zone NOT NULL,
- ended_at timestamp with time zone,
- status smallint,
- payload_key character varying
-);
-
-CREATE SEQUENCE prometheus_alert_events_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE prometheus_alert_events_id_seq OWNED BY prometheus_alert_events.id;
-
-CREATE TABLE prometheus_alerts (
- id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- threshold double precision NOT NULL,
- operator integer NOT NULL,
- environment_id bigint NOT NULL,
- project_id bigint NOT NULL,
- prometheus_metric_id bigint NOT NULL,
- runbook_url text,
- CONSTRAINT check_cb76d7e629 CHECK ((char_length(runbook_url) <= 255))
-);
-
-CREATE SEQUENCE prometheus_alerts_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE prometheus_alerts_id_seq OWNED BY prometheus_alerts.id;
-
-CREATE TABLE prometheus_metrics (
- id bigint NOT NULL,
- project_id bigint,
- title character varying NOT NULL,
- query character varying NOT NULL,
- y_label character varying NOT NULL,
- unit character varying NOT NULL,
- legend character varying,
- "group" integer NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- common boolean DEFAULT false NOT NULL,
- identifier character varying,
- dashboard_path text,
- CONSTRAINT check_0ad9f01463 CHECK ((char_length(dashboard_path) <= 2048))
-);
-
-CREATE SEQUENCE prometheus_metrics_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE prometheus_metrics_id_seq OWNED BY prometheus_metrics.id;
-
CREATE TABLE protected_branch_merge_access_levels (
id bigint NOT NULL,
protected_branch_id bigint NOT NULL,
@@ -17699,6 +17618,7 @@ CREATE TABLE sbom_occurrences (
archived boolean DEFAULT false NOT NULL,
traversal_ids bigint[] DEFAULT '{}'::bigint[] NOT NULL,
ancestors jsonb DEFAULT '[]'::jsonb NOT NULL,
+ reachability smallint DEFAULT 0,
CONSTRAINT check_3f2d2c7ffc CHECK ((char_length(package_manager) <= 255)),
CONSTRAINT check_9b29021fa8 CHECK ((char_length(component_name) <= 255)),
CONSTRAINT check_e6b8437cfe CHECK ((char_length(input_file_path) <= 1024))
@@ -18108,27 +18028,6 @@ CREATE SEQUENCE security_trainings_id_seq
ALTER SEQUENCE security_trainings_id_seq OWNED BY security_trainings.id;
-CREATE TABLE self_managed_prometheus_alert_events (
- id bigint NOT NULL,
- project_id bigint NOT NULL,
- environment_id bigint,
- started_at timestamp with time zone NOT NULL,
- ended_at timestamp with time zone,
- status smallint NOT NULL,
- title character varying(255) NOT NULL,
- query_expression character varying(255),
- payload_key character varying(255) NOT NULL
-);
-
-CREATE SEQUENCE self_managed_prometheus_alert_events_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE self_managed_prometheus_alert_events_id_seq OWNED BY self_managed_prometheus_alert_events.id;
-
CREATE TABLE sent_notifications (
project_id bigint,
noteable_id bigint,
@@ -22155,12 +22054,6 @@ ALTER TABLE ONLY projects_sync_events ALTER COLUMN id SET DEFAULT nextval('proje
ALTER TABLE ONLY projects_visits ALTER COLUMN id SET DEFAULT nextval('projects_visits_id_seq'::regclass);
-ALTER TABLE ONLY prometheus_alert_events ALTER COLUMN id SET DEFAULT nextval('prometheus_alert_events_id_seq'::regclass);
-
-ALTER TABLE ONLY prometheus_alerts ALTER COLUMN id SET DEFAULT nextval('prometheus_alerts_id_seq'::regclass);
-
-ALTER TABLE ONLY prometheus_metrics ALTER COLUMN id SET DEFAULT nextval('prometheus_metrics_id_seq'::regclass);
-
ALTER TABLE ONLY protected_branch_merge_access_levels ALTER COLUMN id SET DEFAULT nextval('protected_branch_merge_access_levels_id_seq'::regclass);
ALTER TABLE ONLY protected_branch_push_access_levels ALTER COLUMN id SET DEFAULT nextval('protected_branch_push_access_levels_id_seq'::regclass);
@@ -22271,8 +22164,6 @@ ALTER TABLE ONLY security_training_providers ALTER COLUMN id SET DEFAULT nextval
ALTER TABLE ONLY security_trainings ALTER COLUMN id SET DEFAULT nextval('security_trainings_id_seq'::regclass);
-ALTER TABLE ONLY self_managed_prometheus_alert_events ALTER COLUMN id SET DEFAULT nextval('self_managed_prometheus_alert_events_id_seq'::regclass);
-
ALTER TABLE ONLY sent_notifications ALTER COLUMN id SET DEFAULT nextval('sent_notifications_id_seq'::regclass);
ALTER TABLE ONLY sentry_issues ALTER COLUMN id SET DEFAULT nextval('sentry_issues_id_seq'::regclass);
@@ -24110,12 +24001,6 @@ ALTER TABLE ONLY issue_user_mentions
ALTER TABLE ONLY issues
ADD CONSTRAINT issues_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY issues_prometheus_alert_events
- ADD CONSTRAINT issues_prometheus_alert_events_pkey PRIMARY KEY (issue_id, prometheus_alert_event_id);
-
-ALTER TABLE ONLY issues_self_managed_prometheus_alert_events
- ADD CONSTRAINT issues_self_managed_prometheus_alert_events_pkey PRIMARY KEY (issue_id, self_managed_prometheus_alert_event_id);
-
ALTER TABLE ONLY sprints
ADD CONSTRAINT iteration_start_and_due_date_iterations_cadence_id_constraint EXCLUDE USING gist (iterations_cadence_id WITH =, daterange(start_date, due_date, '[]'::text) WITH &&) WHERE ((group_id IS NOT NULL)) DEFERRABLE INITIALLY DEFERRED;
@@ -24749,15 +24634,6 @@ ALTER TABLE ONLY projects_sync_events
ALTER TABLE ONLY projects_visits
ADD CONSTRAINT projects_visits_pkey PRIMARY KEY (id, visited_at);
-ALTER TABLE ONLY prometheus_alert_events
- ADD CONSTRAINT prometheus_alert_events_pkey PRIMARY KEY (id);
-
-ALTER TABLE ONLY prometheus_alerts
- ADD CONSTRAINT prometheus_alerts_pkey PRIMARY KEY (id);
-
-ALTER TABLE ONLY prometheus_metrics
- ADD CONSTRAINT prometheus_metrics_pkey PRIMARY KEY (id);
-
ALTER TABLE ONLY protected_branch_merge_access_levels
ADD CONSTRAINT protected_branch_merge_access_levels_pkey PRIMARY KEY (id);
@@ -24935,9 +24811,6 @@ ALTER TABLE ONLY security_training_providers
ALTER TABLE ONLY security_trainings
ADD CONSTRAINT security_trainings_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY self_managed_prometheus_alert_events
- ADD CONSTRAINT self_managed_prometheus_alert_events_pkey PRIMARY KEY (id);
-
ALTER TABLE ONLY sent_notifications
ADD CONSTRAINT sent_notifications_pkey PRIMARY KEY (id);
@@ -26788,8 +26661,6 @@ CREATE INDEX idx_project_audit_events_on_project_created_at_id ON ONLY project_a
CREATE INDEX idx_project_audit_events_on_project_id_author_created_at_id ON ONLY project_audit_events USING btree (project_id, author_id, created_at, id DESC);
-CREATE UNIQUE INDEX idx_project_id_payload_key_self_managed_prometheus_alert_events ON self_managed_prometheus_alert_events USING btree (project_id, payload_key);
-
CREATE INDEX idx_project_repository_check_partial ON projects USING btree (repository_storage, created_at) WHERE (last_repository_check_at IS NULL);
CREATE INDEX idx_projects_api_created_at_id_for_archived ON projects USING btree (created_at, id) WHERE ((archived = true) AND (pending_delete = false) AND (hidden = false));
@@ -29838,26 +29709,6 @@ CREATE INDEX index_projects_visits_on_entity_id ON ONLY projects_visits USING bt
CREATE INDEX index_projects_visits_on_user_id_and_entity_id_and_visited_at ON ONLY projects_visits USING btree (user_id, entity_id, visited_at);
-CREATE UNIQUE INDEX index_prometheus_alert_event_scoped_payload_key ON prometheus_alert_events USING btree (prometheus_alert_id, payload_key);
-
-CREATE INDEX index_prometheus_alert_events_on_project_id_and_status ON prometheus_alert_events USING btree (project_id, status);
-
-CREATE UNIQUE INDEX index_prometheus_alerts_metric_environment ON prometheus_alerts USING btree (project_id, prometheus_metric_id, environment_id);
-
-CREATE INDEX index_prometheus_alerts_on_environment_id ON prometheus_alerts USING btree (environment_id);
-
-CREATE INDEX index_prometheus_alerts_on_prometheus_metric_id ON prometheus_alerts USING btree (prometheus_metric_id);
-
-CREATE INDEX index_prometheus_metrics_on_common ON prometheus_metrics USING btree (common);
-
-CREATE INDEX index_prometheus_metrics_on_group ON prometheus_metrics USING btree ("group");
-
-CREATE UNIQUE INDEX index_prometheus_metrics_on_identifier_and_null_project ON prometheus_metrics USING btree (identifier) WHERE (project_id IS NULL);
-
-CREATE UNIQUE INDEX index_prometheus_metrics_on_identifier_and_project_id ON prometheus_metrics USING btree (identifier, project_id);
-
-CREATE INDEX index_prometheus_metrics_on_project_id ON prometheus_metrics USING btree (project_id);
-
CREATE INDEX index_protected_branch_merge_access ON protected_branch_merge_access_levels USING btree (protected_branch_id);
CREATE INDEX index_protected_branch_merge_access_levels_on_group_id ON protected_branch_merge_access_levels USING btree (group_id);
@@ -30192,8 +30043,6 @@ CREATE INDEX index_security_trainings_on_provider_id ON security_trainings USING
CREATE UNIQUE INDEX index_security_trainings_on_unique_project_id ON security_trainings USING btree (project_id) WHERE (is_primary IS TRUE);
-CREATE INDEX index_self_managed_prometheus_alert_events_on_environment_id ON self_managed_prometheus_alert_events USING btree (environment_id);
-
CREATE INDEX index_sent_notifications_on_issue_email_participant_id ON sent_notifications USING btree (issue_email_participant_id);
CREATE INDEX index_sent_notifications_on_noteable_type_noteable_id ON sent_notifications USING btree (noteable_id) WHERE ((noteable_type)::text = 'Issue'::text);
@@ -30958,10 +30807,6 @@ CREATE INDEX index_zoom_meetings_on_issue_status ON zoom_meetings USING btree (i
CREATE INDEX index_zoom_meetings_on_project_id ON zoom_meetings USING btree (project_id);
-CREATE INDEX issue_id_issues_prometheus_alert_events_index ON issues_prometheus_alert_events USING btree (prometheus_alert_event_id);
-
-CREATE INDEX issue_id_issues_self_managed_rometheus_alert_events_index ON issues_self_managed_prometheus_alert_events USING btree (self_managed_prometheus_alert_event_id);
-
CREATE UNIQUE INDEX issue_user_mentions_on_issue_id_and_note_id_index ON issue_user_mentions USING btree (issue_id, note_id);
CREATE UNIQUE INDEX issue_user_mentions_on_issue_id_index ON issue_user_mentions USING btree (issue_id) WHERE (note_id IS NULL);
@@ -33547,9 +33392,6 @@ ALTER TABLE ONLY approval_group_rules_groups
ALTER TABLE ONLY approval_group_rules_protected_branches
ADD CONSTRAINT fk_514003db08 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY alert_management_alerts
- ADD CONSTRAINT fk_51ab4b6089 FOREIGN KEY (prometheus_alert_id) REFERENCES prometheus_alerts(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY deploy_tokens
ADD CONSTRAINT fk_51bf7bfb69 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -34738,9 +34580,6 @@ ALTER TABLE ONLY issue_email_participants
ALTER TABLE ONLY merge_request_context_commits
ADD CONSTRAINT fk_rails_0fe0039f60 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
-ALTER TABLE ONLY prometheus_alert_events
- ADD CONSTRAINT fk_rails_106f901176 FOREIGN KEY (prometheus_alert_id) REFERENCES prometheus_alerts(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY audit_events_streaming_headers
ADD CONSTRAINT fk_rails_109fcf96e2 FOREIGN KEY (external_audit_event_destination_id) REFERENCES audit_events_external_audit_event_destinations(id) ON DELETE CASCADE;
@@ -35044,18 +34883,12 @@ ALTER TABLE ONLY issue_user_mentions
ALTER TABLE ONLY namespace_settings
ADD CONSTRAINT fk_rails_3896d4fae5 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY self_managed_prometheus_alert_events
- ADD CONSTRAINT fk_rails_3936dadc62 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY packages_cleanup_policies
ADD CONSTRAINT fk_rails_393ba98591 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
ALTER TABLE ONLY approval_project_rules_groups
ADD CONSTRAINT fk_rails_396841e79e FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY self_managed_prometheus_alert_events
- ADD CONSTRAINT fk_rails_39d83d1b65 FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY chat_teams
ADD CONSTRAINT fk_rails_3b543909cb FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -35146,9 +34979,6 @@ ALTER TABLE ONLY merge_requests_closing_issues
ALTER TABLE ONLY protected_environment_deploy_access_levels
ADD CONSTRAINT fk_rails_45cc02a931 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY prometheus_alert_events
- ADD CONSTRAINT fk_rails_4675865839 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY smartcard_identities
ADD CONSTRAINT fk_rails_4689f889a9 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
@@ -35176,9 +35006,6 @@ ALTER TABLE ONLY issue_metrics
ALTER TABLE ONLY project_metrics_settings
ADD CONSTRAINT fk_rails_4c6037ee4f FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY prometheus_metrics
- ADD CONSTRAINT fk_rails_4c8957a707 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY dependency_proxy_blob_states
ADD CONSTRAINT fk_rails_4cdbb92cbd FOREIGN KEY (dependency_proxy_blob_id) REFERENCES dependency_proxy_blobs(id) ON DELETE CASCADE;
@@ -35434,9 +35261,6 @@ ALTER TABLE ONLY error_tracking_errors
ALTER TABLE ONLY ml_model_version_metadata
ADD CONSTRAINT fk_rails_6b8fcb2af1 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY prometheus_alerts
- ADD CONSTRAINT fk_rails_6d9b283465 FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY term_agreements
ADD CONSTRAINT fk_rails_6ea6520e4a FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
@@ -35938,9 +35762,6 @@ ALTER TABLE ONLY merge_trains
ALTER TABLE ONLY board_project_recent_visits
ADD CONSTRAINT fk_rails_b315dd0c80 FOREIGN KEY (board_id) REFERENCES boards(id) ON DELETE CASCADE;
-ALTER TABLE ONLY issues_prometheus_alert_events
- ADD CONSTRAINT fk_rails_b32edb790f FOREIGN KEY (prometheus_alert_event_id) REFERENCES prometheus_alert_events(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY merge_trains
ADD CONSTRAINT fk_rails_b374b5225d FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
@@ -36133,9 +35954,6 @@ ALTER TABLE ONLY vulnerability_finding_links
ALTER TABLE ONLY namespace_details
ADD CONSTRAINT fk_rails_cc11a451f8 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY issues_self_managed_prometheus_alert_events
- ADD CONSTRAINT fk_rails_cc5d88bbb0 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY operations_strategies_user_lists
ADD CONSTRAINT fk_rails_ccb7e4bc0b FOREIGN KEY (user_list_id) REFERENCES operations_user_lists(id) ON DELETE CASCADE;
@@ -36226,9 +36044,6 @@ ALTER TABLE ONLY jira_imports
ALTER TABLE ONLY dependency_proxy_blobs
ADD CONSTRAINT fk_rails_db58bbc5d7 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY issues_prometheus_alert_events
- ADD CONSTRAINT fk_rails_db5b756534 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY board_user_preferences
ADD CONSTRAINT fk_rails_dbebdaa8fe FOREIGN KEY (board_id) REFERENCES boards(id) ON DELETE CASCADE;
@@ -36322,9 +36137,6 @@ ALTER TABLE ONLY software_license_policies
ALTER TABLE ONLY approval_merge_request_rule_sources
ADD CONSTRAINT fk_rails_e605a04f76 FOREIGN KEY (approval_merge_request_rule_id) REFERENCES approval_merge_request_rules(id) ON DELETE CASCADE;
-ALTER TABLE ONLY prometheus_alerts
- ADD CONSTRAINT fk_rails_e6351447ec FOREIGN KEY (prometheus_metric_id) REFERENCES prometheus_metrics(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY merge_request_metrics
ADD CONSTRAINT fk_rails_e6d7c24d1b FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
@@ -36415,9 +36227,6 @@ ALTER TABLE ONLY dast_pre_scan_verifications
ALTER TABLE ONLY analytics_dashboards_pointers
ADD CONSTRAINT fk_rails_f0e7c640c3 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY prometheus_alerts
- ADD CONSTRAINT fk_rails_f0e8db86aa FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY import_export_uploads
ADD CONSTRAINT fk_rails_f129140f9e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -36466,9 +36275,6 @@ ALTER TABLE ONLY design_user_mentions
ALTER TABLE ONLY internal_ids
ADD CONSTRAINT fk_rails_f7d46b66c6 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY issues_self_managed_prometheus_alert_events
- ADD CONSTRAINT fk_rails_f7db2d72eb FOREIGN KEY (self_managed_prometheus_alert_event_id) REFERENCES self_managed_prometheus_alert_events(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY security_trainings
ADD CONSTRAINT fk_rails_f80240fae0 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE NOT VALID;
diff --git a/doc/administration/self_hosted_models/install_infrastructure.md b/doc/administration/self_hosted_models/install_infrastructure.md
index e262f1ec2ba..ac304adb9d1 100644
--- a/doc/administration/self_hosted_models/install_infrastructure.md
+++ b/doc/administration/self_hosted_models/install_infrastructure.md
@@ -108,9 +108,9 @@ model_list:
api_base: YOUR_HOSTING_SERVER
```
-## Step 2: Install the GitLab AI Gateway
+## Step 2: Install the GitLab AI Gateway via Docker or Helm chart
-### Install by using Docker
+## Install by using Docker
Prerequisites:
@@ -130,7 +130,7 @@ permissions, and potentially other unknown issues. If you are trying to run on D
for Windows, see the [getting help page](https://about.gitlab.com/get-help/) for links
to community resources (such as IRC or forums) to seek help from other users.
-#### Set up the volumes location
+### Set up the volumes location
Create a directory where the logs will reside on the Docker host. It can be under your user's home directory (for example
`~/gitlab-agw`), or in a directory like `/srv/gitlab-agw`. To create that directory, run:
@@ -239,7 +239,7 @@ should open the AI Gateway API documentation.
After starting the container, visit `gitlab-aigw.example.com`. It might take
a while before the Docker container starts to respond to queries.
-## Upgrade the AI Gateway
+### Upgrade the AI Gateway Docker image
To upgrade the AI Gateway, download the newest Docker image tag.
@@ -269,9 +269,9 @@ To upgrade the AI Gateway, download the newest Docker image tag.
1. Ensure that the environment variables are all set correctly
-### Install by using the AI Gateway Helm chart
+## Install by using the AI Gateway Helm chart
-#### Prerequisites
+### Prerequisites
To complete this guide, you must have the following:
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index d08594f6401..7c41d3a9be9 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -22323,6 +22323,8 @@ Describes an external status check.
| `active` | [`Boolean!`](#boolean) | Whether the feature flag is active. |
| `id` | [`OperationsFeatureFlagID!`](#operationsfeatureflagid) | Global ID of the feature flag. |
| `name` | [`String!`](#string) | Name of the feature flag. |
+| `path` | [`String!`](#string) | Path to feature flag. |
+| `reference` | [`String!`](#string) | Reference to feature flag. |
### `FileUpload`
diff --git a/lib/gitlab/git_post_receive.rb b/lib/gitlab/git_post_receive.rb
index 4e0cf6e0fc8..dea3852e095 100644
--- a/lib/gitlab/git_post_receive.rb
+++ b/lib/gitlab/git_post_receive.rb
@@ -3,6 +3,7 @@
module Gitlab
class GitPostReceive
include Gitlab::Identifier
+
attr_reader :container, :identifier, :changes, :push_options
def initialize(container, identifier, changes, push_options = {})
diff --git a/lib/gitlab/prometheus_client.rb b/lib/gitlab/prometheus_client.rb
index a5584455a6d..9507c0ab186 100644
--- a/lib/gitlab/prometheus_client.rb
+++ b/lib/gitlab/prometheus_client.rb
@@ -4,6 +4,7 @@ module Gitlab
# Helper methods to interact with Prometheus network services & resources
class PrometheusClient
include Gitlab::Utils::StrongMemoize
+
Error = Class.new(StandardError)
ConnectionError = Class.new(Gitlab::PrometheusClient::Error)
UnexpectedResponseError = Class.new(Gitlab::PrometheusClient::Error)
diff --git a/lib/gitlab/spamcheck/result.rb b/lib/gitlab/spamcheck/result.rb
index 7cf6b020bf5..6604529a2cf 100644
--- a/lib/gitlab/spamcheck/result.rb
+++ b/lib/gitlab/spamcheck/result.rb
@@ -4,6 +4,7 @@ module Gitlab
module Spamcheck
class Result
include ::Spam::SpamConstants
+
attr_reader :response
VERDICT_MAPPING = {
diff --git a/lib/gitlab/user_access_snippet.rb b/lib/gitlab/user_access_snippet.rb
index 3d1ec800091..49cdad18843 100644
--- a/lib/gitlab/user_access_snippet.rb
+++ b/lib/gitlab/user_access_snippet.rb
@@ -4,6 +4,7 @@ module Gitlab
class UserAccessSnippet < UserAccess
extend ::Gitlab::Utils::Override
extend ::Gitlab::Cache::RequestCache
+
# TODO: apply override check https://gitlab.com/gitlab-org/gitlab/issues/205677
request_cache_key do
diff --git a/lib/gitlab/view/presenter/delegated.rb b/lib/gitlab/view/presenter/delegated.rb
index fe8cc8e00d0..d0f015ee370 100644
--- a/lib/gitlab/view/presenter/delegated.rb
+++ b/lib/gitlab/view/presenter/delegated.rb
@@ -11,6 +11,7 @@ module Gitlab
# See https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/presenters/README.md#validate-accidental-overrides
# for more information.
include Gitlab::View::Presenter::Base
+
delegator_override_with Gitlab::Routing.url_helpers
delegator_override :can?
delegator_override :can_all?
diff --git a/lib/system_check/incoming_email/mail_room_enabled_check.rb b/lib/system_check/incoming_email/mail_room_enabled_check.rb
index 8e725aabd03..49b788f1cc5 100644
--- a/lib/system_check/incoming_email/mail_room_enabled_check.rb
+++ b/lib/system_check/incoming_email/mail_room_enabled_check.rb
@@ -4,6 +4,7 @@ module SystemCheck
module IncomingEmail
class MailRoomEnabledCheck < SystemCheck::BaseCheck
include ::SystemCheck::InitHelpers
+
set_name 'Mailroom enabled?'
def skip?
diff --git a/lib/system_check/incoming_email/mail_room_running_check.rb b/lib/system_check/incoming_email/mail_room_running_check.rb
index 5235e4a9977..57d8af75455 100644
--- a/lib/system_check/incoming_email/mail_room_running_check.rb
+++ b/lib/system_check/incoming_email/mail_room_running_check.rb
@@ -4,6 +4,7 @@ module SystemCheck
module IncomingEmail
class MailRoomRunningCheck < SystemCheck::BaseCheck
include ::SystemCheck::InitHelpers
+
set_name 'MailRoom running?'
def skip?
diff --git a/qa/qa/page/organization/new.rb b/qa/qa/page/organization/new.rb
index c72a3e6d1b4..ccf5532616b 100644
--- a/qa/qa/page/organization/new.rb
+++ b/qa/qa/page/organization/new.rb
@@ -5,6 +5,7 @@ module QA
module Organization
class New < QA::Page::Base
include QA::Page::Component::Dropdown
+
view 'app/assets/javascripts/organizations/shared/components/new_edit_form.vue' do
element 'organization-name'
element 'submit-button'
diff --git a/qa/qa/page/organization/show.rb b/qa/qa/page/organization/show.rb
index 402d481bd0a..2b559c7678b 100644
--- a/qa/qa/page/organization/show.rb
+++ b/qa/qa/page/organization/show.rb
@@ -5,6 +5,7 @@ module QA
module Organization
class Show < QA::Page::Base
include QA::Page::Component::Dropdown
+
view 'app/assets/javascripts/organizations/show/components/organization_avatar.vue' do
element 'organization-name'
end
diff --git a/qa/qa/page/project/issue/show.rb b/qa/qa/page/project/issue/show.rb
index e9a71c261bc..6e7f1f95aa0 100644
--- a/qa/qa/page/project/issue/show.rb
+++ b/qa/qa/page/project/issue/show.rb
@@ -9,6 +9,7 @@ module QA
include Page::Component::DesignManagement
include Page::Component::Issuable::Sidebar
include Page::Component::Issuable::Common
+
# We need to check phone_layout? instead of mobile_layout? here
# since tablets have the regular top navigation bar
prepend Mobile::Page::Project::Issue::Show if Runtime::Env.phone_layout?
diff --git a/qa/qa/page/project/snippet/new.rb b/qa/qa/page/project/snippet/new.rb
index a4b39b1ab8f..2534f4939fc 100644
--- a/qa/qa/page/project/snippet/new.rb
+++ b/qa/qa/page/project/snippet/new.rb
@@ -7,6 +7,7 @@ module QA
class New < Page::Base
include Page::Component::NewSnippet
include Component::LazyLoader
+
view 'app/views/shared/empty_states/_snippets.html.haml' do
element 'create-first-snippet-link'
element 'snippets-empty-state'
diff --git a/qa/qa/resource/base.rb b/qa/qa/resource/base.rb
index 373ba93b9dc..eebc4daf503 100644
--- a/qa/qa/resource/base.rb
+++ b/qa/qa/resource/base.rb
@@ -8,6 +8,7 @@ module QA
class Base
include ApiFabricator
extend Capybara::DSL
+
using Rainbow
NoValueError = Class.new(RuntimeError)
diff --git a/qa/qa/scenario/test/instance/airgapped.rb b/qa/qa/scenario/test/instance/airgapped.rb
index 1d4d57b342e..5a4ad9aad9a 100644
--- a/qa/qa/scenario/test/instance/airgapped.rb
+++ b/qa/qa/scenario/test/instance/airgapped.rb
@@ -7,6 +7,7 @@ module QA
class Airgapped < Template
include Bootable
include SharedAttributes
+
def perform(address, *rspec_options)
Runtime::Scenario.define(:network, 'airgapped')
diff --git a/spec/db/schema_spec.rb b/spec/db/schema_spec.rb
index 99e3437b1d5..46571efd187 100644
--- a/spec/db/schema_spec.rb
+++ b/spec/db/schema_spec.rb
@@ -45,6 +45,7 @@ RSpec.describe 'Database schema', feature_category: :database do
# See: https://docs.gitlab.com/ee/development/migration_style_guide.html#dropping-a-database-table
REMOVED_FKS = {
# example_table: %w[example_column]
+ alert_management_alerts: %w[prometheus_alert_id]
}.with_indifferent_access.freeze
# List of columns historically missing a FK, don't add more columns
diff --git a/spec/features/callouts/registration_enabled_spec.rb b/spec/features/callouts/registration_enabled_spec.rb
index 4cd5cb9a857..89bd91f8018 100644
--- a/spec/features/callouts/registration_enabled_spec.rb
+++ b/spec/features/callouts/registration_enabled_spec.rb
@@ -43,14 +43,16 @@ RSpec.describe 'Registration enabled callout', feature_category: :system_access
before do
visit admin_root_path
- find_by_testid('close-registration-enabled-callout').click
+ within('body.page-initialised') do
+ find_by_testid('close-registration-enabled-callout').click
+ end
wait_for_requests
visit root_dashboard_path
end
- it 'does not display callout', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/391192' do
+ it 'does not display callout' do
expect(page).not_to have_content callout_title
end
end
diff --git a/spec/migrations/20240812081354_add_email_participants_widget_to_work_item_types_spec.rb b/spec/migrations/20240812081354_add_email_participants_widget_to_work_item_types_spec.rb
deleted file mode 100644
index 8f599dd3d26..00000000000
--- a/spec/migrations/20240812081354_add_email_participants_widget_to_work_item_types_spec.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe AddEmailParticipantsWidgetToWorkItemTypes, :migration, feature_category: :team_planning do
- it_behaves_like 'migration that adds widget to work items definitions',
- widget_name: described_class::WIDGET_NAME,
- work_item_types: described_class::WORK_ITEM_TYPES,
- namespaced: true
-end
diff --git a/spec/models/operations/feature_flag_spec.rb b/spec/models/operations/feature_flag_spec.rb
index 4a39c5dc234..caf794a55d8 100644
--- a/spec/models/operations/feature_flag_spec.rb
+++ b/spec/models/operations/feature_flag_spec.rb
@@ -154,6 +154,16 @@ RSpec.describe Operations::FeatureFlag do
end
end
+ describe '#path' do
+ let(:namespace) { build(:namespace) }
+ let(:project) { build(:project, namespace: namespace) }
+ let(:feature_flag) { build(:operations_feature_flag, iid: 1, project: project) }
+
+ it 'returns path of the feature flag' do
+ expect(feature_flag.path).to eq "/#{project.full_path}/-/feature_flags/1"
+ end
+ end
+
describe '#hook_attrs' do
it 'includes expected attributes' do
hook_attrs = {
diff --git a/spec/services/merge_requests/update_service_spec.rb b/spec/services/merge_requests/update_service_spec.rb
index cd709c8a6bd..928fc92002f 100644
--- a/spec/services/merge_requests/update_service_spec.rb
+++ b/spec/services/merge_requests/update_service_spec.rb
@@ -693,6 +693,12 @@ RSpec.describe MergeRequests::UpdateService, :mailer, feature_category: :code_re
expect(user3.review_requested_open_merge_requests_count).to eq(0)
end
+ it 'invalidates assignee merge request count cache' do
+ expect(merge_request.assignees).to all(receive(:invalidate_merge_request_cache_counts))
+
+ update_merge_request(reviewer_ids: [user2.id])
+ end
+
it_behaves_like 'triggers GraphQL subscription mergeRequestReviewersUpdated' do
let(:action) { update_merge_request({ reviewer_ids: [user2.id] }) }
end