Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-24 03:11:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-24 03:11:34 +0300
commit01f651480ea15716ad217cae60104843cbe3aa45 (patch)
tree68f44eeec6aa76a5d9df0caca23171be979562ad
parent96855c4214715fe718c02a308ddd0e4a3265b5d1 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--CHANGELOG.md6
-rw-r--r--db/post_migrate/20210922025631_drop_int4_column_for_ci_sources_pipelines.rb9
-rw-r--r--db/post_migrate/20210922084115_concurrent_index_resource_group_status_commit_id_for_ci_builds.rb22
-rw-r--r--db/schema_migrations/202109220256311
-rw-r--r--db/schema_migrations/202109220841151
-rw-r--r--db/structure.sql3
-rw-r--r--doc/administration/geo/replication/security_review.md2
-rw-r--r--spec/migrations/20210922025631_drop_int4_column_for_ci_sources_pipelines_spec.rb21
8 files changed, 63 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 20a0ac86e0f..5dabc7735f7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1726,6 +1726,12 @@ entry.
- [Remove diffs gradual load feature flag](gitlab-org/gitlab@027d7c4327b5b6205a84281239027273517bf81b) ([merge request](gitlab-org/gitlab!55478))
- [Remove partial index for Hashed Storage migration](gitlab-org/gitlab@3ed017a1023d7b0941a7606b69e6caee8d22f15c) ([merge request](gitlab-org/gitlab!62920))
+## 14.0.11 (2021-09-23)
+
+### Fixed (1 change)
+
+- [Fix Elastic::MigrationWorker current_migration](gitlab-org/gitlab@0b72aace30bff0fda7a114862ec1e389ddaa5ead) ([merge request](gitlab-org/gitlab!71101)) **GitLab Enterprise Edition**
+
## 14.0.10 (2021-09-02)
No changes.
diff --git a/db/post_migrate/20210922025631_drop_int4_column_for_ci_sources_pipelines.rb b/db/post_migrate/20210922025631_drop_int4_column_for_ci_sources_pipelines.rb
new file mode 100644
index 00000000000..b25f1d88736
--- /dev/null
+++ b/db/post_migrate/20210922025631_drop_int4_column_for_ci_sources_pipelines.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class DropInt4ColumnForCiSourcesPipelines < Gitlab::Database::Migration[1.0]
+ enable_lock_retries!
+
+ def change
+ remove_column :ci_sources_pipelines, :source_job_id_convert_to_bigint, :integer
+ end
+end
diff --git a/db/post_migrate/20210922084115_concurrent_index_resource_group_status_commit_id_for_ci_builds.rb b/db/post_migrate/20210922084115_concurrent_index_resource_group_status_commit_id_for_ci_builds.rb
new file mode 100644
index 00000000000..922a9b64b55
--- /dev/null
+++ b/db/post_migrate/20210922084115_concurrent_index_resource_group_status_commit_id_for_ci_builds.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+class ConcurrentIndexResourceGroupStatusCommitIdForCiBuilds < Gitlab::Database::Migration[1.0]
+ INDEX_NAME = 'index_ci_builds_on_resource_group_and_status_and_commit_id'
+
+ disable_ddl_transaction!
+
+ # Indexes were pre-created on gitlab.com to avoid slowing down deployments
+ # See: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70279
+
+ # rubocop: disable Migration/PreventIndexCreation
+ def up
+ add_concurrent_index :ci_builds, [:resource_group_id, :status, :commit_id],
+ where: 'resource_group_id IS NOT NULL',
+ name: INDEX_NAME
+ end
+ # rubocop: enable Migration/PreventIndexCreation
+
+ def down
+ remove_concurrent_index_by_name :ci_builds, INDEX_NAME
+ end
+end
diff --git a/db/schema_migrations/20210922025631 b/db/schema_migrations/20210922025631
new file mode 100644
index 00000000000..217c1d9da25
--- /dev/null
+++ b/db/schema_migrations/20210922025631
@@ -0,0 +1 @@
+43b02083323765888f019386138e8fbaa3182d74bd5e8790d6fae6ea6f0a2104 \ No newline at end of file
diff --git a/db/schema_migrations/20210922084115 b/db/schema_migrations/20210922084115
new file mode 100644
index 00000000000..7870576c40e
--- /dev/null
+++ b/db/schema_migrations/20210922084115
@@ -0,0 +1 @@
+6401de932d87b684c8a00254231312f8633c66a8ea96670b2761442c771d3d7f \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index b91b6afddf9..0d8014e1e0b 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -11992,7 +11992,6 @@ CREATE TABLE ci_sources_pipelines (
project_id integer,
pipeline_id integer,
source_project_id integer,
- source_job_id_convert_to_bigint integer,
source_pipeline_id integer,
source_job_id bigint
);
@@ -24439,6 +24438,8 @@ CREATE INDEX index_ci_builds_on_project_id_for_successfull_pages_deploy ON ci_bu
CREATE INDEX index_ci_builds_on_queued_at ON ci_builds USING btree (queued_at);
+CREATE INDEX index_ci_builds_on_resource_group_and_status_and_commit_id ON ci_builds USING btree (resource_group_id, status, commit_id) WHERE (resource_group_id IS NOT NULL);
+
CREATE INDEX index_ci_builds_on_runner_id_and_id_desc ON ci_builds USING btree (runner_id, id DESC);
CREATE INDEX index_ci_builds_on_stage_id ON ci_builds USING btree (stage_id);
diff --git a/doc/administration/geo/replication/security_review.md b/doc/administration/geo/replication/security_review.md
index 966902a3d74..df893298f85 100644
--- a/doc/administration/geo/replication/security_review.md
+++ b/doc/administration/geo/replication/security_review.md
@@ -26,7 +26,7 @@ from [owasp.org](https://owasp.org/).
- Geo streams almost all data held by a GitLab instance between sites. This
includes full database replication, most files (user-uploaded attachments,
- etc) and repository + wiki data. In a typical configuration, this will
+ and so on) and repository + wiki data. In a typical configuration, this will
happen across the public Internet, and be TLS-encrypted.
- PostgreSQL replication is TLS-encrypted.
- See also: [only TLSv1.2 should be supported](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/2948)
diff --git a/spec/migrations/20210922025631_drop_int4_column_for_ci_sources_pipelines_spec.rb b/spec/migrations/20210922025631_drop_int4_column_for_ci_sources_pipelines_spec.rb
new file mode 100644
index 00000000000..00b922ee4f8
--- /dev/null
+++ b/spec/migrations/20210922025631_drop_int4_column_for_ci_sources_pipelines_spec.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+require_migration!('drop_int4_column_for_ci_sources_pipelines')
+
+RSpec.describe DropInt4ColumnForCiSourcesPipelines do
+ let(:ci_sources_pipelines) { table(:ci_sources_pipelines) }
+
+ it 'correctly migrates up and down' do
+ reversible_migration do |migration|
+ migration.before -> {
+ expect(ci_sources_pipelines.column_names).to include('source_job_id_convert_to_bigint')
+ }
+
+ migration.after -> {
+ ci_sources_pipelines.reset_column_information
+ expect(ci_sources_pipelines.column_names).not_to include('source_job_id_convert_to_bigint')
+ }
+ end
+ end
+end