Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-06-28 00:09:28 +00:00
parent 441dc12073
commit 9b07a0e872
20 changed files with 145 additions and 16 deletions

View file

@ -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)

View file

@ -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? }

View file

@ -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

View file

@ -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'

View file

@ -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'

View file

@ -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'

View file

@ -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

View file

@ -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

View file

@ -0,0 +1 @@
7276612cf3f2fd968405c1bb31afe2eafeca3dc9e145f5f4c2e1609a93926e04

View file

@ -0,0 +1 @@
4c2d89fc0aae46c08fc03018de7fafc9a040fa94284224a89ae626a1ddd2cfa9

View file

@ -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;

View file

@ -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.

View file

@ -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.

View file

@ -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

View file

@ -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 ""

View file

@ -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",

View file

@ -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

View file

@ -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"
>

View file

@ -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)

View file

@ -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"