Skip to content

Commit fe448fa

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 99373ac commit fe448fa

33 files changed

+483
-70
lines changed

.gitlab/ci/docs.gitlab-ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ ui-docs-links lint:
7171
extends:
7272
- .docs:rules:docs-lint
7373
- .static-analysis-base
74+
- .ruby-cache
7475
stage: lint
7576
needs: []
7677
script:

.rubocop_manual_todo.yml

-1
Original file line numberDiff line numberDiff line change
@@ -2558,7 +2558,6 @@ Rails/IncludeUrlHelper:
25582558
# TODO issue: https://gitlab.com/gitlab-org/gitlab/-/issues/344279
25592559
Style/OpenStructUse:
25602560
Exclude:
2561-
- 'Guardfile'
25622561
- 'app/finders/snippets_finder.rb'
25632562
- 'app/helpers/application_settings_helper.rb'
25642563
- 'ee/lib/gitlab/graphql/aggregations/epics/epic_node.rb'

CHANGELOG.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -3066,18 +3066,18 @@ No changes.
30663066

30673067
## 13.12.15 (2021-11-03)
30683068

3069-
No changes.
3070-
3071-
## 13.12.14 (2021-11-03)
3072-
30733069
### Fixed (2 changes)
30743070

30753071
- [Allow nil for remaining ci cd settings](gitlab-org/gitlab@896fd7ecf23714fa9f710efa4af245a26c677dce) ([merge request](gitlab-org/gitlab!73522))
30763072
- [Allow nil on delegated CI/CD settings](gitlab-org/gitlab@d57a9ea79080fc473eb54c0ee696a50fd270e8a4) ([merge request](gitlab-org/gitlab!73522))
30773073

3074+
## 13.12.14 (2021-11-03)
3075+
3076+
This version has been skipped due to QA problems.
3077+
30783078
## 13.12.13 (2021-10-29)
30793079

3080-
No changes.
3080+
This version has been skipped due to QA problems.
30813081

30823082
## 13.12.12 (2021-09-21)
30833083

Guardfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cmd = ENV['GUARD_CMD'] || (ENV['SPRING'] ? 'spring rspec' : 'bundle exec rspec')
99
directories %w(app ee lib rubocop tooling spec)
1010

1111
rspec_context_for = proc do |context_path|
12-
OpenStruct.new(to_s: "spec").tap do |rspec|
12+
OpenStruct.new(to_s: "spec").tap do |rspec| # rubocop:disable Style/OpenStructUse
1313
rspec.spec_dir = "#{context_path}spec"
1414
rspec.spec = ->(m) { Guard::RSpec::Dsl.detect_spec_file_for(rspec, m) }
1515
rspec.spec_helper = "#{rspec.spec_dir}/spec_helper.rb"
@@ -19,7 +19,7 @@ rspec_context_for = proc do |context_path|
1919
end
2020

