Skip to content

Commit 701773d

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 1343550 commit 701773d

File tree

41 files changed

+480
-211
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+480
-211
lines changed

.rubocop_todo/style/inline_disable_annotation.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2416,7 +2416,6 @@ Style/InlineDisableAnnotation:
24162416
- 'metrics_server/override_gitlab_current_settings.rb'
24172417
- 'metrics_server/override_rails_constants.rb'
24182418
- 'metrics_server/settings_overrides.rb'
2419-
- 'qa/chemlab-library-gitlab.gemspec'
24202419
- 'qa/qa/ee/page/admin/subscription.rb'
24212420
- 'qa/qa/ee/page/main/banner.rb'
24222421
- 'qa/qa/ee/page/project/monitor/on_call_schedule/index.rb'

CHANGELOG.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22
documentation](doc/development/changelog.md) for instructions on adding your own
33
entry.
44

5+
## 17.3.1 (2024-08-20)
6+
7+
### Fixed (3 changes)
8+
9+
- [Merge branch '444926-fix-bug-in-resolve-vulnerabilities-migration' into 'master'](https://gitlab.com/gitlab-org/security/gitlab/-/commit/ac8a0cdc00b76c5ad84e8d18f3a7e49ebea2a538)
10+
- [Turn NotFound from Gitaly into 404 for InfoRefs](https://gitlab.com/gitlab-org/security/gitlab/-/commit/3566c2625d62857246b215e191fb137091de1650)
11+
- [Fix timeout when checking group dependencies](https://gitlab.com/gitlab-org/security/gitlab/-/commit/3f3bdb24b185196875a3989f0378d237243e80f6) **GitLab Enterprise Edition**
12+
13+
### Changed (1 change)
14+
15+
- [Include language server version in code suggestions](https://gitlab.com/gitlab-org/security/gitlab/-/commit/5b4b98955c5fa55911631800c3cd48f6224bf664) **GitLab Enterprise Edition**
16+
17+
### Security (4 changes)
18+
19+
- [Do not run pipelines when resolving vulnerability](https://gitlab.com/gitlab-org/security/gitlab/-/commit/ef9c251b19c1ad7aedb591870158fc0085ee5fd9) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4360))
20+
- [Add Octokit::ResponseValidation middleware](https://gitlab.com/gitlab-org/security/gitlab/-/commit/08d547262c574b00135fb71105e52f03dc3ca8c0) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4375))
21+
- [IP restriction to prevent all group permissions](https://gitlab.com/gitlab-org/security/gitlab/-/commit/e080f2d2c5a578df52f202505e993c560fec6cb2) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4368))
22+
- [Destroy associated releases when removing a tag via Git CLI](https://gitlab.com/gitlab-org/security/gitlab/-/commit/b79ada987b82fa756e6ae74f7527dcde8c30d08f) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4365))
23+
524
## 17.3.0 (2024-08-14)
625

726
### Added (143 changes)
@@ -727,6 +746,35 @@ entry.
727746
- [Dynamically gets the column type for assertion](https://gitlab.com/gitlab-org/gitlab/-/commit/1389a3daffd104925cce71776903cbf527723222) ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/159099))
728747
- [Quarantine a flaky test](https://gitlab.com/gitlab-org/gitlab/-/commit/c94fca35b909440ec66ea35c97ab11aa847dde58) ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/158180))
729748

749+
## 17.2.4 (2024-08-21)
750+
751+
### Security (1 change)
752+
753+
- [Always build assets image when tagging](https://gitlab.com/gitlab-org/security/gitlab/-/commit/d0e661baad53be4fb7eef3b530b544d05a609953) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4386))
754+
755+
## 17.2.3 (2024-08-20)
756+
757+
### Fixed (3 changes)
758+
759+
- [Turn NotFound from Gitaly into 404 for InfoRefs](https://gitlab.com/gitlab-org/security/gitlab/-/commit/cdd5159fa1f8259dbf92333cf13a2968e814d307)
760+
- [Fix empty dependency list page](https://gitlab.com/gitlab-org/security/gitlab/-/commit/71fc48e515cffcbc46ad4f824dc1990a0eb3b08a) **GitLab Enterprise Edition**
761+
- [Properly handle empty repository.ff_merge in FromTrainRef merge strategy](https://gitlab.com/gitlab-org/security/gitlab/-/commit/63c5e1ce261f03549f19a36867ed83cd928a2c5f) **GitLab Enterprise Edition**
762+
763+
### Changed (1 change)
764+
765+
- [Include language server version in code suggestions](https://gitlab.com/gitlab-org/security/gitlab/-/commit/c9c47052794e5d5bfc86d78c5fdd91c4b910a8b8) **GitLab Enterprise Edition**
766+
767+
### Security (4 changes)
768+
769+
- [Do not run pipelines when resolving vulnerability](https://gitlab.com/gitlab-org/security/gitlab/-/commit/4a8fa8c6fd40731c93986e54f56d6b581f4dfa92) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4307))
770+
- [Add Octokit::ResponseValidation middleware](https://gitlab.com/gitlab-org/security/gitlab/-/commit/f8cf13d24a0f5aa07c0236238b2a3d61d82615e9) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4376))
771+
- [IP restriction to prevent all group permissions](https://gitlab.com/gitlab-org/security/gitlab/-/commit/4b540bf88e05c7e39803652bdbba8978c74ebab6) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4340))
772+
- [Destroy associated releases when removing a tag via Git CLI](https://gitlab.com/gitlab-org/security/gitlab/-/commit/bb033e98e00bc242a92d7091406f7c91e98a3079) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4366))
773+
774+
### Other (1 change)
775+
776+
- [Check if columns exist before running credit card hashing migration](https://gitlab.com/gitlab-org/security/gitlab/-/commit/f6b7ac482714a0da707cab36e685378d5067d891)
777+
730778
## 17.2.2 (2024-08-06)
731779

732780
### Fixed (2 changes)
@@ -1548,6 +1596,29 @@ entry.
15481596
- [Remove "use_remote_mirror_destroy_service" feature flag](https://gitlab.com/gitlab-org/gitlab/-/commit/74e1e921d003960afd6f259384aee2dfec18f30e) ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/155852))
15491597
- [Protected containers: Cleanup renaming of protected_up_to_access_level](https://gitlab.com/gitlab-org/gitlab/-/commit/4606b5ef64f75acdd581258a0b93034195626e83) by @gerardo-navarro ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/146177))
15501598

1599+
## 17.1.6 (2024-08-21)
1600+
1601+
### Security (1 change)
1602+
1603+
- [Always build assets image when tagging](https://gitlab.com/gitlab-org/security/gitlab/-/commit/b10a04aa687e6fbdf6c26b5756dcbb3748728e9a) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4385))
1604+
1605+
## 17.1.5 (2024-08-20)
1606+
1607+
### Fixed (1 change)
1608+
1609+
- [Properly handle empty repository.ff_merge in FromTrainRef merge strategy](https://gitlab.com/gitlab-org/security/gitlab/-/commit/b3fa341da06a3cbec69e2c32c5b3a336fcba6df7) **GitLab Enterprise Edition**
1610+
1611+
### Changed (1 change)
1612+
1613+
- [Include language server version in code suggestions](https://gitlab.com/gitlab-org/security/gitlab/-/commit/02b9f967f7f68865d6dfcfd550e9967689239791) **GitLab Enterprise Edition**
1614+
1615+
### Security (4 changes)
1616+
1617+
- [Do not run pipelines when resolving vulnerability](https://gitlab.com/gitlab-org/security/gitlab/-/commit/b962ee1ac8f2ab653435937008c5c4d869aa17f8) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4308))
1618+
- [Add Octokit::ResponseValidation middleware](https://gitlab.com/gitlab-org/security/gitlab/-/commit/f0483d356530afafa070302e50f34a12634b28a8) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4377))
1619+
- [IP restriction to prevent all group permissions](https://gitlab.com/gitlab-org/security/gitlab/-/commit/aecd6dd35b1bfd45d1cb7442afc9a9bf312310b6) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4341))
1620+
- [Destroy associated releases when removing a tag via Git CLI](https://gitlab.com/gitlab-org/security/gitlab/-/commit/7478a869a7a2722377da289a6b16d77b608ccfc2) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4367))
1621+
15511622
## 17.1.4 (2024-08-06)
15521623

15531624
### Changed (2 changes)

app/assets/javascripts/work_items/components/shared/work_item_more_actions.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
GlToggle,
77
} from '@gitlab/ui';
88
import { s__ } from '~/locale';
9+
import { InternalEvents } from '~/tracking';
910
import { workItemRoadmapPath } from '../../utils';
1011
import { WORK_ITEM_TYPE_ENUM_EPIC } from '../../constants';
1112
@@ -22,6 +23,7 @@ export default {
2223
directives: {
2324
GlTooltip: GlTooltipDirective,
2425
},
26+
mixins: [InternalEvents.mixin()],
2527
props: {
2628
workItemIid: {
2729
type: String,
@@ -113,7 +115,11 @@ export default {
113115
</template>
114116
</gl-disclosure-dropdown-item>
115117

116-
<gl-disclosure-dropdown-item v-if="shouldShowViewRoadmapAction" :item="viewOnARoadmap" />
118+
<gl-disclosure-dropdown-item
119+
v-if="shouldShowViewRoadmapAction"
120+
:item="viewOnARoadmap"
121+
@action="trackEvent('view_epic_on_roadmap')"
122+
/>
117123
</gl-disclosure-dropdown>
118124
</div>
119125
</template>

app/models/commit_status.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class CommitStatus < Ci::ApplicationRecord
5050
validates :name, presence: true, unless: :importing?
5151
validates :ci_stage, presence: true, on: :create, unless: :importing?
5252
validates :ref, :target_url, :description, length: { maximum: 255 }
53-
validates :project, presence: true, on: :create
53+
validates :project, presence: true
5454

5555
alias_attribute :author, :user
5656
alias_attribute :pipeline_id, :commit_id

app/services/git/tag_push_service.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,20 @@ def execute
1010
project.repository.before_push_tag
1111
TagHooksService.new(project, current_user, params).execute
1212

13+
destroy_releases
1314
unlock_artifacts
1415

1516
true
1617
end
1718

1819
private
1920

21+
def destroy_releases
22+
return unless removing_tag?
23+
24+
Releases::DestroyService.new(project, current_user, tag: Gitlab::Git.tag_name(ref)).execute
25+
end
26+
2027
def unlock_artifacts
2128
return unless removing_tag?
2229

app/views/shared/access_tokens/_form.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
= s_("AccessTokens|For example, the application using the token or the purpose of the token.")
2525

2626
.js-access-tokens-expires-at{ data: expires_at_field_data }
27-
= f.text_field :expires_at, class: 'gl-datepicker-input form-control gl-form-input', placeholder: 'YYYY-MM-DD', autocomplete: 'off', data: { js_name: 'expiresAt' }
27+
= f.text_field :expires_at, class: 'form-control gl-form-input', placeholder: 'YYYY-MM-DD', autocomplete: 'off', data: { js_name: 'expiresAt' }
2828

2929
- if resource
3030
.form-group

app/views/user_settings/ssh_keys/_form.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
.col.form-group
2222
.js-access-tokens-expires-at{ data: {min_date: Date.tomorrow, max_date: max_date, default_date_offset: 365, description: ssh_key_expires_field_description } }
2323
= f.label :expires_at, s_('Profiles|Expiration date'), class: 'label-bold'
24-
= f.text_field :expires_at, class: "gl-datepicker-input form-control gl-form-input", placeholder: 'YYYY-MM-DD', min: Date.tomorrow, max: max_date, data: { js_name: 'expiresAt' }
24+
= f.text_field :expires_at, class: "form-control gl-form-input", placeholder: 'YYYY-MM-DD', min: Date.tomorrow, max: max_date, data: { js_name: 'expiresAt' }
2525
%p.form-text.text-muted= ssh_key_expires_field_description
2626

2727
.js-add-ssh-key-validation-warning.hide

config/gitlab_loose_foreign_keys.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ dast_profiles_tags:
190190
- table: tags
191191
column: tag_id
192192
on_delete: async_delete
193+
dast_scanner_profiles:
194+
- table: projects
195+
column: project_id
196+
on_delete: async_delete
193197
dast_scanner_profiles_builds:
194198
- table: ci_builds
195199
column: ci_build_id

config/initializers/octokit.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# frozen_string_literal: true
22

3-
Octokit.middleware.insert_after Octokit::Middleware::FollowRedirects, Gitlab::Octokit::Middleware
3+
Octokit.middleware.insert_after Octokit::Middleware::FollowRedirects, Gitlab::Octokit::UrlValidation
4+
Octokit.middleware.insert_after Gitlab::Octokit::UrlValidation, Gitlab::Octokit::ResponseValidation

db/docs/dast_scanner_profiles.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ feature_categories:
77
description: A scanner profile defines the scanner settings used to run an on-demand scan
88
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37404
99
milestone: '13.3'
10-
gitlab_schema: gitlab_main_cell
10+
gitlab_schema: gitlab_sec
1111
allow_cross_foreign_keys:
1212
- gitlab_main_clusterwide
1313
sharding_key:
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# frozen_string_literal: true
2+
3+
class AddIdentifierNamesToVulnerabilityReads < Gitlab::Database::Migration[2.2]
4+
milestone '17.4'
5+
6+
def change
7+
add_column :vulnerability_reads, :identifier_names, :text, array: true, default: [], null: false
8+
end
9+
end
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# frozen_string_literal: true
2+
3+
class RemoveProjectsDastScannerProfilesProjectIdFk < Gitlab::Database::Migration[2.2]
4+
milestone '17.4'
5+
disable_ddl_transaction!
6+
7+
FOREIGN_KEY_NAME = "fk_rails_72a8ba7141"
8+
9+
def up
10+
with_lock_retries do
11+
remove_foreign_key_if_exists(:dast_scanner_profiles, :projects,
12+
name: FOREIGN_KEY_NAME, reverse_lock_order: true)
13+
end
14+
end
15+
16+
def down
17+
add_concurrent_foreign_key(:dast_scanner_profiles, :projects,
18+
name: FOREIGN_KEY_NAME, column: :project_id,
19+
target_column: :id, on_delete: :cascade)
20+
end
21+
end

db/schema_migrations/20240816195355

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
600e49adf906434ea9a1a2998c8ab157f6ee39381bbc4aa4249a238f0b7e9ecb

db/schema_migrations/20240819135845

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d9519fcd3ce7bc1cd2764dde5ea2040fc1eff7ae52f764a2d60a9e5d0adeb5c3

db/structure.sql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19923,6 +19923,7 @@ CREATE TABLE vulnerability_reads (
1992319923
traversal_ids bigint[] DEFAULT '{}'::bigint[],
1992419924
archived boolean DEFAULT false NOT NULL,
1992519925
identifier_external_ids text[] DEFAULT '{}'::text[] NOT NULL,
19926+
identifier_names text[] DEFAULT '{}'::text[] NOT NULL,
1992619927
CONSTRAINT check_380451bdbe CHECK ((char_length(location_image) <= 2048)),
1992719928
CONSTRAINT check_4b1a1bf5ea CHECK ((has_merge_request IS NOT NULL)),
1992819929
CONSTRAINT check_a105eb825a CHECK ((char_length(cluster_agent_id) <= 10)),
@@ -35072,9 +35073,6 @@ ALTER TABLE ONLY ci_pending_builds
3507235073
ALTER TABLE security_findings
3507335074
ADD CONSTRAINT fk_rails_729b763a54 FOREIGN KEY (scanner_id) REFERENCES vulnerability_scanners(id) ON DELETE CASCADE;
3507435075

35075-
ALTER TABLE ONLY dast_scanner_profiles
35076-
ADD CONSTRAINT fk_rails_72a8ba7141 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
35077-
3507835076
ALTER TABLE ONLY custom_emoji
3507935077
ADD CONSTRAINT fk_rails_745925b412 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
3508035078

doc/.vale/gitlab_base/spelling-exceptions.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ ChatOps
152152
checksummable
153153
checksummed
154154
checksumming
155-
Chemlab
156155
chipset
157156
chipsets
158157
CIDRs

doc/administration/backup_restore/backup_cli.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,66 @@ To take a backup of the current GitLab installation:
2626
sudo gitlab-backup-cli backup all
2727
```
2828

29+
### Backing up object storage
30+
31+
Only Google cloud is supported. See [epic 11577](https://gitlab.com/groups/gitlab-org/-/epics/11577) for the plan to add more vendors.
32+
33+
#### GCP
34+
35+
`gitlab-backup-cli` creates and runs jobs with [Google Transfer Service](https://cloud.google.com/storage-transfer-service/) to copy GitLab data to a separate backup bucket.
36+
37+
Prerequisites:
38+
39+
- Follow [Google's documentation](https://cloud.google.com/docs/authentication) for authentication.
40+
- This document assumes you are setting up and using a dedicated Google Cloud service account for managing backups.
41+
- If no other credentials are provided, and you are running inside Google Cloud, then the tool attempts to use the access of the infrastructure it is running on. It is recommended to run with separate credentials, and restrict access to the created backups from the application.
42+
43+
To create a backup:
44+
45+
1. [Create a role](https://cloud.google.com/iam/docs/creating-custom-roles):
46+
1. Create a file `role.yaml` with the following definition:
47+
48+
```yaml
49+
---
50+
description: Role for backing up GitLab object storage
51+
includedPermissions:
52+
- storagetransfer.jobs.create
53+
- storagetransfer.jobs.get
54+
- storagetransfer.jobs.run
55+
- storagetransfer.jobs.update
56+
- storagetransfer.operations.get
57+
- storagetransfer.projects.getServiceAccount
58+
stage: GA
59+
title: GitLab Backup Role
60+
```
61+
62+
1. Apply the role:
63+
64+
```shell
65+
gcloud iam roles create --project=<YOUR_PROJECT_ID> <ROLE_NAME> --file=role.yaml
66+
```
67+
68+
1. Create a service account for backups, and add it to the role:
69+
70+
```shell
71+
gcloud iam service-accounts create "gitlab-backup-cli" --display-name="GitLab Backup Service Account"
72+
# Get the service account email from the output of the following
73+
gcloud iam service-accounts list
74+
# Add the account to the role created previously
75+
gcloud projects add-iam-policy-binding <YOUR_PROJECT_ID> --member="serviceAccount:<SERVICE_ACCOUNT_EMAIL>" --role="roles/<ROLE_NAME>"
76+
```
77+
78+
1. Follow [Google's documentation](https://cloud.google.com/docs/authentication) for authentication with the service account. In general, the credentials can be saved to a file, or stored in a predefined environment variable.
79+
1. Create a destination bucket to backup to in [Google Cloud Storage](https://cloud.google.com/storage/). The options here are highly dependent on your requirements.
80+
1. Run the backup:
81+
82+
```shell
83+
sudo gitlab-backup-cli backup all --backup-bucket=<BUCKET_NAME>
84+
```
85+
86+
If you want to backup the container registry bucket, add the option `--registry-bucket=<REGISTRY_BUCKET_NAME>`.
87+
1. The backup creates a backup under `backups/<BACKUP_ID>/<BUCKET>` for each of the object storage types in the bucket.
88+
2989
## Backup directory structure
3090

3191
Example backup directory structure:

doc/administration/backup_restore/troubleshooting_backup_gitlab.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,14 @@ You should verify that the secrets are the root cause before deleting any data.
204204
TRUNCATE integrations, chat_names, issue_tracker_data, jira_tracker_data, slack_integrations, web_hooks, zentao_tracker_data, web_hook_logs CASCADE;
205205
```
206206

207+
## Container registry is not restored
208+
209+
If you restore a backup from an environment that uses the [container registry](../../user/packages/container_registry/index.md)
210+
to a newly installed environment where the container registry is not enabled, the container registry is not restored.
211+
212+
To also restore the container registry, you need to [enable it](../packages/container_registry.md#enable-the-container-registry) in the new
213+
environment before you restore the backup.
214+
207215
## Container registry push failures after restoring from a backup
208216

209217
If you use the [container registry](../../user/packages/container_registry/index.md),

0 commit comments

Comments
 (0)