Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2023-11-03 15:10:09 +00:00
parent b4c39709e3
commit c2d0d27f7f
23 changed files with 201 additions and 171 deletions

View File

@ -3188,7 +3188,6 @@ RSpec/FeatureCategory:
- 'spec/lib/gitlab/ci/variables/collection/item_spec.rb'
- 'spec/lib/gitlab/ci/variables/collection/sort_spec.rb'
- 'spec/lib/gitlab/ci/variables/helpers_spec.rb'
- 'spec/lib/gitlab/ci/yaml_processor/dag_spec.rb'
- 'spec/lib/gitlab/ci/yaml_processor/feature_flags_spec.rb'
- 'spec/lib/gitlab/ci_access_spec.rb'
- 'spec/lib/gitlab/class_attributes_spec.rb'

View File

@ -4,12 +4,6 @@ module GraphHelper
def refs(repo, commit)
refs = [commit.ref_names(repo).join(' ')]
# append note count
unless Feature.enabled?(:disable_network_graph_notes_count, @project, type: :experiment)
notes_count = @graph.notes[commit.id]
refs << "[#{pluralize(notes_count, 'note')}]" if notes_count > 0
end
refs.join
end

View File

@ -2,7 +2,7 @@
module Network
class Graph
attr_reader :days, :commits, :map, :notes, :repo
attr_reader :days, :commits, :map, :repo
def self.max_count
@max_count ||= 650
@ -17,28 +17,10 @@ module Network
@commits = collect_commits
@days = index_commits
@notes = collect_notes
end
protected
def collect_notes
return {} if Feature.enabled?(:disable_network_graph_notes_count, @project, type: :experiment)
h = Hash.new(0)
@project
.notes
.where(noteable_type: 'Commit')
.group('notes.commit_id')
.select('notes.commit_id, count(notes.id) as note_count')
.each do |item|
h[item.commit_id] = item.note_count.to_i
end
h
end
# Get commits from repository
#
def collect_commits

View File

