Skip to content
Snippets Groups Projects
Commit 2a65a97e authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 2d96e61c
No related branches found
No related tags found
No related merge requests found
Showing
with 164 additions and 18 deletions
Loading
Loading
@@ -42,7 +42,6 @@ export default {
 
<template>
<li class="linked-pipeline build">
<div class="curve"></div>
<gl-button
:id="buttonId"
v-gl-tooltip
Loading
Loading
Loading
Loading
@@ -9,11 +9,11 @@ module ClustersHelper
def create_new_cluster_label(provider: nil)
case provider
when 'aws'
s_('ClusterIntegration|Create new Cluster on EKS')
s_('ClusterIntegration|Create new cluster on EKS')
when 'gcp'
s_('ClusterIntegration|Create new Cluster on GKE')
s_('ClusterIntegration|Create new cluster on GKE')
else
s_('ClusterIntegration|Create new Cluster')
s_('ClusterIntegration|Create new cluster')
end
end
 
Loading
Loading
Loading
Loading
@@ -205,4 +205,4 @@ module TodosHelper
end
end
 
TodosHelper.prepend_if_ee('EE::NotesHelper'); TodosHelper.prepend_if_ee('EE::TodosHelper') # rubocop: disable Style/Semicolon
TodosHelper.prepend_if_ee('EE::TodosHelper')
Loading
Loading
@@ -762,6 +762,10 @@ module Ci
Gitlab::Ci::Build::Credentials::Factory.new(self).create!
end
 
def all_dependencies
(dependencies + cross_dependencies).uniq
end
def dependencies
return [] if empty_dependencies?
 
Loading
Loading
@@ -782,6 +786,10 @@ module Ci
depended_jobs
end
 
def cross_dependencies
[]
end
def empty_dependencies?
options[:dependencies]&.empty?
end
Loading
Loading
Loading
Loading
@@ -47,6 +47,12 @@ class CommitStatus < ApplicationRecord
scope :after_stage, -> (index) { where('stage_idx > ?', index) }
scope :processables, -> { where(type: %w[Ci::Build Ci::Bridge]) }
scope :for_ids, -> (ids) { where(id: ids) }
scope :for_ref, -> (ref) { where(ref: ref) }
scope :by_name, -> (name) { where(name: name) }
scope :for_project_paths, -> (paths) do
where(project: Project.where_full_path_in(Array(paths)))
end
 
scope :with_preloads, -> do
preload(:project, :user)
Loading
Loading
---
title: Harmonize capitalization on cluster UI
merge_request: 21878
author: Evan Read
type: other
---
title: Strong validate import export references
merge_request: 19682
author:
type: added
Loading
Loading
@@ -8,6 +8,8 @@
#
# rubocop:disable Metrics/AbcSize
def instrument_classes(instrumentation)
return if ENV['STATIC_VERIFICATION']
instrumentation.instrument_instance_methods(Gitlab::Shell)
 
instrumentation.instrument_methods(Gitlab::Git)
Loading
Loading
# frozen_string_literal: true
class AddIndexForCrossProjectsDependenciesToCiBuilds < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :ci_builds, [:project_id, :name, :ref],
where: "type = 'Ci::Build' AND status = 'success' AND (retried = FALSE OR retried IS NULL)"
end
def down
remove_concurrent_index :ci_builds, [:project_id, :name, :ref],
where: "type = 'Ci::Build' AND status = 'success' AND (retried = FALSE OR retried IS NULL)"
end
end
Loading
Loading
@@ -693,6 +693,7 @@ ActiveRecord::Schema.define(version: 2019_12_16_183532) do
t.index ["commit_id", "type", "ref"], name: "index_ci_builds_on_commit_id_and_type_and_ref"
t.index ["name"], name: "index_ci_builds_on_name_for_security_products_values", where: "((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text]))"
t.index ["project_id", "id"], name: "index_ci_builds_on_project_id_and_id"
t.index ["project_id", "name", "ref"], name: "index_ci_builds_on_project_id_and_name_and_ref", where: "(((type)::text = 'Ci::Build'::text) AND ((status)::text = 'success'::text) AND ((retried = false) OR (retried IS NULL)))"
t.index ["project_id", "status"], name: "index_ci_builds_project_id_and_status_for_live_jobs_partial2", where: "(((type)::text = 'Ci::Build'::text) AND ((status)::text = ANY (ARRAY[('running'::character varying)::text, ('pending'::character varying)::text, ('created'::character varying)::text])))"
t.index ["project_id"], name: "index_ci_builds_on_project_id_for_successfull_pages_deploy", where: "(((type)::text = 'GenericCommitStatus'::text) AND ((stage)::text = 'deploy'::text) AND ((name)::text = 'pages:deploy'::text) AND ((status)::text = 'success'::text))"
t.index ["protected"], name: "index_ci_builds_on_protected"
Loading
Loading
Loading
Loading
@@ -53,7 +53,7 @@ Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/over
 
- This utility can help you check if one method would override
another or not. It is the same concept as Java's `@Override` annotation
or Scala's `override` keyword. However, you should only do this check when
or Scala's `override` keyword. However, we only run this check when
`ENV['STATIC_VERIFICATION']` is set to avoid production runtime overhead.
This is useful for checking:
 
Loading
Loading
@@ -94,6 +94,15 @@ Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/over
end
```
 
Note that the check will only happen when either:
- The overriding method is defined in a class, or:
- The overriding method is defined in a module, and it's prepended to
a class or a module.
Because only a class or prepended module can actually override a method.
Including or extending a module into another cannot override anything.
## `StrongMemoize`
 
Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/strong_memoize.rb>:
Loading
Loading
Loading
Loading
@@ -1672,7 +1672,7 @@ module API
expose :artifacts, using: Artifacts
expose :cache, using: Cache
expose :credentials, using: Credentials
expose :dependencies, using: Dependency
expose :all_dependencies, as: :dependencies, using: Dependency
expose :features
end
end
Loading
Loading
Loading
Loading
@@ -134,7 +134,7 @@ module Gitlab
 
entry :needs, Entry::Needs,
description: 'Needs configuration for this job.',
metadata: { allowed_needs: %i[job] },
metadata: { allowed_needs: %i[job cross_dependency] },
inherit: false
 
entry :variables, Entry::Variables,
Loading
Loading
Loading
Loading
@@ -6,7 +6,9 @@ module Gitlab
module Entry
class Need < ::Gitlab::Config::Entry::Simplifiable
strategy :JobString, if: -> (config) { config.is_a?(String) }
strategy :JobHash, if: -> (config) { config.is_a?(Hash) && config.key?(:job) }
strategy :JobHash,
if: -> (config) { config.is_a?(Hash) && config.key?(:job) && !(config.key?(:project) || config.key?(:ref)) }
 
class JobString < ::Gitlab::Config::Entry::Node
include ::Gitlab::Config::Entry::Validatable
Loading
Loading
Loading
Loading
@@ -53,3 +53,5 @@ module Gitlab
end
end
end
::Gitlab::Ci::Config::Entry::Needs.prepend_if_ee('::EE::Gitlab::Ci::Config::Entry::Needs')
Loading
Loading
@@ -69,6 +69,7 @@ module Gitlab
services: job[:services],
artifacts: job[:artifacts],
dependencies: job[:dependencies],
cross_dependencies: job.dig(:needs, :cross_dependency),
job_timeout: job[:timeout],
before_script: job[:before_script],
script: job[:script],
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
module Gitlab
module ImportExport
class AttributeCleaner
ALLOWED_REFERENCES = RelationFactory::PROJECT_REFERENCES + RelationFactory::USER_REFERENCES + %w[group_id commit_id]
ALLOWED_REFERENCES = RelationFactory::PROJECT_REFERENCES + RelationFactory::USER_REFERENCES + %w[group_id commit_id discussion_id]
PROHIBITED_REFERENCES = Regexp.union(/\Acached_markdown_version\Z/, /_id\Z/, /_ids\Z/, /_html\Z/).freeze
 
def self.clean(*args)
Loading
Loading
Loading
Loading
@@ -172,24 +172,36 @@ excluded_attributes:
- :external_diff
- :stored_externally
- :external_diff_store
- :merge_request_id
merge_request_diff_commits:
- :merge_request_diff_id
merge_request_diff_files:
- :diff
- :external_diff_offset
- :external_diff_size
- :merge_request_diff_id
issues:
- :milestone_id
- :moved_to_id
- :state_id
- :duplicated_to_id
- :promoted_to_epic_id
merge_request:
- :milestone_id
- :ref_fetched
- :merge_jid
- :rebase_jid
- :latest_merge_request_diff_id
- :head_pipeline_id
- :state_id
merge_requests:
- :milestone_id
- :ref_fetched
- :merge_jid
- :rebase_jid
- :latest_merge_request_diff_id
- :head_pipeline_id
- :state_id
award_emoji:
- :awardable_id
statuses:
Loading
Loading
@@ -203,6 +215,16 @@ excluded_attributes:
- :artifacts_metadata_store
- :artifacts_size
- :commands
- :runner_id
- :trigger_request_id
- :erased_by_id
- :auto_canceled_by_id
- :stage_id
- :upstream_pipeline_id
- :resource_group_id
- :waiting_for_resource_at
sentry_issue:
- :issue_id
push_event_payload:
- :event_id
project_badges:
Loading
Loading
@@ -211,6 +233,9 @@ excluded_attributes:
- :reference
- :reference_html
- :epic_id
- :issue_id
- :merge_request_id
- :label_id
runners:
- :token
- :token_encrypted
Loading
Loading
@@ -222,7 +247,64 @@ excluded_attributes:
- :enabled
service_desk_setting:
- :outgoing_name
priorities:
- :label_id
events:
- :target_id
timelogs:
- :issue_id
- :merge_request_id
notes:
- :noteable_id
- :review_id
label_links:
- :label_id
- :target_id
issue_assignees:
- :issue_id
zoom_meetings:
- :issue_id
design:
- :issue_id
designs:
- :issue_id
design_versions:
- :issue_id
actions:
- :design_id
- :version_id
links:
- :release_id
project_members:
- :source_id
metrics:
- :merge_request_id
- :pipeline_id
suggestions:
- :note_id
ci_pipelines:
- :auto_canceled_by_id
- :pipeline_schedule_id
- :merge_request_id
- :external_pull_request_id
stages:
- :pipeline_id
merge_access_levels:
- :protected_branch_id
push_access_levels:
- :protected_branch_id
unprotect_access_levels:
- :protected_branch_id
create_access_levels:
- :protected_tag_id
deploy_access_levels:
- :protected_environment_id
boards:
- :milestone_id
lists:
- :board_id
- :label_id
- :milestone_id
methods:
notes:
- :type
Loading
Loading
Loading
Loading
@@ -146,7 +146,8 @@ module Gitlab
def prepended(base = nil)
super
 
queue_verification(base) if base
# prepend can override methods, thus we need to verify it like classes
queue_verification(base, verify: true) if base
end
 
def extended(mod = nil)
Loading
Loading
@@ -155,11 +156,15 @@ module Gitlab
queue_verification(mod.singleton_class) if mod
end
 
def queue_verification(base)
def queue_verification(base, verify: false)
return unless ENV['STATIC_VERIFICATION']
 
if base.is_a?(Class) # We could check for Class in `override`
# This could be `nil` if `override` was never called
# We could check for Class in `override`
# This could be `nil` if `override` was never called.
# We also force verification for prepend because it can also override
# a method like a class, but not the cases for include or extend.
# This includes Rails helpers but not limited to.
if base.is_a?(Class) || verify
Override.extensions[self]&.add_class(base)
end
end
Loading
Loading
Loading
Loading
@@ -3790,13 +3790,13 @@ msgstr ""
msgid "ClusterIntegration|Create cluster on"
msgstr ""
 
msgid "ClusterIntegration|Create new Cluster"
msgid "ClusterIntegration|Create new cluster"
msgstr ""
 
msgid "ClusterIntegration|Create new Cluster on EKS"
msgid "ClusterIntegration|Create new cluster on EKS"
msgstr ""
 
msgid "ClusterIntegration|Create new Cluster on GKE"
msgid "ClusterIntegration|Create new cluster on GKE"
msgstr ""
 
msgid "ClusterIntegration|Creating Kubernetes cluster"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment