Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
2aa98751c9
commit
08c975cb5d
|
@ -114,7 +114,7 @@ class Issue < ApplicationRecord
|
|||
scope :order_severity_desc, -> { includes(:issuable_severity).order('issuable_severities.severity DESC NULLS LAST') }
|
||||
|
||||
scope :preload_associated_models, -> { preload(:assignees, :labels, project: :namespace) }
|
||||
scope :with_web_entity_associations, -> { preload(:author, :project) }
|
||||
scope :with_web_entity_associations, -> { preload(:author, project: [:project_feature, :route, namespace: :route]) }
|
||||
scope :with_label_attributes, ->(label_attributes) { joins(:labels).where(labels: label_attributes) }
|
||||
scope :with_alert_management_alerts, -> { joins(:alert_management_alert) }
|
||||
scope :with_prometheus_alert_events, -> { joins(:issues_prometheus_alert_events) }
|
||||
|
|
|
@ -21,20 +21,8 @@ class BuildArtifactEntity < Grape::Entity
|
|||
)
|
||||
end
|
||||
|
||||
expose :keep_path, if: -> (*) { artifact.expiring? && show_duplicated_paths?(project) } do |artifact|
|
||||
fast_keep_project_job_artifacts_path(project, artifact.job)
|
||||
end
|
||||
|
||||
expose :browse_path, if: -> (*) { show_duplicated_paths?(project) } do |artifact|
|
||||
fast_browse_project_job_artifacts_path(project, artifact.job)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def show_duplicated_paths?(project)
|
||||
!Gitlab::Ci::Features.remove_duplicate_artifact_exposure_paths?(project)
|
||||
end
|
||||
|
||||
def project
|
||||
options[:project] || artifact.project
|
||||
end
|
||||
|
|
|
@ -50,23 +50,6 @@
|
|||
}
|
||||
],
|
||||
"analyzers": [
|
||||
{
|
||||
"name": "brakeman",
|
||||
"label": "Brakeman",
|
||||
"enabled" : true,
|
||||
"description": "Ruby on Rails",
|
||||
"variables": [
|
||||
{
|
||||
"field" : "SAST_BRAKEMAN_LEVEL",
|
||||
"label" : "Brakeman confidence level.",
|
||||
"type": "string",
|
||||
"default_value": "1",
|
||||
"value": "",
|
||||
"size": "SMALL",
|
||||
"description": "Ignore Brakeman vulnerabilities under given confidence level. Integer, 1=Low, 2=Medium, 3=High."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bandit",
|
||||
"label": "Bandit",
|
||||
|
@ -75,7 +58,7 @@
|
|||
"variables": [
|
||||
{
|
||||
"field" : "SAST_BANDIT_EXCLUDED_PATHS",
|
||||
"label" : "Paths to exclude from scan.",
|
||||
"label" : "Paths to exclude from scan",
|
||||
"type": "string",
|
||||
"default_value": "",
|
||||
"value": "",
|
||||
|
@ -84,6 +67,23 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "brakeman",
|
||||
"label": "Brakeman",
|
||||
"enabled" : true,
|
||||
"description": "Ruby on Rails",
|
||||
"variables": [
|
||||
{
|
||||
"field" : "SAST_BRAKEMAN_LEVEL",
|
||||
"label" : "Brakeman confidence level",
|
||||
"type": "string",
|
||||
"default_value": "1",
|
||||
"value": "",
|
||||
"size": "SMALL",
|
||||
"description": "Ignore Brakeman vulnerabilities under given confidence level. Integer, 1=Low, 2=Medium, 3=High."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "eslint",
|
||||
"label": "ESLint",
|
||||
|
@ -110,7 +110,7 @@
|
|||
},
|
||||
{
|
||||
"name": "kubesec",
|
||||
"label": "kubesec",
|
||||
"label": "Kubesec",
|
||||
"enabled" : true,
|
||||
"description": "Kubernetes manifests, Helm Charts",
|
||||
"variables": []
|
||||
|
@ -124,7 +124,7 @@
|
|||
},
|
||||
{
|
||||
"name": "gosec",
|
||||
"label": "Golang Security Checker",
|
||||
"label": "Gosec",
|
||||
"enabled" : true,
|
||||
"description": "Go",
|
||||
"variables": [
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix N+1 queries for issues search
|
||||
merge_request: 58915
|
||||
author:
|
||||
type: performance
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Small text updates on the SAST Config UI page
|
||||
merge_request: 58188
|
||||
author:
|
||||
type: changed
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Remove paths from BuildArtifactEntity
|
||||
merge_request: 58818
|
||||
author:
|
||||
type: performance
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix user reference transformation in EpicsPipeline
|
||||
merge_request: 58913
|
||||
author:
|
||||
type: fixed
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
name: remove_duplicate_artifact_exposure_paths
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/54611
|
||||
rollout_issue_url:
|
||||
milestone: '13.10'
|
||||
type: development
|
||||
group: group::testing
|
||||
default_enabled: false
|
|
@ -89,7 +89,7 @@ with secure tokens as you complete the setup process.
|
|||
We note in the instructions below where these secrets are required.
|
||||
|
||||
NOTE:
|
||||
Omnibus GitLab installations can use `gitlab-secrets.json`.
|
||||
Omnibus GitLab installations can use `gitlab-secrets.json` for `GITLAB_SHELL_SECRET_TOKEN`.
|
||||
|
||||
### PostgreSQL
|
||||
|
||||
|
|
|
@ -2782,7 +2782,7 @@ To follow progress on support for GitLab-managed clusters, see the
|
|||
|
||||
#### `environment:deployment_tier`
|
||||
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/27630) in GitLab 13.10.
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/300741) in GitLab 13.10.
|
||||
|
||||
Use the `deployment_tier` keyword to specify the tier of the deployment environment:
|
||||
|
||||
|
|
|
@ -36,13 +36,13 @@ For example:
|
|||
|
||||
To minimize problems during the documentation release process, use the following timeline:
|
||||
|
||||
- Before the 20nd of the month:
|
||||
- Any time before the 17th of the month:
|
||||
|
||||
[Add the charts version](#add-chart-version), so that the documentation is built using the
|
||||
[version of the charts project that maps to](https://docs.gitlab.com/charts/installation/version_mappings.html)
|
||||
the GitLab release. This step may have been completed already.
|
||||
|
||||
- On or near the 20th of the month:
|
||||
- Between the 17th and the 20th of the month:
|
||||
|
||||
1. [Create a stable branch and Docker image](#create-stable-branch-and-docker-image-for-release) for
|
||||
the new version.
|
||||
|
|
|
@ -12,7 +12,7 @@ module BulkImports
|
|||
DEFAULT_REFERENCE = 'user'
|
||||
|
||||
def initialize(options = {})
|
||||
@reference = options[:reference] || DEFAULT_REFERENCE
|
||||
@reference = options[:reference].to_s.presence || DEFAULT_REFERENCE
|
||||
@suffixed_reference = "#{@reference}_id"
|
||||
end
|
||||
|
||||
|
|
|
@ -63,10 +63,6 @@ module Gitlab
|
|||
def self.multiple_cache_per_job?
|
||||
::Feature.enabled?(:multiple_cache_per_job, default_enabled: :yaml)
|
||||
end
|
||||
|
||||
def self.remove_duplicate_artifact_exposure_paths?(project)
|
||||
::Feature.enabled?(:remove_duplicate_artifact_exposure_paths, project, default_enabled: :yaml)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -125,8 +125,8 @@ RSpec.describe GitlabSchema.types['Project'] do
|
|||
|
||||
it "returns the project's sast configuration for analyzer variables" do
|
||||
analyzer = subject.dig('data', 'project', 'sastCiConfiguration', 'analyzers', 'nodes').first
|
||||
expect(analyzer['name']).to eq('brakeman')
|
||||
expect(analyzer['label']).to eq('Brakeman')
|
||||
expect(analyzer['name']).to eq('bandit')
|
||||
expect(analyzer['label']).to eq('Bandit')
|
||||
expect(analyzer['enabled']).to eq(true)
|
||||
end
|
||||
|
||||
|
|
|
@ -52,19 +52,26 @@ RSpec.describe BulkImports::Common::Transformers::UserReferenceTransformer do
|
|||
end
|
||||
|
||||
context 'when custom reference is provided' do
|
||||
it 'updates provided reference' do
|
||||
hash = {
|
||||
'author' => {
|
||||
'public_email' => user.email
|
||||
shared_examples 'updates provided reference' do |reference|
|
||||
let(:hash) do
|
||||
{
|
||||
'author' => {
|
||||
'public_email' => user.email
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
transformer = described_class.new(reference: 'author')
|
||||
result = transformer.transform(context, hash)
|
||||
it 'updates provided reference' do
|
||||
transformer = described_class.new(reference: reference)
|
||||
result = transformer.transform(context, hash)
|
||||
|
||||
expect(result['author']).to be_nil
|
||||
expect(result['author_id']).to eq(user.id)
|
||||
expect(result['author']).to be_nil
|
||||
expect(result['author_id']).to eq(user.id)
|
||||
end
|
||||
end
|
||||
|
||||
include_examples 'updates provided reference', 'author'
|
||||
include_examples 'updates provided reference', :author
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -27,28 +27,6 @@ RSpec.describe BuildArtifactEntity do
|
|||
expect(subject[:path]).to include "jobs/#{job.id}/artifacts/download?file_type=codequality"
|
||||
end
|
||||
|
||||
context 'with remove_duplicate_artifact_exposure_paths enabled' do
|
||||
before do
|
||||
stub_feature_flags(remove_duplicate_artifact_exposure_paths: true)
|
||||
end
|
||||
|
||||
it 'has no keep or browse path' do
|
||||
expect(subject).not_to include(:keep_path)
|
||||
expect(subject).not_to include(:browse_path)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with remove_duplicate_artifact_exposure_paths disabled' do
|
||||
before do
|
||||
stub_feature_flags(remove_duplicate_artifact_exposure_paths: false)
|
||||
end
|
||||
|
||||
it 'has keep and browse paths' do
|
||||
expect(subject[:keep_path]).to be_present
|
||||
expect(subject[:browse_path]).to be_present
|
||||
end
|
||||
end
|
||||
|
||||
context 'when project is specified in options' do
|
||||
let(:options) { super().merge(project: job.project) }
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ RSpec.describe Security::CiConfiguration::SastParserService do
|
|||
let(:sast_analyzer_image_tag) { configuration['global'][2] }
|
||||
let(:sast_pipeline_stage) { configuration['pipeline'][0] }
|
||||
let(:sast_search_max_depth) { configuration['pipeline'][1] }
|
||||
let(:brakeman) { configuration['analyzers'][0] }
|
||||
let(:bandit) { configuration['analyzers'][1] }
|
||||
let(:bandit) { configuration['analyzers'][0] }
|
||||
let(:brakeman) { configuration['analyzers'][1] }
|
||||
let(:sast_brakeman_level) { brakeman['variables'][0] }
|
||||
|
||||
it 'parses the configuration for SAST' do
|
||||
|
|
Loading…
Reference in New Issue