2121
rails_context_for = proc do |context_path, exts|
22-
OpenStruct.new.tap do |rails|
22+
OpenStruct.new.tap do |rails| # rubocop:disable Style/OpenStructUse
2323
rails.app_files = %r{^#{context_path}app/(.+)\.rb$}
2424

2525
rails.views = %r{^#{context_path}app/(views/.+/[^/]*\.(?:#{exts}))$}

app/graphql/types/evidence_type.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class EvidenceType < BaseObject
55
graphql_name 'ReleaseEvidence'
66
description 'Evidence for a release'
77

8-
authorize :download_code
8+
authorize :read_release_evidence
99

1010
present_using Releases::EvidencePresenter
1111

app/graphql/types/packages/file_metadata_type.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ def self.resolve_type(object, context)
1414
case object
1515
when ::Packages::Conan::FileMetadatum
1616
::Types::Packages::Conan::FileMetadatumType
17+
when ::Packages::Helm::FileMetadatum
18+
::Types::Packages::Helm::FileMetadatumType
1719
else
1820
# NOTE: This method must be kept in sync with `PackageFileType#file_metadata`,
1921
# which must never produce data that this discriminator cannot handle.
2022
raise 'Unsupported file metadata type'
2123
end
2224
end
2325

24-
orphan_types Types::Packages::Conan::FileMetadatumType
26+
orphan_types Types::Packages::Conan::FileMetadatumType,
27+
Types::Packages::Helm::FileMetadatumType
2528
end
2629
end
2730
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# frozen_string_literal: true
2+
3+
module Types
4+
module Packages
5+
module Helm
6+
# rubocop: disable Graphql/AuthorizeTypes
7+
class DependencyType < BaseObject
8+
graphql_name 'PackageHelmDependencyType'
9+
description 'Represents a Helm dependency'
10+
11+
# Need to be synced with app/validators/json_schemas/helm_metadata.json#dependencies
12+
field :name, GraphQL::Types::String, null: true, description: 'Name of the dependency.'
13+
field :version, GraphQL::Types::String, null: true, description: 'Version of the dependency.'
14+
field :repository, GraphQL::Types::String, null: true, description: 'Repository of the dependency.'
15+
field :condition, GraphQL::Types::String, null: true, description: 'Condition of the dependency.'
16+
field :tags, [GraphQL::Types::String], null: true, description: 'Tags of the dependency.'
17+
field :enabled, GraphQL::Types::Boolean, null: true, description: 'Indicates the dependency is enabled.'
18+
field :import_values, [GraphQL::Types::JSON], null: true, description: 'Import-values of the dependency.', hash_key: "import-values" # rubocop:disable Graphql/JSONType
19+
field :alias, GraphQL::Types::String, null: true, description: 'Alias of the dependency.', resolver_method: :resolve_alias
20+
21+
# field :alias` conflicts with a built-in method
22+
def resolve_alias
23+
object['alias']
24+
end
25+
end
26+
end
27+
end
28+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# frozen_string_literal: true
2+
3+
module Types
4+
module Packages
5+
module Helm
6+
class FileMetadatumType < BaseObject
7+
graphql_name 'HelmFileMetadata'
8+
description 'Helm file metadata'
9+
10+
implements Types::Packages::FileMetadataType
11+
12+
authorize :read_package
13+
14+
field :channel, GraphQL::Types::String, null: false, description: 'Channel of the Helm chart.'
15+
field :metadata, Types::Packages::Helm::MetadataType, null: false, description: 'Metadata of the Helm chart.'
16+
end
17+
end
18+
end
19+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# frozen_string_literal: true
2+
3+
module Types
4+
module Packages
5+
module Helm
6+
# rubocop: disable Graphql/AuthorizeTypes
7+
class MaintainerType < BaseObject
8+
graphql_name 'PackageHelmMaintainerType'
9+
description 'Represents a Helm maintainer'
10+
11+
# Need to be synced with app/validators/json_schemas/helm_metadata.json#maintainers
12+
field :name, GraphQL::Types::String, null: true, description: 'Name of the maintainer.'
13+
field :email, GraphQL::Types::String, null: true, description: 'Email of the maintainer.'
14+
field :url, GraphQL::Types::String, null: true, description: 'URL of the maintainer.'
15+
end
16+
end
17+
end
18+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# frozen_string_literal: true
2+
3+
module Types
4+
module Packages
5+
module Helm
6+
# rubocop: disable Graphql/AuthorizeTypes
7+
class MetadataType < BaseObject
8+
graphql_name 'PackageHelmMetadataType'
9+
description 'Represents the contents of a Helm Chart.yml file'
10+
11+
# Need to be synced with app/validators/json_schemas/helm_metadata.json
12+
field :name, GraphQL::Types::String, null: false, description: 'Name of the chart.'
13+
field :home, GraphQL::Types::String, null: true, description: 'URL of the home page.'
14+
field :sources, [GraphQL::Types::String], null: true, description: 'URLs of the source code for the chart.'
15+
field :version, GraphQL::Types::String, null: false, description: 'Version of the chart.'
16+
field :description, GraphQL::Types::String, null: true, description: 'Description of the chart.'
17+
field :keywords, [GraphQL::Types::String], null: true, description: 'Keywords for the chart.'
18+
field :maintainers, [Types::Packages::Helm::MaintainerType], null: true, description: 'Maintainers of the chart.'
19+
field :icon, GraphQL::Types::String, null: true, description: 'URL to an SVG or PNG image for the chart.'
20+
field :api_version, GraphQL::Types::String, null: false, description: 'API version of the chart.', hash_key: "apiVersion"
21+
field :condition, GraphQL::Types::String, null: true, description: 'Condition for the chart.'
22+
field :tags, GraphQL::Types::String, null: true, description: 'Tags for the chart.'
23+
field :app_version, GraphQL::Types::String, null: true, description: 'App version of the chart.', hash_key: "appVersion"
24+
field :deprecated, GraphQL::Types::Boolean, null: true, description: 'Indicates if the chart is deprecated.'
25+
field :annotations, GraphQL::Types::JSON, null: true, description: 'Annotations for the chart.' # rubocop:disable Graphql/JSONType
26+
field :kube_version, GraphQL::Types::String, null: true, description: 'Kubernetes versions for the chart.', hash_key: "kubeVersion"
27+
field :dependencies, [Types::Packages::Helm::DependencyType], null: true, description: 'Dependencies of the chart.'
28+
field :type, GraphQL::Types::String, null: true, description: 'Type of the chart.', hash_key: "appVersion"
29+
end
30+
end
31+
end
32+
end

app/graphql/types/packages/package_file_type.rb

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ def file_metadata
2727
case object.package.package_type
2828
when 'conan'
2929
object.conan_file_metadatum
30+
when 'helm'
31+
object.helm_file_metadatum
3032
else
3133
nil
3234
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# frozen_string_literal: true
2+
module Packages
3+
module Helm
4+
class FileMetadatumPolicy < BasePolicy
5+
delegate { @subject.package_file.package }
6+
end
7+
end
8+
end

app/validators/json_schemas/helm_metadata.json

+17-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,23 @@
103103
"import-values": {
104104
"type": "array",
105105
"items": {
106-
106+
"oneOf": [
107+
{
108+
"type": "string"
109+
},
110+
{
111+
"type": "object",
112+
"properties": {
113+
"child": {
114+
"type": "string"
115+
},
116+
"parent": {
117+
"type": "string"
118+
}
119+
},
120+
"additionalProperties": false
121+
}
122+
]
107123
}
108124
},
109125
"alias": {

config/feature_flags/development/linear_ee_group_ancestor_scopes.yml

-8
This file was deleted.

doc/api/graphql/reference/index.md

+69
Original file line numberDiff line numberDiff line change
@@ -10911,6 +10911,19 @@ Represents the Geo sync and verification state of a group wiki repository.
1091110911
| <a id="groupwikirepositoryregistryretrycount"></a>`retryCount` | [`Int`](#int) | Number of consecutive failed sync attempts of the GroupWikiRepositoryRegistry. |
1091210912
| <a id="groupwikirepositoryregistrystate"></a>`state` | [`RegistryState`](#registrystate) | Sync state of the GroupWikiRepositoryRegistry. |
1091310913

10914+
### `HelmFileMetadata`
10915+
10916+
Helm file metadata.
10917+
10918+
#### Fields
10919+
10920+
| Name | Type | Description |
10921+
| ---- | ---- | ----------- |
10922+
| <a id="helmfilemetadatachannel"></a>`channel` | [`String!`](#string) | Channel of the Helm chart. |
10923+
| <a id="helmfilemetadatacreatedat"></a>`createdAt` | [`Time!`](#time) | Date of creation. |
10924+
| <a id="helmfilemetadatametadata"></a>`metadata` | [`PackageHelmMetadataType!`](#packagehelmmetadatatype) | Metadata of the Helm chart. |
10925+
| <a id="helmfilemetadataupdatedat"></a>`updatedAt` | [`Time!`](#time) | Date of most recent update. |
10926+
1091410927
### `IncidentManagementOncallRotation`
1091510928

1091610929
Describes an incident management on-call rotation.
@@ -12381,6 +12394,61 @@ Represents the Geo sync and verification state of a package file.
1238112394
| <a id="packagefileregistryretrycount"></a>`retryCount` | [`Int`](#int) | Number of consecutive failed sync attempts of the PackageFileRegistry. |
1238212395
| <a id="packagefileregistrystate"></a>`state` | [`RegistryState`](#registrystate) | Sync state of the PackageFileRegistry. |
1238312396

12397+
### `PackageHelmDependencyType`
12398+
12399+
Represents a Helm dependency.
12400+
12401+
#### Fields
12402+
12403+
| Name | Type | Description |
12404+
| ---- | ---- | ----------- |
12405+
| <a id="packagehelmdependencytypealias"></a>`alias` | [`String`](#string) | Alias of the dependency. |
12406+
| <a id="packagehelmdependencytypecondition"></a>`condition` | [`String`](#string) | Condition of the dependency. |
12407+
| <a id="packagehelmdependencytypeenabled"></a>`enabled` | [`Boolean`](#boolean) | Indicates the dependency is enabled. |
12408+
| <a id="packagehelmdependencytypeimportvalues"></a>`importValues` | [`[JSON!]`](#json) | Import-values of the dependency. |
12409+
| <a id="packagehelmdependencytypename"></a>`name` | [`String`](#string) | Name of the dependency. |
12410+
| <a id="packagehelmdependencytyperepository"></a>`repository` | [`String`](#string) | Repository of the dependency. |
12411+
| <a id="packagehelmdependencytypetags"></a>`tags` | [`[String!]`](#string) | Tags of the dependency. |
12412+
| <a id="packagehelmdependencytypeversion"></a>`version` | [`String`](#string) | Version of the dependency. |
12413+
12414+
### `PackageHelmMaintainerType`
12415+
12416+
Represents a Helm maintainer.
12417+
12418+
#### Fields
12419+
12420+
| Name | Type | Description |
12421+
| ---- | ---- | ----------- |
12422+
| <a id="packagehelmmaintainertypeemail"></a>`email` | [`String`](#string) | Email of the maintainer. |
12423+
| <a id="packagehelmmaintainertypename"></a>`name` | [`String`](#string) | Name of the maintainer. |
12424+
| <a id="packagehelmmaintainertypeurl"></a>`url` | [`String`](#string) | URL of the maintainer. |
12425+
12426+
### `PackageHelmMetadataType`
12427+
12428+
Represents the contents of a Helm Chart.yml file.
12429+
12430+
#### Fields
12431+
12432+
| Name | Type | Description |
12433+
| ---- | ---- | ----------- |
12434+
| <a id="packagehelmmetadatatypeannotations"></a>`annotations` | [`JSON`](#json) | Annotations for the chart. |
12435+
| <a id="packagehelmmetadatatypeapiversion"></a>`apiVersion` | [`String!`](#string) | API version of the chart. |
12436+
| <a id="packagehelmmetadatatypeappversion"></a>`appVersion` | [`String`](#string) | App version of the chart. |
12437+
| <a id="packagehelmmetadatatypecondition"></a>`condition` | [`String`](#string) | Condition for the chart. |
12438+
| <a id="packagehelmmetadatatypedependencies"></a>`dependencies` | [`[PackageHelmDependencyType!]`](#packagehelmdependencytype) | Dependencies of the chart. |
12439+
| <a id="packagehelmmetadatatypedeprecated"></a>`deprecated` | [`Boolean`](#boolean) | Indicates if the chart is deprecated. |
12440+
| <a id="packagehelmmetadatatypedescription"></a>`description` | [`String`](#string) | Description of the chart. |
12441+
| <a id="packagehelmmetadatatypehome"></a>`home` | [`String`](#string) | URL of the home page. |
12442+
| <a id="packagehelmmetadatatypeicon"></a>`icon` | [`String`](#string) | URL to an SVG or PNG image for the chart. |
12443+
| <a id="packagehelmmetadatatypekeywords"></a>`keywords` | [`[String!]`](#string) | Keywords for the chart. |
12444+
| <a id="packagehelmmetadatatypekubeversion"></a>`kubeVersion` | [`String`](#string) | Kubernetes versions for the chart. |
12445+
| <a id="packagehelmmetadatatypemaintainers"></a>`maintainers` | [`[PackageHelmMaintainerType!]`](#packagehelmmaintainertype) | Maintainers of the chart. |
12446+
| <a id="packagehelmmetadatatypename"></a>`name` | [`String!`](#string) | Name of the chart. |
12447+
| <a id="packagehelmmetadatatypesources"></a>`sources` | [`[String!]`](#string) | URLs of the source code for the chart. |
12448+
| <a id="packagehelmmetadatatypetags"></a>`tags` | [`String`](#string) | Tags for the chart. |
12449+
| <a id="packagehelmmetadatatypetype"></a>`type` | [`String`](#string) | Type of the chart. |
12450+
| <a id="packagehelmmetadatatypeversion"></a>`version` | [`String!`](#string) | Version of the chart. |
12451+
1238412452
### `PackageSettings`
1238512453

1238612454
Namespace-level Package Registry settings.
@@ -17759,6 +17827,7 @@ Represents metadata associated with a Package file.
1775917827
Implementations:
1776017828

1776117829
- [`ConanFileMetadata`](#conanfilemetadata)
17830+
- [`HelmFileMetadata`](#helmfilemetadata)
1776217831

1776317832
##### Fields
1776417833

doc/ci/yaml/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -1652,10 +1652,12 @@ docker build:
16521652
- docker/scripts/*
16531653
- dockerfiles/**/*
16541654
- more_scripts/*.{rb,py,sh}
1655+
- "**/*.json"
16551656
```
16561657

16571658
**Additional details**:
16581659

1660+
- If any of the matching files are changed (an `OR` operation), `changes` resolves to `true`.
16591661
- If you use refs other than `branches`, `external_pull_requests`, or `merge_requests`,
16601662
`changes` can't determine if a given file is new or old and always returns `true`.
16611663
- If you use `only: changes` with other refs, jobs ignore the changes and always run.

doc/development/gemfile.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ to a gem, go through these steps:
5555
- For an example, see the [merge request !57805](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57805).
5656
1. Once the gem is stable - we have been using it in production for a
5757
while with few, if any, changes - extract to its own project under
58-
the `gitlab-org` namespace.
58+
the [`gitlab-org/ruby/gems` namespace](https://gitlab.com/gitlab-org/ruby/gems/).
5959
1. When creating the project, follow the [instructions for new projects](https://about.gitlab.com/handbook/engineering/#creating-a-new-project).
6060
1. Follow the instructions for setting up a [CI/CD configuration](https://about.gitlab.com/handbook/engineering/#cicd-configuration).
6161
1. Follow the instructions for [publishing a project](https://about.gitlab.com/handbook/engineering/#publishing-a-project).

doc/development/go_guide/go_upgrade.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,14 @@ if you need help finding the correct person or labels:
8989
1. Schedule an update with the [GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit/-/issues):
9090
- Title the issue `Support using Go version <VERSION_NUMBER>`.
9191
- Set the issue as related to every issue created in the previous step.
92-
1. Schedule one issue per Secure Stage team and add the `devops::secure` label to each:
92+
1. Schedule one issue per Sec Section team that maintains Go based Security Analyzers and add the `section::sec` label to each:
9393
- [Static Analysis tracker](https://gitlab.com/gitlab-org/gitlab/-/issues).
9494
- [Composition Analysis tracker](https://gitlab.com/gitlab-org/gitlab/-/issues).
9595
- [Container Security tracker](https://gitlab.com/gitlab-org/gitlab/-/issues).
96+
97+
NOTE:
98+
Updates to these Security analyzers should not block upgrades to Charts or Omnibus since
99+
the analyzers are built independently as separate container images.
96100
1. Schedule builder updates with Distribution projects:
97101
- Dependency and GitLab Development Kit issues created in previous steps should be set as blockers.
98102
- Each issue should have the title `Support building with Go <VERSION_NUMBER>` and description as noted:

0 commit comments

Comments
 (0)