Add latest changes from gitlab-org/gitlab@master
|
@ -908,10 +908,12 @@ class User < ApplicationRecord
|
|||
|
||||
# Returns the groups a user has access to, either through a membership or a project authorization
|
||||
def authorized_groups
|
||||
if Feature.enabled?(:shared_group_membership_auth, self)
|
||||
authorized_groups_with_shared_membership
|
||||
else
|
||||
authorized_groups_without_shared_membership
|
||||
Group.unscoped do
|
||||
if Feature.enabled?(:shared_group_membership_auth, self)
|
||||
authorized_groups_with_shared_membership
|
||||
else
|
||||
authorized_groups_without_shared_membership
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Add migration to populate pipeline_id in Vulnerability Feedback
|
||||
merge_request: 46266
|
||||
author:
|
||||
type: added
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Make Terraform/Base.latest.gitlab-ci.yml template safer to use in projects that have non-terraform jobs
|
||||
merge_request: 47254
|
||||
author:
|
||||
type: changed
|
|
@ -0,0 +1,33 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class SchedulePopulateVulnerabilityFeedbackPipelineId < ActiveRecord::Migration[6.0]
|
||||
include Gitlab::Database::MigrationHelpers
|
||||
|
||||
DOWNTIME = false
|
||||
INTERVAL = 2.minutes.to_i
|
||||
BATCH_SIZE = 100
|
||||
MIGRATION = 'PopulateVulnerabilityFeedbackPipelineId'
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
return unless Gitlab.ee?
|
||||
|
||||
vulnerability_feedback = exec_query <<~SQL
|
||||
SELECT DISTINCT "vulnerability_feedback"."project_id"
|
||||
FROM "vulnerability_feedback"
|
||||
WHERE "vulnerability_feedback"."pipeline_id" IS NULL
|
||||
ORDER BY "vulnerability_feedback"."project_id" ASC
|
||||
SQL
|
||||
|
||||
return if vulnerability_feedback.rows.blank?
|
||||
|
||||
vulnerability_feedback.rows.flatten.in_groups_of(BATCH_SIZE, false).each_with_index do |project_ids, index|
|
||||
migrate_in(index * INTERVAL, MIGRATION, [project_ids])
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
# no-op
|
||||
end
|
||||
end
|
|
@ -0,0 +1 @@
|
|||
ab2b8af98a8a29658f92c302d45668c7b9f8f5234ef35f4311a0f0ebbd954ec8
|
|
@ -20806,6 +20806,41 @@ Time represented in ISO 8601
|
|||
"""
|
||||
scalar Time
|
||||
|
||||
"""
|
||||
Represents the time report stats for timeboxes
|
||||
"""
|
||||
type TimeReportStats {
|
||||
"""
|
||||
Completed issues metrics
|
||||
"""
|
||||
complete: TimeboxMetrics
|
||||
|
||||
"""
|
||||
Incomplete issues metrics
|
||||
"""
|
||||
incomplete: TimeboxMetrics
|
||||
|
||||
"""
|
||||
Total issues metrics
|
||||
"""
|
||||
total: TimeboxMetrics
|
||||
}
|
||||
|
||||
"""
|
||||
Represents measured stats metrics for timeboxes
|
||||
"""
|
||||
type TimeboxMetrics {
|
||||
"""
|
||||
The count metric
|
||||
"""
|
||||
count: Int!
|
||||
|
||||
"""
|
||||
The weight metric
|
||||
"""
|
||||
weight: Int!
|
||||
}
|
||||
|
||||
"""
|
||||
Represents a historically accurate report about the timebox
|
||||
"""
|
||||
|
@ -20814,6 +20849,11 @@ type TimeboxReport {
|
|||
Daily scope and completed totals for burnup charts
|
||||
"""
|
||||
burnupTimeSeries: [BurnupChartDailyTotals!]
|
||||
|
||||
"""
|
||||
Represents the time report stats for the timebox
|
||||
"""
|
||||
stats: TimeReportStats
|
||||
}
|
||||
|
||||
interface TimeboxReportInterface {
|
||||
|
|
|
@ -60459,6 +60459,110 @@
|
|||
"enumValues": null,
|
||||
"possibleTypes": null
|
||||
},
|
||||
{
|
||||
"kind": "OBJECT",
|
||||
"name": "TimeReportStats",
|
||||
"description": "Represents the time report stats for timeboxes",
|
||||
"fields": [
|
||||
{
|
||||
"name": "complete",
|
||||
"description": "Completed issues metrics",
|
||||
"args": [
|
||||
|
||||
],
|
||||
"type": {
|
||||
"kind": "OBJECT",
|
||||
"name": "TimeboxMetrics",
|
||||
"ofType": null
|
||||
},
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
},
|
||||
{
|
||||
"name": "incomplete",
|
||||
"description": "Incomplete issues metrics",
|
||||
"args": [
|
||||
|
||||
],
|
||||
"type": {
|
||||
"kind": "OBJECT",
|
||||
"name": "TimeboxMetrics",
|
||||
"ofType": null
|
||||
},
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
},
|
||||
{
|
||||
"name": "total",
|
||||
"description": "Total issues metrics",
|
||||
"args": [
|
||||
|
||||
],
|
||||
"type": {
|
||||
"kind": "OBJECT",
|
||||
"name": "TimeboxMetrics",
|
||||
"ofType": null
|
||||
},
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
}
|
||||
],
|
||||
"inputFields": null,
|
||||
"interfaces": [
|
||||
|
||||
],
|
||||
"enumValues": null,
|
||||
"possibleTypes": null
|
||||
},
|
||||
{
|
||||
"kind": "OBJECT",
|
||||
"name": "TimeboxMetrics",
|
||||
"description": "Represents measured stats metrics for timeboxes",
|
||||
"fields": [
|
||||
{
|
||||
"name": "count",
|
||||
"description": "The count metric",
|
||||
"args": [
|
||||
|
||||
],
|
||||
"type": {
|
||||
"kind": "NON_NULL",
|
||||
"name": null,
|
||||
"ofType": {
|
||||
"kind": "SCALAR",
|
||||
"name": "Int",
|
||||
"ofType": null
|
||||
}
|
||||
},
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
},
|
||||
{
|
||||
"name": "weight",
|
||||
"description": "The weight metric",
|
||||
"args": [
|
||||
|
||||
],
|
||||
"type": {
|
||||
"kind": "NON_NULL",
|
||||
"name": null,
|
||||
"ofType": {
|
||||
"kind": "SCALAR",
|
||||
"name": "Int",
|
||||
"ofType": null
|
||||
}
|
||||
},
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
}
|
||||
],
|
||||
"inputFields": null,
|
||||
"interfaces": [
|
||||
|
||||
],
|
||||
"enumValues": null,
|
||||
"possibleTypes": null
|
||||
},
|
||||
{
|
||||
"kind": "OBJECT",
|
||||
"name": "TimeboxReport",
|
||||
|
@ -60485,6 +60589,20 @@
|
|||
},
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
},
|
||||
{
|
||||
"name": "stats",
|
||||
"description": "Represents the time report stats for the timebox",
|
||||
"args": [
|
||||
|
||||
],
|
||||
"type": {
|
||||
"kind": "OBJECT",
|
||||
"name": "TimeReportStats",
|
||||
"ofType": null
|
||||
},
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
}
|
||||
],
|
||||
"inputFields": null,
|
||||
|
|
|
@ -3057,6 +3057,25 @@ Represents a requirement test report.
|
|||
| `id` | ID! | ID of the test report |
|
||||
| `state` | TestReportState! | State of the test report |
|
||||
|
||||
### TimeReportStats
|
||||
|
||||
Represents the time report stats for timeboxes.
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `complete` | TimeboxMetrics | Completed issues metrics |
|
||||
| `incomplete` | TimeboxMetrics | Incomplete issues metrics |
|
||||
| `total` | TimeboxMetrics | Total issues metrics |
|
||||
|
||||
### TimeboxMetrics
|
||||
|
||||
Represents measured stats metrics for timeboxes.
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `count` | Int! | The count metric |
|
||||
| `weight` | Int! | The weight metric |
|
||||
|
||||
### TimeboxReport
|
||||
|
||||
Represents a historically accurate report about the timebox.
|
||||
|
@ -3064,6 +3083,7 @@ Represents a historically accurate report about the timebox.
|
|||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `burnupTimeSeries` | BurnupChartDailyTotals! => Array | Daily scope and completed totals for burnup charts |
|
||||
| `stats` | TimeReportStats | Represents the time report stats for the timebox |
|
||||
|
||||
### Timelog
|
||||
|
||||
|
|
Before Width: | Height: | Size: 232 KiB After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 288 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 219 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 398 KiB After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 534 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 323 KiB After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 269 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 476 KiB After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 484 KiB After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 295 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 355 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 342 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 577 KiB After Width: | Height: | Size: 216 KiB |
Before Width: | Height: | Size: 357 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 234 KiB After Width: | Height: | Size: 141 KiB |
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 97 KiB |
|
@ -387,8 +387,8 @@ module API
|
|||
render_api_error!('401 Unauthorized', 401)
|
||||
end
|
||||
|
||||
def not_allowed!
|
||||
render_api_error!('405 Method Not Allowed', 405)
|
||||
def not_allowed!(message = nil)
|
||||
render_api_error!(message || '405 Method Not Allowed', :method_not_allowed)
|
||||
end
|
||||
|
||||
def not_acceptable!
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module BackgroundMigration
|
||||
# This class updates vulnerability feedback entities with no pipeline id assigned.
|
||||
class PopulateVulnerabilityFeedbackPipelineId
|
||||
def perform(project_ids)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Gitlab::BackgroundMigration::PopulateVulnerabilityFeedbackPipelineId.prepend_if_ee('EE::Gitlab::BackgroundMigration::PopulateVulnerabilityFeedbackPipelineId')
|
|
@ -12,9 +12,6 @@
|
|||
image:
|
||||
name: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
|
||||
|
||||
before_script:
|
||||
- cd ${TF_ROOT}
|
||||
|
||||
variables:
|
||||
TF_ROOT: ${CI_PROJECT_DIR}
|
||||
|
||||
|
@ -26,16 +23,19 @@ cache:
|
|||
.init: &init
|
||||
stage: init
|
||||
script:
|
||||
- cd ${TF_ROOT}
|
||||
- gitlab-terraform init
|
||||
|
||||
.validate: &validate
|
||||
stage: validate
|
||||
script:
|
||||
- cd ${TF_ROOT}
|
||||
- gitlab-terraform validate
|
||||
|
||||
.build: &build
|
||||
stage: build
|
||||
script:
|
||||
- cd ${TF_ROOT}
|
||||
- gitlab-terraform plan
|
||||
- gitlab-terraform plan-json
|
||||
artifacts:
|
||||
|
@ -47,6 +47,7 @@ cache:
|
|||
.deploy: &deploy
|
||||
stage: deploy
|
||||
script:
|
||||
- cd ${TF_ROOT}
|
||||
- gitlab-terraform apply
|
||||
when: manual
|
||||
only:
|
||||
|
|