@ -12,8 +12,7 @@
.nav-controls.pb-md-3.pb-lg-0
= render 'shared/wikis/main_links'
- if Feature.enabled?(:print_wiki, current_user)
#js-export-actions{ data: { options: { target: '.js-wiki-page-content', title: @page.human_title, stylesheet: [stylesheet_path('application')] }.to_json } }
#js-export-actions{ data: { options: { target: '.js-wiki-page-content', title: @page.human_title, stylesheet: [stylesheet_path('application')] }.to_json } }
- if @page.historical?
= render Pajamas::AlertComponent.new(variant: :warning,

View File

@ -1,8 +0,0 @@
---
name: print_wiki
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125260
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/414691
milestone: '16.3'
type: development
group: group::knowledge
default_enabled: true

View File

@ -1,8 +0,0 @@
---
name: disable_network_graph_notes_count
introduced_by_url: "https://gitlab.com/gitlab-org/gitlab/-/merge_requests/103636"
rollout_issue_url:
milestone: '15.6'
type: experiment
group: group::source code
default_enabled: false

View File

@ -63,9 +63,41 @@
"properties": {
"instrumentation_class": {
"const": "TotalCountMetric"
},
"options": {
"type": "object",
"properties": {
"events": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"events"
],
"additionalProperties": false
},
"events": {
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"required": [
"events",
"options",
"instrumentation_class"
]
}

View File

@ -38,10 +38,46 @@
"properties": {
"instrumentation_class": {
"const": "AggregatedMetric"
},
"options": {
"type": "object",
"properties": {
"aggregate": {
"type": "object",
"properties": {
"operator": {
"enum": [
"OR",
"AND"
]
},
"attribute": {
"type": "string"
}
},
"required": [
"operator",
"attribute"
],
"additionalProperties": false
},
"events": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"aggregate",
"events"
],
"additionalProperties": false
}
},
"required": [
"instrumentation_class"
"instrumentation_class",
"options"
]
},
{

View File

@ -15,3 +15,4 @@ swap:
e\. g\.: for example
i\.e\.: that is
i\. e\.: that is
via: "Use 'with', 'through', or 'by using' instead."

View File

@ -10,6 +10,7 @@ link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.
level: suggestion
ignorecase: true
swap:
a number of: "Specify the number or remove the phrase."
as well as: "Use 'and' instead of 'as well as'."
note that: "Remove the phrase 'note that'."
please: "Use 'please' only if we've inconvenienced the user."

View File

@ -383,7 +383,12 @@ configuration option in `gitlab.yml`. These metrics are served from the
| `geo_project_repositories_verification_total` | Gauge | 16.2 | Number of Project Repositories to attempt to verify on secondary | `url` |
| `geo_project_repositories_verified` | Gauge | 16.2 | Number of Project Repositories successfully verified on secondary | `url` |
| `geo_project_repositories_verification_failed` | Gauge | 16.2 | Number of Project Repositories that failed verification on secondary | `url` |
| `geo_repositories_synced` | Gauge | 10.2 | Deprecated for removal in 17.0. Missing in 16.3 and 16.4. Replaced by `geo_project_repositories_synced`. Number of repositories synced on secondary | `url` |
| `geo_repositories_failed` | Gauge | 10.2 | Deprecated for removal in 17.0. Missing in 16.3 and 16.4. Replaced by `geo_project_repositories_failed`. Number of repositories failed to sync on secondary | `url` |
| `geo_repositories_checksummed` | Gauge | 10.7 | Deprecated for removal in 17.0. Missing in 16.3 and 16.4. Replaced by `geo_project_repositories_checksummed`. Number of repositories checksummed on primary | `url` |
| `geo_repositories_checksum_failed` | Gauge | 10.7 | Deprecated for removal in 17.0. Missing in 16.3 and 16.4. Replaced by `geo_project_repositories_checksum_failed`. Number of repositories failed to calculate the checksum on primary | `url` |
| `geo_repositories_verified` | Gauge | 10.7 | Deprecated for removal in 17.0. Missing in 16.3 and 16.4. Replaced by `geo_project_repositories_verified`. Number of repositories successfully verified on secondary | `url` |
| `geo_repositories_verification_failed` | Gauge | 10.7 | Deprecated for removal in 17.0. Missing in 16.3 and 16.4. Replaced by `geo_project_repositories_verification_failed`. Number of repositories that failed verification on secondary | `url` |
| `gitlab_memwd_violations_total` | Counter | 15.9 | Total number of times a Sidekiq process violated a memory threshold | |
| `gitlab_memwd_violations_handled_total` | Counter | 15.9 | Total number of times Sidekiq process memory violations were handled | |
| `sidekiq_watchdog_running_jobs_total` | Counter | 15.9 | Current running jobs when RSS limit was reached | `worker_class` |

View File

@ -56,7 +56,7 @@ GET /runners?tag_list=tag1,tag2
|------------|--------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `scope` | string | no | Deprecated: Use `type` or `status` instead. The scope of runners to return, one of: `active`, `paused`, `online` and `offline`; showing all runners if none provided |
| `type` | string | no | The type of runners to return, one of: `instance_type`, `group_type`, `project_type` |
| `status` | string | no | The status of runners to return, one of: `online`, `offline`, `stale`, and `never_contacted`. `active` and `paused` are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0 |
| `status` | string | no | The status of runners to return, one of: `online`, `offline`, `stale`, and `never_contacted`. `active` and `paused` are also possible values which were deprecated in GitLab 14.8 and will be removed in a future version of the REST API |
| `paused` | boolean | no | Whether to include only runners that are accepting or ignoring new jobs |
| `tag_list` | string array | no | A list of runner tags |
@ -66,11 +66,11 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
NOTE:
The `active` and `paused` values in the `status` query parameter were deprecated [in GitLab 14.8](https://gitlab.com/gitlab-org/gitlab/-/issues/347211).
and will be removed in [GitLab 16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). They are replaced by the `paused` query parameter.
and will be removed in [a future version of the REST API](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). They are replaced by the `paused` query parameter.
NOTE:
The `active` attribute in the response was deprecated [in GitLab 14.8](https://gitlab.com/gitlab-org/gitlab/-/issues/347211).
and will be removed in [GitLab 16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). It is replaced by the `paused` attribute.
and will be removed in [a future version of the REST API](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). It is replaced by the `paused` attribute.
Example response:
@ -121,7 +121,7 @@ GET /runners/all?tag_list=tag1,tag2
|------------|--------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `scope` | string | no | Deprecated: Use `type` or `status` instead. The scope of runners to return, one of: `specific`, `shared`, `active`, `paused`, `online` and `offline`; showing all runners if none provided |
| `type` | string | no | The type of runners to return, one of: `instance_type`, `group_type`, `project_type` |
| `status` | string | no | The status of runners to return, one of: `online`, `offline`, `stale`, and `never_contacted`. `active` and `paused` are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0 |
| `status` | string | no | The status of runners to return, one of: `online`, `offline`, `stale`, and `never_contacted`. `active` and `paused` are also possible values which were deprecated in GitLab 14.8 and will be removed in a future version of the REST API |
| `paused` | boolean | no | Whether to include only runners that are accepting or ignoring new jobs |
| `tag_list` | string array | no | A list of runner tags |
@ -131,11 +131,11 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
NOTE:
The `active` and `paused` values in the `status` query parameter were deprecated [in GitLab 14.8](https://gitlab.com/gitlab-org/gitlab/-/issues/347211).
and will be removed in [GitLab 16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). They are replaced by the `paused` query parameter.
and will be removed in [a future version of the REST API](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). They are replaced by the `paused` query parameter.
NOTE:
The `active` attribute in the response was deprecated [in GitLab 14.8](https://gitlab.com/gitlab-org/gitlab/-/issues/347211).
and will be removed in [GitLab 16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). It is replaced by the `paused` attribute.
and will be removed in [a future version of the REST API](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). It is replaced by the `paused` attribute.
Example response:
@ -221,7 +221,7 @@ and removed in [GitLab 13.0](https://gitlab.com/gitlab-org/gitlab/-/issues/21432
NOTE:
The `active` attribute in the response was deprecated [in GitLab 14.8](https://gitlab.com/gitlab-org/gitlab/-/issues/347211).
and will be removed in [GitLab 16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). It is replaced by the `paused` attribute.
and will be removed in [a future version of the REST API](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). It is replaced by the `paused` attribute.
Example response:
@ -291,7 +291,7 @@ and [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/214322) in GitLab 13
NOTE:
The `active` query parameter was deprecated [in GitLab 14.8](https://gitlab.com/gitlab-org/gitlab/-/issues/347211).
and will be removed in [GitLab 16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). It is replaced by the `paused` attribute.
and will be removed in [a future version of the REST API](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). It is replaced by the `paused` attribute.
Example response:
@ -361,7 +361,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" \
NOTE:
The `active` form attribute was deprecated [in GitLab 14.8](https://gitlab.com/gitlab-org/gitlab/-/issues/347211).
and will be removed in [GitLab 16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). It is replaced by the `paused` attribute.
and will be removed in [a future version of the REST API](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). It is replaced by the `paused` attribute.
## List runner's jobs
@ -473,7 +473,7 @@ GET /projects/:id/runners?tag_list=tag1,tag2
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user |
| `scope` | string | no | Deprecated: Use `type` or `status` instead. The scope of runners to return, one of: `active`, `paused`, `online` and `offline`; showing all runners if none provided |
| `type` | string | no | The type of runners to return, one of: `instance_type`, `group_type`, `project_type` |
| `status` | string | no | The status of runners to return, one of: `online`, `offline`, `stale`, and `never_contacted`. `active` and `paused` are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0 |
| `status` | string | no | The status of runners to return, one of: `online`, `offline`, `stale`, and `never_contacted`. `active` and `paused` are also possible values which were deprecated in GitLab 14.8 and will be removed in a future version of the REST API |
| `paused` | boolean | no | Whether to include only runners that are accepting or ignoring new jobs |
| `tag_list` | string array | no | A list of runner tags |
@ -483,11 +483,11 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
NOTE:
The `active` and `paused` values in the `status` query parameter were deprecated [in GitLab 14.8](https://gitlab.com/gitlab-org/gitlab/-/issues/347211).
and will be removed in [GitLab 16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). They are replaced by the `paused` query parameter.
and will be removed in [a future version of the REST API](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). They are replaced by the `paused` query parameter.
NOTE:
The `active` attribute in the response was deprecated [in GitLab 14.8](https://gitlab.com/gitlab-org/gitlab/-/issues/347211).
and will be removed in [GitLab 16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). It is replaced by the `paused` attribute.
and will be removed in [a future version of the REST API](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). It is replaced by the `paused` attribute.
Example response:
@ -588,8 +588,8 @@ GET /groups/:id/runners?tag_list=tag1,tag2
| Attribute | Type | Required | Description |
|------------|----------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `id` | integer | yes | The ID of the group owned by the authenticated user |
| `type` | string | no | The type of runners to return, one of: `instance_type`, `group_type`, `project_type`. The `project_type` value is [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/351466) and will be removed in GitLab 15.0 |
| `status` | string | no | The status of runners to return, one of: `online`, `offline`, `stale`, and `never_contacted`. `active` and `paused` are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0 |
| `type` | string | no | The type of runners to return, one of: `instance_type`, `group_type`, `project_type`. The `project_type` value is [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/351466) and will be removed in a future version of the REST API |
| `status` | string | no | The status of runners to return, one of: `online`, `offline`, `stale`, and `never_contacted`. `active` and `paused` are also possible values which were deprecated in GitLab 14.8 and will be removed in a future version of the REST API |
| `paused` | boolean | no | Whether to include only runners that are accepting or ignoring new jobs |
| `tag_list` | string array | no | A list of runner tags |
@ -599,11 +599,11 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
NOTE:
The `active` and `paused` values in the `status` query parameter were deprecated [in GitLab 14.8](https://gitlab.com/gitlab-org/gitlab/-/issues/347211).
and will be removed in [GitLab 16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). They are replaced by the `paused` query parameter.
and will be removed in [a future version of the REST API](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). They are replaced by the `paused` query parameter.
NOTE:
The `active` attribute in the response was deprecated [in GitLab 14.8](https://gitlab.com/gitlab-org/gitlab/-/issues/347211).
and will be removed in [GitLab 16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). It is replaced by the `paused` attribute.
and will be removed in [a future version of the REST API](https://gitlab.com/gitlab-org/gitlab/-/issues/351109). It is replaced by the `paused` attribute.
Example response:

View File

@ -158,10 +158,9 @@ To enable the Dangerfile on another existing GitLab project, complete the follow
- if: $CI_SERVER_HOST == "gitlab.com"
```
1. If your project is in the `gitlab-org` group, you don't need to set up any token as the `DANGER_GITLAB_API_TOKEN`
variable is available at the group level. If not, follow these last steps:
1. Create a [Project access tokens](../user/project/settings/project_access_tokens.md).
1. Add the token as a CI/CD project variable named `DANGER_GITLAB_API_TOKEN`.
1. Create a [Project access tokens](../user/project/settings/project_access_tokens.md) with the `api` scope,
`Reporter` permission (so that it can add labels), and no expiration date (which actually means one year).
1. Add the token as a CI/CD project variable named `DANGER_GITLAB_API_TOKEN`.
You should add the ~"Danger bot" label to the merge request before sending it
for review.

View File

@ -181,11 +181,7 @@ You need at least the Developer role to move a wiki page:
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/414691) in GitLab 16.3 [with a flag](../../../administration/feature_flags.md) named `print_wiki`. Disabled by default.
> - [Enabled on GitLab.com and self-managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134251/) in GitLab 16.5.
FLAG:
On self-managed GitLab, by default this feature is available.
To hide the feature, an administrator can [disable the feature flag](../../../administration/feature_flags.md) named `print_wiki`.
On GitLab.com, this feature is available.
> - Feature flag `print_wiki` removed in GitLab 16.6.
You can export a wiki page as a PDF file:

View File

@ -6,31 +6,30 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Reserved project and group names **(FREE ALL)**
Not all project & group names are allowed because they would conflict with
existing routes used by GitLab.
To not conflict with existing routes used by GitLab, some words cannot be used as project or group names.
These words are listed in the
[`path_regex.rb` file](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/path_regex.rb),
where:
For a list of words that are not allowed to be used as group or project names, see the
[`path_regex.rb` file](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/path_regex.rb)
under the `TOP_LEVEL_ROUTES`, `PROJECT_WILDCARD_ROUTES` and `GROUP_ROUTES` lists:
- `TOP_LEVEL_ROUTES`: are names that are reserved as usernames or top level groups
- `PROJECT_WILDCARD_ROUTES`: are names that are reserved for child groups or projects.
- `GROUP_ROUTES`: are names that are reserved for all groups or projects.
- `TOP_LEVEL_ROUTES` are names reserved as usernames or top-level groups.
- `PROJECT_WILDCARD_ROUTES` are names reserved for child groups or projects.
- `GROUP_ROUTES` are names reserved for all groups or projects.
## Limitations on project and group names
- Project or group names must start with a letter, digit, emoji, or "_".
- Project names can only contain letters, digits, emoji, "_", ".", "+", dashes, or spaces.
- Group names can only contain letters, digits, emoji, "_", ".", parenthesis, dashes, or spaces.
- Project or group slugs must start with a letter or digit.
- Project or group slugs can only contain letters, digits, '_', '.', or dashes.
- Project or group slugs must not contain consecutive special characters.
- Project or group slugs cannot start or end with a special character.
- Project or group slugs cannot end in `.git` or `.atom`.
- Project or group names must start with a letter (`a-zA-Z`), digit (`0-9`), emoji, or underscore (`_`). Additionally:
- Project names can contain only letters (`a-zA-Z`), digits (`0-9`), emoji, underscores (`_`), dots (`.`), pluses (`+`), dashes (`-`), or spaces.
- Group names can contain only letters (`a-zA-Z`), digits (`0-9`), emoji, underscores (`_`), dots (`.`), parentheses (`()`), dashes (`-`), or spaces.
- Project or group slugs:
- Must start with a letter (`a-zA-Z`) or digit (`0-9`).
- Must not contain consecutive special characters.
- Cannot start or end with a special character.
- Cannot end in `.git` or `.atom`.
- Can contain only letters (`a-zA-Z`), digits (`0-9`), underscores (`_`), dots (`.`), or dashes (`-`).
## Reserved project names
It is not possible to create a project with the following names:
You cannot create projects with the following names:
- `\-`
- `badges`
@ -56,7 +55,7 @@ It is not possible to create a project with the following names:
## Reserved group names
The following names are reserved as top level groups:
You cannot create groups with the following names, because they are reserved for top-level groups:
- `\-`
- `.well-known`
@ -98,6 +97,6 @@ The following names are reserved as top level groups:
- `users`
- `v2`
These group names are unavailable as subgroup names:
You cannot create subgroups with the following names:
- `\-`

View File

@ -17,14 +17,14 @@ module Gitlab
def self.check_circular_dependencies!(jobs)
new(jobs).tsort
rescue TSort::Cyclic
raise ValidationError, 'The pipeline has circular dependencies'
rescue TSort::Cyclic => e
raise ValidationError, "The pipeline has circular dependencies: #{e.message}"
end
def tsort_each_child(node, &block)
return unless @nodes[node]
raise TSort::Cyclic, /topological sort failed/ if @nodes[node].include?(node)
raise TSort::Cyclic, "self-dependency: #{node}" if @nodes[node].include?(node)
@nodes[node].each(&block)
end

View File

@ -190,7 +190,7 @@
"remark-rehype": "^10.1.0",
"scrollparent": "^2.0.1",
"semver": "^7.3.4",
"sentrybrowser": "npm:@sentry/browser@7.75.1",
"sentrybrowser": "npm:@sentry/browser@7.76.0",
"sentrybrowser5": "npm:@sentry/browser@5.30.0",
"sortablejs": "^1.10.2",
"string-hash": "1.1.3",

View File

@ -124,12 +124,4 @@ RSpec.describe 'Project Network Graph', :js, feature_category: :groups_and_proje
end
it_behaves_like 'network graph'
context 'when disable_network_graph_notes_count is disabled' do
before do
stub_feature_flags(disable_network_graph_notes_count: false)
end
it_behaves_like 'network graph'
end
end

View File

@ -3,7 +3,7 @@
require 'fast_spec_helper'
require 'tsort'
RSpec.describe Gitlab::Ci::YamlProcessor::Dag do
RSpec.describe Gitlab::Ci::YamlProcessor::Dag, feature_category: :pipeline_composition do
let(:nodes) { {} }
subject(:result) { described_class.new(nodes).tsort }
@ -33,7 +33,7 @@ RSpec.describe Gitlab::Ci::YamlProcessor::Dag do
end
it 'raises TSort::Cyclic error' do
expect { result }.to raise_error(TSort::Cyclic, /topological sort failed/)
expect { result }.to raise_error(TSort::Cyclic, "self-dependency: job_a")
end
end
end

View File

@ -3433,7 +3433,7 @@ module Gitlab
YAML
end
it_behaves_like 'returns errors', 'The pipeline has circular dependencies'
it_behaves_like 'returns errors', 'The pipeline has circular dependencies: topological sort failed: ["job_a", "job_c", "job_b"]'
context 'when a job has a self-dependency' do
let(:config) do
@ -3449,7 +3449,7 @@ module Gitlab
YAML
end
it_behaves_like 'returns errors', 'The pipeline has circular dependencies'
it_behaves_like 'returns errors', 'The pipeline has circular dependencies: self-dependency: job'
end
end
end

View File

@ -223,19 +223,26 @@ RSpec.describe Gitlab::Usage::MetricDefinition, feature_category: :service_ping
end
where(:instrumentation_class, :options, :events, :is_valid) do
'TotalCountMetric' | {} | [] | true
'AnotherClass' | { events: ['a'] } | [{ name: 'a', unique: 'user.id' }] | false
nil | { events: ['a'] } | [{ name: 'a', unique: 'user.id' }] | false
'RedisHLLMetric' | { events: ['a'] } | [{ name: 'a', unique: 'user.id' }] | true
'RedisHLLMetric' | { events: ['a'] } | nil | false
'RedisHLLMetric' | nil | [{ name: 'a', unique: 'user.id' }] | false
'RedisHLLMetric' | { events: ['a'] } | [{ name: 'a', unique: 'a' }] | false
'RedisHLLMetric' | { events: 'a' } | [{ name: 'a', unique: 'user.id' }] | false
'RedisHLLMetric' | { events: [2] } | [{ name: 'a', unique: 'user.id' }] | false
'RedisHLLMetric' | { events: ['a'], a: 'b' } | [{ name: 'a', unique: 'user.id' }] | false
'RedisHLLMetric' | { events: ['a'] } | [{ name: 'a', unique: 'user.id', b: 'c' }] | false
'RedisHLLMetric' | { events: ['a'] } | [{ name: 'a' }] | false
'RedisHLLMetric' | { events: ['a'] } | [{ unique: 'user.id' }] | false
'AnotherClass' | { events: ['a'] } | [{ name: 'a', unique: 'user.id' }] | false
nil | { events: ['a'] } | [{ name: 'a', unique: 'user.id' }] | false
'RedisHLLMetric' | { events: ['a'] } | [{ name: 'a', unique: 'user.id' }] | true
'RedisHLLMetric' | { events: ['a'] } | nil | false
'RedisHLLMetric' | nil | [{ name: 'a', unique: 'user.id' }] | false
'RedisHLLMetric' | { events: ['a'] } | [{ name: 'a', unique: 'a' }] | false
'RedisHLLMetric' | { events: 'a' } | [{ name: 'a', unique: 'user.id' }] | false
'RedisHLLMetric' | { events: [2] } | [{ name: 'a', unique: 'user.id' }] | false
'RedisHLLMetric' | { events: ['a'], a: 'b' } | [{ name: 'a', unique: 'user.id' }] | false
'RedisHLLMetric' | { events: ['a'] } | [{ name: 'a', unique: 'user.id', b: 'c' }] | false
'RedisHLLMetric' | { events: ['a'] } | [{ name: 'a' }] | false
'RedisHLLMetric' | { events: ['a'] } | [{ unique: 'user.id' }] | false
'TotalCountMetric' | { events: ['a'] } | [{ name: 'a' }] | true
'TotalCountMetric' | { events: ['a'] } | [{ name: 'a', unique: 'user.id' }] | false
'TotalCountMetric' | { events: ['a'] } | nil | false
'TotalCountMetric' | nil | [{ name: 'a' }] | false
'TotalCountMetric' | { events: [2] } | [{ name: 'a' }] | false
'TotalCountMetric' | { events: ['a'] } | [{}] | false
'TotalCountMetric' | 'a' | [{ name: 'a' }] | false
'TotalCountMetric' | { events: ['a'], a: 'b' } | [{ name: 'a' }] | false
end
with_them do
@ -300,11 +307,26 @@ RSpec.describe Gitlab::Usage::MetricDefinition, feature_category: :service_ping
where(:instrumentation_class, :options, :is_valid) do
'AnotherClass' | { events: ['a'] } | false
'RedisHLLMetric' | { events: ['a'] } | true
'RedisHLLMetric' | nil | false
'RedisHLLMetric' | {} | false
'RedisHLLMetric' | { events: ['a'], b: 'c' } | false
'RedisHLLMetric' | { events: [2] } | false
'RedisHLLMetric' | { events: 'a' } | false
'RedisHLLMetric' | { event: ['a'] } | false
'AggregatedMetric' | {} | true
'AggregatedMetric' | { aggregate: { operator: 'OR', attribute: 'user_id' }, events: ['a'] } | true
'AggregatedMetric' | { aggregate: { operator: 'AND', attribute: 'project_id' }, events: %w[b c] } | true
'AggregatedMetric' | nil | false
'AggregatedMetric' | {} | false
'AggregatedMetric' | { aggregate: { operator: 'OR', attribute: 'user_id' }, events: ['a'], event: 'a' } | false
'AggregatedMetric' | { aggregate: { operator: 'OR', attribute: 'user_id' } } | false
'AggregatedMetric' | { events: ['a'] } | false
'AggregatedMetric' | { aggregate: { operator: 'OR', attribute: 'user_id' }, events: 'a' } | false
'AggregatedMetric' | { aggregate: 'a', events: ['a'] } | false
'AggregatedMetric' | { aggregate: { operator: 'OR' }, events: ['a'] } | false
'AggregatedMetric' | { aggregate: { attribute: 'user_id' }, events: ['a'] } | false
'AggregatedMetric' | { aggregate: { operator: 'OR', attribute: 'user_id', a: 'b' }, events: ['a'] } | false
'AggregatedMetric' | { aggregate: { operator: '???', attribute: 'user_id' }, events: ['a'] } | false
'AggregatedMetric' | { aggregate: { operator: 'OR', attribute: ['user_id'] }, events: ['a'] } | false
end
with_them do

View File

@ -4,7 +4,6 @@ require 'spec_helper'
RSpec.describe Network::Graph, feature_category: :source_code_management do
let(:project) { create(:project, :repository) }
let!(:note_on_commit) { create(:note_on_commit, project: project) }
describe '#initialize' do
let(:graph) do
@ -14,16 +13,6 @@ RSpec.describe Network::Graph, feature_category: :source_code_management do
it 'has initialized' do
expect(graph).to be_a(described_class)
end
context 'when disable_network_graph_note_counts is disabled' do
before do
stub_feature_flags(disable_network_graph_notes_count: false)
end
it 'initializes the notes hash' do
expect(graph.notes).to eq({ note_on_commit.commit_id => 1 })
end
end
end
describe '#commits' do

View File

@ -1913,14 +1913,14 @@
estree-walker "^2.0.2"
picomatch "^2.3.1"
"@sentry-internal/tracing@7.75.1":
version "7.75.1"
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.75.1.tgz#978c5ec58a704c423a9b33a58ca3e3e6521725f8"
integrity sha512-nynV+7iVcF8k3CqhvI2K7iA8h4ovJhgYHKnXR8RDDevQOqNG2AEX9+hjCj9fZM4MhKHYFqf1od2oO9lTr38kwg==
"@sentry-internal/tracing@7.76.0":
version "7.76.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.76.0.tgz#36c54425bc20c08e569e6da52e13d325611cad66"
integrity sha512-QQVIv+LS2sbGf/e5P2dRisHzXpy02dAcLqENLPG4sZ9otRaFNjdFYEqnlJ4qko+ORpJGQEQp/BX7Q/qzZQHlAg==
dependencies:
"@sentry/core" "7.75.1"
"@sentry/types" "7.75.1"
"@sentry/utils" "7.75.1"
"@sentry/core" "7.76.0"
"@sentry/types" "7.76.0"
"@sentry/utils" "7.76.0"
"@sentry/core@5.30.0":
version "5.30.0"
@ -1933,13 +1933,13 @@
"@sentry/utils" "5.30.0"
tslib "^1.9.3"
"@sentry/core@7.75.1":
version "7.75.1"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.75.1.tgz#f48cc424990ee4f31541e93f2c0277bfd5be9ed3"
integrity sha512-Kw4KyKBxbxbh8OKO0S11Tm0gWP+6AaXXYrsq3hp8H338l/wOmIzyckmCbUrc/XJeoRqaFLJbdcCrcUEDZUvsVQ==
"@sentry/core@7.76.0":
version "7.76.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.76.0.tgz#b0d1dc399a862ea8a1c8a1c60a409e92eaf8e9e1"
integrity sha512-M+ptkCTeCNf6fn7p2MmEb1Wd9/JXUWxIT/0QEc+t11DNR4FYy1ZP2O9Zb3Zp2XacO7ORrlL3Yc+VIfl5JTgjfw==
dependencies:
"@sentry/types" "7.75.1"
"@sentry/utils" "7.75.1"
"@sentry/types" "7.76.0"
"@sentry/utils" "7.76.0"
"@sentry/hub@5.30.0":
version "5.30.0"
@ -1959,25 +1959,25 @@
"@sentry/types" "5.30.0"
tslib "^1.9.3"
"@sentry/replay@7.75.1":
version "7.75.1"
resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.75.1.tgz#7790e80f7cb4dc856f5e72f70a51febd5898e04d"
integrity sha512-MKQTDWNYs9QXCJ+irGX5gu8Kxdk/Ds5puhILy8+DnCoXgXuPFRMGob1Sxt8qXmbQmcGeogsx221MNTselsRS6g==
"@sentry/replay@7.76.0":
version "7.76.0"
resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.76.0.tgz#bccf9ea4a6efc332a79d6a78f923697b9b283371"
integrity sha512-OACT7MfMHC/YGKnKST8SF1d6znr3Yu8fpUpfVVh2t9TNeh3+cQJVTOliHDqLy+k9Ljd5FtitgSn4IHtseCHDLQ==
dependencies:
"@sentry-internal/tracing" "7.75.1"
"@sentry/core" "7.75.1"
"@sentry/types" "7.75.1"
"@sentry/utils" "7.75.1"
"@sentry-internal/tracing" "7.76.0"
"@sentry/core" "7.76.0"
"@sentry/types" "7.76.0"
"@sentry/utils" "7.76.0"
"@sentry/types@5.30.0":
version "5.30.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402"
integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==
"@sentry/types@7.75.1":
version "7.75.1"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.75.1.tgz#48b11336a0e70433d41bbe41c617dd339d4992ea"
integrity sha512-km+ygqgMDaFfTrbQwdhrptFqx0Oq15jZABqIoIpbaOCkCAMm+tyCqrFS8dTfaq5wpCktqWOy2qU/DOpppO99Cg==
"@sentry/types@7.76.0":
version "7.76.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.76.0.tgz#628c9899bfa82ea762708314c50fd82f2138587d"
integrity sha512-vj6z+EAbVrKAXmJPxSv/clpwS9QjPqzkraMFk2hIdE/kii8s8kwnkBwTSpIrNc8GnzV3qYC4r3qD+BXDxAGPaw==
"@sentry/utils@5.30.0":
version "5.30.0"
@ -1987,12 +1987,12 @@
"@sentry/types" "5.30.0"
tslib "^1.9.3"
"@sentry/utils@7.75.1":
version "7.75.1"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.75.1.tgz#169040ba13ff4d4ecccb7b7aa23f84724d108b97"
integrity sha512-QzW2eRjY20epD//9/tQ0FTNwdAL6XZi+LyJNUQIeK3NMnc5NgHrgpxId87gmFq8cNx47utH1Blub8RuMbKqiwQ==
"@sentry/utils@7.76.0":
version "7.76.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.76.0.tgz#6b540b387d3ac539abd20978f4d3ae235114f6ab"
integrity sha512-40jFD+yfQaKpFYINghdhovzec4IEpB7aAuyH/GtE7E0gLpcqnC72r55krEIVILfqIR2Mlr5OKUzyeoCyWAU/yw==
dependencies:
"@sentry/types" "7.75.1"
"@sentry/types" "7.76.0"
"@sinclair/typebox@^0.24.1":
version "0.24.40"
@ -11775,16 +11775,16 @@ send@0.17.2:
"@sentry/utils" "5.30.0"
tslib "^1.9.3"
"sentrybrowser@npm:@sentry/browser@7.75.1":
version "7.75.1"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.75.1.tgz#70422d26e2651443bcf15ea6bb5142774926c5ae"
integrity sha512-0+jPfPA5P9HVYYRQraDokGCY2NiMknSfz11dggClK4VmjvG+hOXiEyf73SFVwLFnv/hwrkWySjoIrVCX65xXQA==
"sentrybrowser@npm:@sentry/browser@7.76.0":
version "7.76.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.76.0.tgz#7d73573790023523f7d9c3757b8424b7ad60d664"
integrity sha512-83xA+cWrBhhkNuMllW5ucFsEO2NlUh2iBYtmg07lp3fyVW+6+b1yMKRnc4RFArJ+Wcq6UO+qk2ZEvrSAts1wEw==
dependencies:
"@sentry-internal/tracing" "7.75.1"
"@sentry/core" "7.75.1"
"@sentry/replay" "7.75.1"
"@sentry/types" "7.75.1"
"@sentry/utils" "7.75.1"
"@sentry-internal/tracing" "7.76.0"
"@sentry/core" "7.76.0"
"@sentry/replay" "7.76.0"
"@sentry/types" "7.76.0"
"@sentry/utils" "7.76.0"
serialize-javascript@^2.1.2:
version "2.1.2"