summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-28 00:09:28 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-28 00:09:28 +0000
commit9b07a0e87250887c6fc30911f84fd7e885f56245 (patch)
tree9d2831af5ee23679d5d715f69c41118c75026f1b
parent441dc12073755df98808a37512062451fa184964 (diff)
downloadgitlab-ce-9b07a0e87250887c6fc30911f84fd7e885f56245.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/mailers/emails/merge_requests.rb6
-rw-r--r--app/serializers/ci/job_entity.rb1
-rw-r--r--app/views/admin/applications/_form.html.haml2
-rw-r--r--app/views/groups/settings/ci_cd/_form.html.haml1
-rw-r--r--db/docs/sbom_component_versions.yml11
-rw-r--r--db/docs/sbom_components.yml11
-rw-r--r--db/migrate/20220616182001_create_sbom_components.rb11
-rw-r--r--db/migrate/20220616182015_create_sbom_component_versions.rb15
-rw-r--r--db/schema_migrations/202206161820011
-rw-r--r--db/schema_migrations/202206161820151
-rw-r--r--db/structure.sql51
-rw-r--r--doc/administration/audit_event_streaming.md6
-rw-r--r--doc/administration/postgresql/external.md17
-rw-r--r--lib/gitlab/database/gitlab_schemas.yml2
-rw-r--r--locale/gitlab.pot6
-rw-r--r--package.json2
-rw-r--r--qa/qa/specs/features/sanity/feature_flags_spec.rb1
-rw-r--r--spec/frontend/vue_shared/components/runner_aws_deployments/__snapshots__/runner_aws_deployments_modal_spec.js.snap4
-rw-r--r--spec/serializers/ci/job_entity_spec.rb4
-rw-r--r--yarn.lock8
20 files changed, 145 insertions, 16 deletions
diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb
index 83d37a365de..6a2b447f4a0 100644
--- a/app/mailers/emails/merge_requests.rb
+++ b/app/mailers/emails/merge_requests.rb
@@ -15,15 +15,15 @@ module Emails
end
# existing_commits - an array containing the first and last commits
- def push_to_merge_request_email(recipient_id, merge_request_id, updated_by_user_id, reason = nil, new_commits: [], total_new_commits_count: nil, existing_commits: [], total_existing_commits_count: nil)
+ def push_to_merge_request_email(recipient_id, merge_request_id, updated_by_user_id, reason = nil, new_commits:, total_new_commits_count:, existing_commits:, total_existing_commits_count:)
setup_merge_request_mail(merge_request_id, recipient_id)
@new_commits = new_commits
- @total_new_commits_count = total_new_commits_count || @new_commits.length
+ @total_new_commits_count = total_new_commits_count
@total_stripped_new_commits_count = @total_new_commits_count - @new_commits.length
@existing_commits = existing_commits
- @total_existing_commits_count = total_existing_commits_count || @existing_commits.length
+ @total_existing_commits_count = total_existing_commits_count
@updated_by_user = User.find(updated_by_user_id)
diff --git a/app/serializers/ci/job_entity.rb b/app/serializers/ci/job_entity.rb
index b6b11e54a16..a865fc99458 100644
--- a/app/serializers/ci/job_entity.rb
+++ b/app/serializers/ci/job_entity.rb
@@ -41,6 +41,7 @@ module Ci
expose :scheduled?, as: :scheduled
expose :scheduled_at, if: -> (*) { scheduled? }
expose :created_at
+ expose :queued_at
expose :updated_at
expose :detailed_status, as: :status, with: DetailedStatusEntity
expose :callout_message, if: -> (*) { failed? && !job.script_failure? }
diff --git a/app/views/admin/applications/_form.html.haml b/app/views/admin/applications/_form.html.haml
index fd73d4c5671..e0926221bcc 100644
--- a/app/views/admin/applications/_form.html.haml
+++ b/app/views/admin/applications/_form.html.haml
@@ -1,5 +1,5 @@
= gitlab_ui_form_for [:admin, @application], url: @url, html: {role: 'form'} do |f|
- = form_errors(application)
+ = form_errors(application, pajamas_alert: true)
= content_tag :div, class: 'form-group row' do
.col-sm-2.col-form-label
diff --git a/app/views/groups/settings/ci_cd/_form.html.haml b/app/views/groups/settings/ci_cd/_form.html.haml
index b6f70879d17..59c67197f81 100644
--- a/app/views/groups/settings/ci_cd/_form.html.haml
+++ b/app/views/groups/settings/ci_cd/_form.html.haml
@@ -1,7 +1,6 @@
.row.gl-mt-3
.col-lg-12
= form_for group, url: group_settings_ci_cd_path(group, anchor: 'js-general-pipeline-settings') do |f|
- = form_errors(group)
%fieldset.builds-feature
.form-group
= f.label :max_artifacts_size, _('Maximum artifacts size'), class: 'label-bold'
diff --git a/db/docs/sbom_component_versions.yml b/db/docs/sbom_component_versions.yml
new file mode 100644
index 00000000000..7fb9b7fcec5
--- /dev/null
+++ b/db/docs/sbom_component_versions.yml
@@ -0,0 +1,11 @@
+---
+table_name: sbom_component_versions
+classes:
+- Sbom::ComponentVersion
+feature_categories:
+- container_scanning
+- dependency_scanning
+- license_compliance
+description: Stores version information for software components produced by a Software Bill of Materials (SBoM)
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90809
+milestone: '15.2'
diff --git a/db/docs/sbom_components.yml b/db/docs/sbom_components.yml
new file mode 100644
index 00000000000..8860c253cd5
--- /dev/null
+++ b/db/docs/sbom_components.yml
@@ -0,0 +1,11 @@
+---
+table_name: sbom_components
+classes:
+- Sbom::Component
+feature_categories:
+- container_scanning
+- dependency_scanning
+- license_compliance
+description: Stores information about software components produced by a Software Bill of Materials (SBoM)
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90809
+milestone: '15.2'
diff --git a/db/migrate/20220616182001_create_sbom_components.rb b/db/migrate/20220616182001_create_sbom_components.rb
new file mode 100644
index 00000000000..59e8e76393a
--- /dev/null
+++ b/db/migrate/20220616182001_create_sbom_components.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class CreateSbomComponents < Gitlab::Database::Migration[2.0]
+ def change
+ create_table :sbom_components do |t|
+ t.timestamps_with_timezone
+ t.integer :component_type, null: false, limit: 2
+ t.text :name, null: false, limit: 255
+ end
+ end
+end
diff --git a/db/migrate/20220616182015_create_sbom_component_versions.rb b/db/migrate/20220616182015_create_sbom_component_versions.rb
new file mode 100644
index 00000000000..aea99c8c0ce
--- /dev/null
+++ b/db/migrate/20220616182015_create_sbom_component_versions.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class CreateSbomComponentVersions < Gitlab::Database::Migration[2.0]
+ def change
+ create_table :sbom_component_versions do |t|
+ t.timestamps_with_timezone
+ t.references :component,
+ index: true,
+ null: false,
+ foreign_key: { to_table: :sbom_components, on_delete: :cascade }
+
+ t.text :version, null: false, limit: 255
+ end
+ end
+end
diff --git a/db/schema_migrations/20220616182001 b/db/schema_migrations/20220616182001
new file mode 100644
index 00000000000..8167bae8550
--- /dev/null
+++ b/db/schema_migrations/20220616182001
@@ -0,0 +1 @@
+7276612cf3f2fd968405c1bb31afe2eafeca3dc9e145f5f4c2e1609a93926e04 \ No newline at end of file
diff --git a/db/schema_migrations/20220616182015 b/db/schema_migrations/20220616182015
new file mode 100644
index 00000000000..00f4825677c
--- /dev/null
+++ b/db/schema_migrations/20220616182015
@@ -0,0 +1 @@
+4c2d89fc0aae46c08fc03018de7fafc9a040fa94284224a89ae626a1ddd2cfa9 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 45f0fc28b8e..69f9a4f93f7 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -20423,6 +20423,42 @@ CREATE SEQUENCE saved_replies_id_seq
ALTER SEQUENCE saved_replies_id_seq OWNED BY saved_replies.id;
+CREATE TABLE sbom_component_versions (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ component_id bigint NOT NULL,
+ version text NOT NULL,
+ CONSTRAINT check_e71cad08d3 CHECK ((char_length(version) <= 255))
+);
+
+CREATE SEQUENCE sbom_component_versions_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE sbom_component_versions_id_seq OWNED BY sbom_component_versions.id;
+
+CREATE TABLE sbom_components (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ component_type smallint NOT NULL,
+ name text NOT NULL,
+ CONSTRAINT check_91a8f6ad53 CHECK ((char_length(name) <= 255))
+);
+
+CREATE SEQUENCE sbom_components_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE sbom_components_id_seq OWNED BY sbom_components.id;
+
CREATE TABLE schema_migrations (
version character varying NOT NULL,
finished_at timestamp with time zone DEFAULT now()
@@ -23316,6 +23352,10 @@ ALTER TABLE ONLY saml_providers ALTER COLUMN id SET DEFAULT nextval('saml_provid
ALTER TABLE ONLY saved_replies ALTER COLUMN id SET DEFAULT nextval('saved_replies_id_seq'::regclass);
+ALTER TABLE ONLY sbom_component_versions ALTER COLUMN id SET DEFAULT nextval('sbom_component_versions_id_seq'::regclass);
+
+ALTER TABLE ONLY sbom_components ALTER COLUMN id SET DEFAULT nextval('sbom_components_id_seq'::regclass);
+
ALTER TABLE ONLY scim_identities ALTER COLUMN id SET DEFAULT nextval('scim_identities_id_seq'::regclass);
ALTER TABLE ONLY scim_oauth_access_tokens ALTER COLUMN id SET DEFAULT nextval('scim_oauth_access_tokens_id_seq'::regclass);
@@ -25497,6 +25537,12 @@ ALTER TABLE ONLY saml_providers
ALTER TABLE ONLY saved_replies
ADD CONSTRAINT saved_replies_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY sbom_component_versions
+ ADD CONSTRAINT sbom_component_versions_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY sbom_components
+ ADD CONSTRAINT sbom_components_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY schema_migrations
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
@@ -29329,6 +29375,8 @@ CREATE INDEX index_saml_providers_on_group_id ON saml_providers USING btree (gro
CREATE UNIQUE INDEX index_saved_replies_on_name_text_pattern_ops ON saved_replies USING btree (user_id, name text_pattern_ops);
+CREATE INDEX index_sbom_component_versions_on_component_id ON sbom_component_versions USING btree (component_id);
+
CREATE INDEX index_scim_identities_on_group_id ON scim_identities USING btree (group_id);
CREATE UNIQUE INDEX index_scim_identities_on_lower_extern_uid_and_group_id ON scim_identities USING btree (lower((extern_uid)::text), group_id);
@@ -32852,6 +32900,9 @@ ALTER TABLE ONLY dependency_proxy_group_settings
ALTER TABLE ONLY group_deploy_tokens
ADD CONSTRAINT fk_rails_61a572b41a FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+ALTER TABLE ONLY sbom_component_versions
+ ADD CONSTRAINT fk_rails_61a83aa892 FOREIGN KEY (component_id) REFERENCES sbom_components(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY status_page_published_incidents
ADD CONSTRAINT fk_rails_61e5493940 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
diff --git a/doc/administration/audit_event_streaming.md b/doc/administration/audit_event_streaming.md
index ad235ead992..0401812331f 100644
--- a/doc/administration/audit_event_streaming.md
+++ b/doc/administration/audit_event_streaming.md
@@ -145,12 +145,12 @@ Destination is deleted if:
## Custom HTTP header values
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/361216) in GitLab 15.1 [with a flag](feature_flags.md) named `streaming_audit_event_headers`. Disabled by default.
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/361216) in GitLab 15.1 [with a flag](feature_flags.md) named `streaming_audit_event_headers`. Disabled by default.
+> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/362941) in GitLab 15.2.
FLAG:
On self-managed GitLab, by default this feature is not available. To make it available per group, ask an administrator to [enable the feature flag](../administration/feature_flags.md) named `streaming_audit_event_headers`.
-On GitLab.com, this feature is not available.
-The feature is not ready for production use.
+On GitLab.com, this feature is available.
Each streaming destination can have up to 20 custom HTTP headers included with each streamed event.
diff --git a/doc/administration/postgresql/external.md b/doc/administration/postgresql/external.md
index 5d693793a92..602abc597c8 100644
--- a/doc/administration/postgresql/external.md
+++ b/doc/administration/postgresql/external.md
@@ -48,3 +48,20 @@ If you use a cloud-managed service, or provide your own PostgreSQL instance:
```shell
sudo gitlab-ctl reconfigure
```
+
+## Troubleshooting
+
+### Resolve `SSL SYSCALL error: EOF detected` error
+
+When using an external PostgreSQL instance, you may see an error like:
+
+```shell
+pg_dump: error: Error message from server: SSL SYSCALL error: EOF detected
+```
+
+To resolve this error, ensure that you are meeting the
+[minimum PostgreSQL requirements](../../install/requirements.md#postgresql-requirements). After
+upgrading your RDS instance to a suitable version, you should be able to perform a backup without
+this error. Refer to issue #64763
+([Segmentation fault citing `LooseForeignKeys::CleanupWorker` causes complete database restart](https://gitlab.com/gitlab-org/gitlab/-/issues/364763))
+for more information.
diff --git a/lib/gitlab/database/gitlab_schemas.yml b/lib/gitlab/database/gitlab_schemas.yml
index 71c323cb393..0085b578102 100644
--- a/lib/gitlab/database/gitlab_schemas.yml
+++ b/lib/gitlab/database/gitlab_schemas.yml
@@ -467,6 +467,8 @@ routes: :gitlab_main
saml_group_links: :gitlab_main
saml_providers: :gitlab_main
saved_replies: :gitlab_main
+sbom_components: :gitlab_main
+sbom_component_versions: :gitlab_main
schema_migrations: :gitlab_internal
scim_identities: :gitlab_main
scim_oauth_access_tokens: :gitlab_main
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 4bbc8d6c76f..306bc42ef78 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -11553,6 +11553,9 @@ msgstr ""
msgid "DastProfiles|Include debug messages in the DAST console output."
msgstr ""
+msgid "DastProfiles|Manage %{profileType} profiles"
+msgstr ""
+
msgid "DastProfiles|Manage profiles"
msgstr ""
@@ -16665,9 +16668,6 @@ msgstr ""
msgid "Geo|Allowed Geo IP should contain valid IP addresses"
msgstr ""
-msgid "Geo|Beta"
-msgstr ""
-
msgid "Geo|Checksummed"
msgstr ""
diff --git a/package.json b/package.json
index c37d0817ae7..70dd0a3f3c8 100644
--- a/package.json
+++ b/package.json
@@ -53,7 +53,7 @@
"@gitlab/at.js": "1.5.7",
"@gitlab/favicon-overlay": "2.0.0",
"@gitlab/svgs": "2.21.0",
- "@gitlab/ui": "42.7.0",
+ "@gitlab/ui": "42.9.0",
"@gitlab/visual-review-tools": "1.7.3",
"@rails/actioncable": "6.1.4-7",
"@rails/ujs": "6.1.4-7",
diff --git a/qa/qa/specs/features/sanity/feature_flags_spec.rb b/qa/qa/specs/features/sanity/feature_flags_spec.rb
index 9af7628debb..f771978802e 100644
--- a/qa/qa/specs/features/sanity/feature_flags_spec.rb
+++ b/qa/qa/specs/features/sanity/feature_flags_spec.rb
@@ -21,6 +21,7 @@ module QA
describe 'feature flag definition files' do
let(:file) do
path = Pathname.new("#{root}/config/feature_flags/development").expand_path(Runtime::Path.qa_root)
+ path.mkpath
Tempfile.new(%w[ff-test .yml], path)
end
diff --git a/spec/frontend/vue_shared/components/runner_aws_deployments/__snapshots__/runner_aws_deployments_modal_spec.js.snap b/spec/frontend/vue_shared/components/runner_aws_deployments/__snapshots__/runner_aws_deployments_modal_spec.js.snap
index 8ff49271eb5..2ea8985b16a 100644
--- a/spec/frontend/vue_shared/components/runner_aws_deployments/__snapshots__/runner_aws_deployments_modal_spec.js.snap
+++ b/spec/frontend/vue_shared/components/runner_aws_deployments/__snapshots__/runner_aws_deployments_modal_spec.js.snap
@@ -42,6 +42,7 @@ exports[`RunnerAwsDeploymentsModal renders the modal 1`] = `
>
<gl-accordion-item-stub
class="gl-font-weight-normal"
+ headerclass=""
title="More Details"
titlevisible="Less Details"
>
@@ -76,6 +77,7 @@ exports[`RunnerAwsDeploymentsModal renders the modal 1`] = `
>
<gl-accordion-item-stub
class="gl-font-weight-normal"
+ headerclass=""
title="More Details"
titlevisible="Less Details"
>
@@ -110,6 +112,7 @@ exports[`RunnerAwsDeploymentsModal renders the modal 1`] = `
>
<gl-accordion-item-stub
class="gl-font-weight-normal"
+ headerclass=""
title="More Details"
titlevisible="Less Details"
>
@@ -144,6 +147,7 @@ exports[`RunnerAwsDeploymentsModal renders the modal 1`] = `
>
<gl-accordion-item-stub
class="gl-font-weight-normal"
+ headerclass=""
title="More Details"
titlevisible="Less Details"
>
diff --git a/spec/serializers/ci/job_entity_spec.rb b/spec/serializers/ci/job_entity_spec.rb
index 05b9e38444c..bd7e2023765 100644
--- a/spec/serializers/ci/job_entity_spec.rb
+++ b/spec/serializers/ci/job_entity_spec.rb
@@ -52,6 +52,10 @@ RSpec.describe Ci::JobEntity do
expect(subject[:status]).to include :icon, :favicon, :text, :label, :tooltip
end
+ it 'contains queued_at' do
+ expect(subject).to include :queued_at
+ end
+
context 'when job is retryable' do
before do
job.update!(status: :failed)
diff --git a/yarn.lock b/yarn.lock
index 0c6f99328c1..413219ac652 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1048,10 +1048,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-2.21.0.tgz#bc71951dc35a61647fb2c0267cca6fb55a04d317"
integrity sha512-cVa5cgvVmY2MsRdV61id+rLTsY/tAGPq7Og9ETblUuZXl06ciw8H/g7cYPMxN39DdEfDklzbUnS98OJlMmD9TQ==
-"@gitlab/ui@42.7.0":
- version "42.7.0"
- resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-42.7.0.tgz#70e53399d78a2720aa035605c6b194e9352e24c0"
- integrity sha512-dsKkjUOvPsu+TzXAe0EOQJrWVrwrYViJ9loCjslweOYJ4wxgukqLpMIQCDCgDTHMdGzjUWENvF98Xle7Vkfl2g==
+"@gitlab/ui@42.9.0":
+ version "42.9.0"
+ resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-42.9.0.tgz#506a642b9bef9eb5d363684c8ef81129a9b284ef"
+ integrity sha512-i575fmHOXYPGWdaaSqt7cdgpfhPvnbIwhavslgbj9g9LNzffH7fea4P6BobKakb1AZuOfahJfarqfOJ2pYuRSQ==
dependencies:
"@popperjs/core" "^2.11.2"
bootstrap-vue "2.20.1"