Commit cea7765c authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 4eb8816d 4ecc55da
// This file only applies to use of experiments through https://gitlab.com/gitlab-org/gitlab-experiment // This file only applies to use of experiments through https://gitlab.com/gitlab-org/gitlab-experiment
import { get } from 'lodash'; import { get, pick } from 'lodash';
import { DEFAULT_VARIANT, CANDIDATE_VARIANT, TRACKING_CONTEXT_SCHEMA } from './constants'; import { DEFAULT_VARIANT, CANDIDATE_VARIANT, TRACKING_CONTEXT_SCHEMA } from './constants';
function getExperimentsData() {
return get(window, ['gon', 'experiment'], {});
}
function convertExperimentDataToExperimentContext(experimentData) {
return { schema: TRACKING_CONTEXT_SCHEMA, data: experimentData };
}
export function getExperimentData(experimentName) { export function getExperimentData(experimentName) {
return get(window, ['gon', 'experiment', experimentName]); return getExperimentsData()[experimentName];
} }
export function getExperimentContexts(...experimentNames) { export function getExperimentContexts(...experimentNames) {
return experimentNames return Object.values(pick(getExperimentsData(), experimentNames)).map(
.map((name) => { convertExperimentDataToExperimentContext,
const data = getExperimentData(name); );
return data && { schema: TRACKING_CONTEXT_SCHEMA, data }; }
})
.filter((context) => context); export function getAllExperimentContexts() {
return Object.values(getExperimentsData()).map(convertExperimentDataToExperimentContext);
} }
export function isExperimentVariant(experimentName, variantName) { export function isExperimentVariant(experimentName, variantName) {
......
import { getAllExperimentContexts } from '~/experimentation/utils';
import { DEFAULT_SNOWPLOW_OPTIONS } from './constants'; import { DEFAULT_SNOWPLOW_OPTIONS } from './constants';
import getStandardContext from './get_standard_context'; import getStandardContext from './get_standard_context';
import Tracking from './tracking'; import Tracking from './tracking';
...@@ -41,7 +42,8 @@ export function initDefaultTrackers() { ...@@ -41,7 +42,8 @@ export function initDefaultTrackers() {
window.snowplow('enableActivityTracking', 30, 30); window.snowplow('enableActivityTracking', 30, 30);
// must be after enableActivityTracking // must be after enableActivityTracking
const standardContext = getStandardContext(); const standardContext = getStandardContext();
window.snowplow('trackPageView', null, [standardContext]); const experimentContexts = getAllExperimentContexts();
window.snowplow('trackPageView', null, [standardContext, ...experimentContexts]);
if (window.snowplowOptions.formTracking) { if (window.snowplowOptions.formTracking) {
Tracking.enableFormTracking(opts.formTrackingConfig); Tracking.enableFormTracking(opts.formTrackingConfig);
......
...@@ -9,6 +9,7 @@ module Types ...@@ -9,6 +9,7 @@ module Types
DEFAULT_COMPLEXITY = 1 DEFAULT_COMPLEXITY = 1
attr_reader :deprecation, :doc_reference attr_reader :deprecation, :doc_reference
attr_writer :max_page_size # Can be removed with :performance_roadmap feature flag: https://gitlab.com/gitlab-org/gitlab/-/issues/337198
def initialize(**kwargs, &block) def initialize(**kwargs, &block)
@calls_gitaly = !!kwargs.delete(:calls_gitaly) @calls_gitaly = !!kwargs.delete(:calls_gitaly)
......
...@@ -46,6 +46,7 @@ module Integrations ...@@ -46,6 +46,7 @@ module Integrations
has_one :issue_tracker_data, autosave: true, inverse_of: :integration, foreign_key: :service_id, class_name: 'Integrations::IssueTrackerData' has_one :issue_tracker_data, autosave: true, inverse_of: :integration, foreign_key: :service_id, class_name: 'Integrations::IssueTrackerData'
has_one :jira_tracker_data, autosave: true, inverse_of: :integration, foreign_key: :service_id, class_name: 'Integrations::JiraTrackerData' has_one :jira_tracker_data, autosave: true, inverse_of: :integration, foreign_key: :service_id, class_name: 'Integrations::JiraTrackerData'
has_one :open_project_tracker_data, autosave: true, inverse_of: :integration, foreign_key: :service_id, class_name: 'Integrations::OpenProjectTrackerData' has_one :open_project_tracker_data, autosave: true, inverse_of: :integration, foreign_key: :service_id, class_name: 'Integrations::OpenProjectTrackerData'
has_one :zentao_tracker_data, autosave: true, inverse_of: :integration, foreign_key: :integration_id, class_name: 'Integrations::ZentaoTrackerData'
def data_fields def data_fields
raise NotImplementedError raise NotImplementedError
......
# frozen_string_literal: true
module Integrations
class Zentao < Integration
data_field :url, :api_url, :api_token, :zentao_product_xid
validates :url, public_url: true, presence: true, if: :activated?
validates :api_url, public_url: true, allow_blank: true
validates :api_token, presence: true, if: :activated?
validates :zentao_product_xid, presence: true, if: :activated?
def data_fields
zentao_tracker_data || self.build_zentao_tracker_data
end
def title
self.class.name.demodulize
end
def description
s_("ZentaoIntegration|Use Zentao as this project's issue tracker.")
end
def self.to_param
name.demodulize.downcase
end
def test(*_args)
client.ping
end
def self.supported_events
%w()
end
def self.supported_event_actions
%w()
end
def fields
[
{
type: 'text',
name: 'url',
title: s_('ZentaoIntegration|Zentao Web URL'),
placeholder: 'https://www.zentao.net',
help: s_('ZentaoIntegration|Base URL of the Zentao instance.'),
required: true
},
{
type: 'text',
name: 'api_url',
title: s_('ZentaoIntegration|Zentao API URL (optional)'),
help: s_('ZentaoIntegration|If different from Web URL.')
},
{
type: 'password',
name: 'api_token',
title: s_('ZentaoIntegration|Zentao API token'),
non_empty_password_title: s_('ZentaoIntegration|Enter API token'),
required: true
},
{
type: 'text',
name: 'zentao_product_xid',
title: s_('ZentaoIntegration|Zentao Product ID'),
required: true
}
]
end
private
def client
@client ||= ::Gitlab::Zentao::Client.new(self)
end
end
end
# frozen_string_literal: true
module Integrations
class ZentaoTrackerData < ApplicationRecord
belongs_to :integration, inverse_of: :zentao_tracker_data, foreign_key: :integration_id
delegate :activated?, to: :integration
validates :integration, presence: true
scope :encryption_options, -> do
{
key: Settings.attr_encrypted_db_key_base_32,
encode: true,
mode: :per_attribute_iv,
algorithm: 'aes-256-gcm'
}
end
attr_encrypted :url, encryption_options
attr_encrypted :api_url, encryption_options
attr_encrypted :zentao_product_xid, encryption_options
attr_encrypted :api_token, encryption_options
end
end
...@@ -209,6 +209,7 @@ class Project < ApplicationRecord ...@@ -209,6 +209,7 @@ class Project < ApplicationRecord
has_one :unify_circuit_integration, class_name: 'Integrations::UnifyCircuit' has_one :unify_circuit_integration, class_name: 'Integrations::UnifyCircuit'
has_one :webex_teams_integration, class_name: 'Integrations::WebexTeams' has_one :webex_teams_integration, class_name: 'Integrations::WebexTeams'
has_one :youtrack_integration, class_name: 'Integrations::Youtrack' has_one :youtrack_integration, class_name: 'Integrations::Youtrack'
has_one :zentao_integration, class_name: 'Integrations::Zentao'
has_one :root_of_fork_network, has_one :root_of_fork_network,
foreign_key: 'root_project_id', foreign_key: 'root_project_id',
...@@ -1455,7 +1456,7 @@ class Project < ApplicationRecord ...@@ -1455,7 +1456,7 @@ class Project < ApplicationRecord
end end
def disabled_integrations def disabled_integrations
[] [:zentao]
end end
def find_or_initialize_integration(name) def find_or_initialize_integration(name)
......
This diff is collapsed.
...@@ -13,7 +13,6 @@ module Analytics ...@@ -13,7 +13,6 @@ module Analytics
DEFAULT_DELAY = 3.minutes.freeze DEFAULT_DELAY = 3.minutes.freeze
feature_category :devops_reports feature_category :devops_reports
tags :exclude_from_kubernetes
urgency :low urgency :low
idempotent! idempotent!
......
...@@ -12,7 +12,6 @@ module Analytics ...@@ -12,7 +12,6 @@ module Analytics
feature_category :devops_reports feature_category :devops_reports
urgency :low urgency :low
tags :exclude_from_kubernetes
idempotent! idempotent!
......
...@@ -10,7 +10,6 @@ class ApproveBlockedPendingApprovalUsersWorker ...@@ -10,7 +10,6 @@ class ApproveBlockedPendingApprovalUsersWorker
idempotent! idempotent!
feature_category :users feature_category :users
tags :exclude_from_kubernetes
def perform(current_user_id) def perform(current_user_id)
current_user = User.find(current_user_id) current_user = User.find(current_user_id)
......
...@@ -6,7 +6,6 @@ class BulkImportWorker # rubocop:disable Scalability/IdempotentWorker ...@@ -6,7 +6,6 @@ class BulkImportWorker # rubocop:disable Scalability/IdempotentWorker
data_consistency :always data_consistency :always
feature_category :importers feature_category :importers
tags :exclude_from_kubernetes
sidekiq_options retry: false, dead: false sidekiq_options retry: false, dead: false
......
...@@ -7,7 +7,6 @@ module BulkImports ...@@ -7,7 +7,6 @@ module BulkImports
data_consistency :always data_consistency :always
feature_category :importers feature_category :importers
tags :exclude_from_kubernetes
sidekiq_options retry: false, dead: false sidekiq_options retry: false, dead: false
......
...@@ -9,7 +9,6 @@ module BulkImports ...@@ -9,7 +9,6 @@ module BulkImports
NDJSON_PIPELINE_PERFORM_DELAY = 1.minute NDJSON_PIPELINE_PERFORM_DELAY = 1.minute
feature_category :importers feature_category :importers
tags :exclude_from_kubernetes
sidekiq_options retry: false, dead: false sidekiq_options retry: false, dead: false
......
...@@ -10,7 +10,6 @@ module BulkImports ...@@ -10,7 +10,6 @@ module BulkImports
idempotent! idempotent!
loggable_arguments 2, 3 loggable_arguments 2, 3
feature_category :importers feature_category :importers
tags :exclude_from_kubernetes
sidekiq_options status_expiration: StuckExportJobsWorker::EXPORT_JOBS_EXPIRATION sidekiq_options status_expiration: StuckExportJobsWorker::EXPORT_JOBS_EXPIRATION
def perform(user_id, portable_id, portable_class, relation) def perform(user_id, portable_id, portable_class, relation)
......
...@@ -10,7 +10,6 @@ module Ci ...@@ -10,7 +10,6 @@ module Ci
include LimitedCapacity::Worker include LimitedCapacity::Worker
feature_category :continuous_integration feature_category :continuous_integration
tags :exclude_from_kubernetes
idempotent! idempotent!
def perform_work(*args) def perform_work(*args)
......
...@@ -9,8 +9,6 @@ module Ci ...@@ -9,8 +9,6 @@ module Ci
sidekiq_options retry: 3 sidekiq_options retry: 3
include PipelineQueue include PipelineQueue
tags :exclude_from_kubernetes
idempotent! idempotent!
def perform(pipeline_id, failure_reason) def perform(pipeline_id, failure_reason)
......
...@@ -10,7 +10,6 @@ module Ci ...@@ -10,7 +10,6 @@ module Ci
include PipelineQueue include PipelineQueue
urgency :low urgency :low
tags :exclude_from_kubernetes
idempotent! idempotent!
def perform(job_id) def perform(job_id)
......
...@@ -11,7 +11,6 @@ module Ci ...@@ -11,7 +11,6 @@ module Ci
queue_namespace :pipeline_background queue_namespace :pipeline_background
feature_category :code_testing feature_category :code_testing
tags :exclude_from_kubernetes
idempotent! idempotent!
......
...@@ -15,7 +15,6 @@ module Ci ...@@ -15,7 +15,6 @@ module Ci
deduplicate :until_executed, including_scheduled: true deduplicate :until_executed, including_scheduled: true
idempotent! idempotent!
feature_category :continuous_integration feature_category :continuous_integration
tags :exclude_from_kubernetes
def perform def perform
service = ::Ci::PipelineArtifacts::DestroyAllExpiredService.new service = ::Ci::PipelineArtifacts::DestroyAllExpiredService.new
......
...@@ -12,7 +12,6 @@ module Ci ...@@ -12,7 +12,6 @@ module Ci
# rubocop:enable Scalability/CronWorkerContext # rubocop:enable Scalability/CronWorkerContext
feature_category :continuous_integration feature_category :continuous_integration
tags :exclude_from_kubernetes
idempotent! idempotent!
def perform(*args) def perform(*args)
......
...@@ -9,8 +9,6 @@ module Ci ...@@ -9,8 +9,6 @@ module Ci
sidekiq_options retry: 3 sidekiq_options retry: 3
include PipelineBackgroundQueue include PipelineBackgroundQueue
tags :exclude_from_kubernetes
idempotent! idempotent!
def perform(pipeline_id) def perform(pipeline_id)
......
...@@ -6,6 +6,5 @@ module ChaosQueue ...@@ -6,6 +6,5 @@ module ChaosQueue
included do included do
queue_namespace :chaos queue_namespace :chaos
feature_category_not_owned! feature_category_not_owned!
tags :exclude_from_gitlab_com
end end
end end
...@@ -12,7 +12,6 @@ module ContainerExpirationPolicies ...@@ -12,7 +12,6 @@ module ContainerExpirationPolicies
queue_namespace :container_repository queue_namespace :container_repository
feature_category :container_registry feature_category :container_registry
tags :exclude_from_kubernetes
urgency :low urgency :low
worker_resource_boundary :unknown worker_resource_boundary :unknown
idempotent! idempotent!
......
...@@ -9,7 +9,6 @@ module Database ...@@ -9,7 +9,6 @@ module Database
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :database feature_category :database
tags :exclude_from_kubernetes
idempotent! idempotent!
LEASE_TIMEOUT_MULTIPLIER = 3 LEASE_TIMEOUT_MULTIPLIER = 3
......
...@@ -10,7 +10,6 @@ module Deployments ...@@ -10,7 +10,6 @@ module Deployments
queue_namespace :deployment queue_namespace :deployment
feature_category :continuous_delivery feature_category :continuous_delivery
tags :exclude_from_kubernetes
def perform(deployment_id) def perform(deployment_id)
Deployments::OlderDeploymentsDropService.new(deployment_id).execute Deployments::OlderDeploymentsDropService.new(deployment_id).execute
......
...@@ -9,7 +9,6 @@ module DesignManagement ...@@ -9,7 +9,6 @@ module DesignManagement
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :design_management feature_category :design_management
tags :exclude_from_kubernetes
idempotent! idempotent!
urgency :low urgency :low
......
...@@ -10,7 +10,6 @@ class DestroyPagesDeploymentsWorker ...@@ -10,7 +10,6 @@ class DestroyPagesDeploymentsWorker
loggable_arguments 0, 1 loggable_arguments 0, 1
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :pages feature_category :pages
tags :exclude_from_kubernetes
def perform(project_id, last_deployment_id = nil) def perform(project_id, last_deployment_id = nil)
project = Project.find_by_id(project_id) project = Project.find_by_id(project_id)
......
...@@ -9,7 +9,6 @@ class DisallowTwoFactorForGroupWorker ...@@ -9,7 +9,6 @@ class DisallowTwoFactorForGroupWorker
include ExceptionBacktrace include ExceptionBacktrace
feature_category :subgroups feature_category :subgroups
tags :exclude_from_kubernetes
idempotent! idempotent!
def perform(group_id) def perform(group_id)
......
...@@ -11,7 +11,6 @@ class DisallowTwoFactorForSubgroupsWorker ...@@ -11,7 +11,6 @@ class DisallowTwoFactorForSubgroupsWorker
INTERVAL = 2.seconds.to_i INTERVAL = 2.seconds.to_i
feature_category :subgroups feature_category :subgroups
tags :exclude_from_kubernetes
idempotent! idempotent!
def perform(group_id) def perform(group_id)
......
...@@ -11,7 +11,6 @@ module Environments ...@@ -11,7 +11,6 @@ module Environments
idempotent! idempotent!
worker_has_external_dependencies! worker_has_external_dependencies!
feature_category :continuous_delivery feature_category :continuous_delivery
tags :exclude_from_kubernetes
def perform(environment_id, params) def perform(environment_id, params)
Environment.find_by_id(environment_id).try do |environment| Environment.find_by_id(environment_id).try do |environment|
......
...@@ -9,7 +9,6 @@ module Experiments ...@@ -9,7 +9,6 @@ module Experiments
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :users feature_category :users
tags :exclude_from_kubernetes
urgency :low urgency :low
idempotent! idempotent!
......
...@@ -13,7 +13,6 @@ class FlushCounterIncrementsWorker ...@@ -13,7 +13,6 @@ class FlushCounterIncrementsWorker
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category_not_owned! feature_category_not_owned!
tags :exclude_from_kubernetes
urgency :low urgency :low
deduplicate :until_executing, including_scheduled: true deduplicate :until_executing, including_scheduled: true
......
...@@ -5,7 +5,6 @@ module Gitlab ...@@ -5,7 +5,6 @@ module Gitlab
class ImportPullRequestMergedByWorker # rubocop:disable Scalability/IdempotentWorker class ImportPullRequestMergedByWorker # rubocop:disable Scalability/IdempotentWorker
include ObjectImporter include ObjectImporter
tags :exclude_from_kubernetes
worker_resource_boundary :cpu worker_resource_boundary :cpu
def representation_class def representation_class
......
...@@ -5,7 +5,6 @@ module Gitlab ...@@ -5,7 +5,6 @@ module Gitlab
class ImportPullRequestReviewWorker # rubocop:disable Scalability/IdempotentWorker class ImportPullRequestReviewWorker # rubocop:disable Scalability/IdempotentWorker
include ObjectImporter include ObjectImporter
tags :exclude_from_kubernetes
worker_resource_boundary :cpu worker_resource_boundary :cpu
def representation_class def representation_class
......
...@@ -12,8 +12,6 @@ module Gitlab ...@@ -12,8 +12,6 @@ module Gitlab
include GithubImport::Queue include GithubImport::Queue
include StageMethods include StageMethods
tags :exclude_from_kubernetes
# client - An instance of Gitlab::GithubImport::Client. # client - An instance of Gitlab::GithubImport::Client.
# project - An instance of Project. # project - An instance of Project.
def import(client, project) def import(client, project)
......
...@@ -12,8 +12,6 @@ module Gitlab ...@@ -12,8 +12,6 @@ module Gitlab
include GithubImport::Queue include GithubImport::Queue
include StageMethods include StageMethods
tags :exclude_from_kubernetes
# client - An instance of Gitlab::GithubImport::Client. # client - An instance of Gitlab::GithubImport::Client.
# project - An instance of Project. # project - An instance of Project.
def import(client, project) def import(client, project)
......
...@@ -15,7 +15,6 @@ class GitlabPerformanceBarStatsWorker ...@@ -15,7 +15,6 @@ class GitlabPerformanceBarStatsWorker
STATS_KEY_EXPIRE = 30.minutes.to_i STATS_KEY_EXPIRE = 30.minutes.to_i
feature_category :metrics feature_category :metrics
tags :exclude_from_kubernetes
idempotent! idempotent!
def perform(lease_uuid) def perform(lease_uuid)
......
...@@ -9,7 +9,6 @@ class GroupDestroyWorker # rubocop:disable Scalability/IdempotentWorker ...@@ -9,7 +9,6 @@ class GroupDestroyWorker # rubocop:disable Scalability/IdempotentWorker
include ExceptionBacktrace include ExceptionBacktrace
feature_category :subgroups feature_category :subgroups
tags :requires_disk_io, :exclude_from_kubernetes
def perform(group_id, user_id) def perform(group_id, user_id)
begin begin
......
...@@ -13,7 +13,7 @@ module HashedStorage ...@@ -13,7 +13,7 @@ module HashedStorage
# Gitlab::HashedStorage::Migrator#migration_pending? depends on the # Gitlab::HashedStorage::Migrator#migration_pending? depends on the
# queue size of this worker. # queue size of this worker.
tags :exclude_from_gitlab_com, :needs_own_queue tags :needs_own_queue
# @param [Integer] start initial ID of the batch # @param [Integer] start initial ID of the batch
# @param [Integer] finish last ID of the batch # @param [Integer] finish last ID of the batch
......
...@@ -13,7 +13,7 @@ module HashedStorage ...@@ -13,7 +13,7 @@ module HashedStorage
# Gitlab::HashedStorage::Migrator#migration_pending? depends on the # Gitlab::HashedStorage::Migrator#migration_pending? depends on the
# queue size of this worker. # queue size of this worker.
tags :exclude_from_gitlab_com, :needs_own_queue tags :needs_own_queue
attr_reader :project_id attr_reader :project_id
......
...@@ -13,7 +13,7 @@ module HashedStorage ...@@ -13,7 +13,7 @@ module HashedStorage
# Gitlab::HashedStorage::Migrator#rollback_pending? depends on the # Gitlab::HashedStorage::Migrator#rollback_pending? depends on the
# queue size of this worker. # queue size of this worker.
tags :exclude_from_gitlab_com, :needs_own_queue tags :needs_own_queue
attr_reader :project_id attr_reader :project_id
......
...@@ -13,7 +13,7 @@ module HashedStorage ...@@ -13,7 +13,7 @@ module HashedStorage
# Gitlab::HashedStorage::Migrator#rollback_pending? depends on the # Gitlab::HashedStorage::Migrator#rollback_pending? depends on the
# queue size of this worker. # queue size of this worker.
tags :exclude_from_gitlab_com, :needs_own_queue tags :needs_own_queue
# @param [Integer] start initial ID of the batch # @param [Integer] start initial ID of the batch
# @param [Integer] finish last ID of the batch # @param [Integer] finish last ID of the batch
......
...@@ -11,7 +11,6 @@ module IncidentManagement ...@@ -11,7 +11,6 @@ module IncidentManagement
queue_namespace :incident_management queue_namespace :incident_management
feature_category :incident_management feature_category :incident_management
tags :exclude_from_kubernetes
def perform(incident_id, user_id) def perform(incident_id, user_id)
return if incident_id.blank? || user_id.blank? return if incident_id.blank? || user_id.blank?
......
...@@ -10,7 +10,6 @@ class IssueRebalancingWorker ...@@ -10,7 +10,6 @@ class IssueRebalancingWorker
idempotent! idempotent!
urgency :low urgency :low
feature_category :issue_tracking feature_category :issue_tracking
tags :exclude_from_kubernetes
deduplicate :until_executed, including_scheduled: true deduplicate :until_executed, including_scheduled: true
def perform(ignore = nil, project_id = nil, root_namespace_id = nil) def perform(ignore = nil, project_id = nil, root_namespace_id = nil)
......
...@@ -8,7 +8,6 @@ module JiraConnect ...@@ -8,7 +8,6 @@ module JiraConnect
queue_namespace :jira_connect queue_namespace :jira_connect
feature_category :integrations feature_category :integrations
data_consistency :delayed data_consistency :delayed
tags :exclude_from_kubernetes
urgency :low urgency :low
worker_has_external_dependencies! worker_has_external_dependencies!
......
...@@ -8,7 +8,6 @@ module JiraConnect ...@@ -8,7 +8,6 @@ module JiraConnect
queue_namespace :jira_connect queue_namespace :jira_connect
feature_category :integrations feature_category :integrations
data_consistency :delayed data_consistency :delayed
tags :exclude_from_kubernetes
urgency :low urgency :low
worker_has_external_dependencies! worker_has_external_dependencies!
......
...@@ -8,7 +8,6 @@ module JiraConnect ...@@ -8,7 +8,6 @@ module JiraConnect
queue_namespace :jira_connect queue_namespace :jira_connect
feature_category :integrations feature_category :integrations
data_consistency :delayed data_consistency :delayed
tags :exclude_from_kubernetes
urgency :low urgency :low
worker_has_external_dependencies! worker_has_external_dependencies!
......
...@@ -8,7 +8,6 @@ module JiraConnect ...@@ -8,7 +8,6 @@ module JiraConnect
queue_namespace :jira_connect queue_namespace :jira_connect
feature_category :integrations feature_category :integrations
data_consistency :delayed data_consistency :delayed
tags :exclude_from_kubernetes
urgency :low urgency :low
worker_has_external_dependencies! worker_has_external_dependencies!
......
...@@ -8,7 +8,6 @@ class MemberInvitationReminderEmailsWorker # rubocop:disable Scalability/Idempot ...@@ -8,7 +8,6 @@ class MemberInvitationReminderEmailsWorker # rubocop:disable Scalability/Idempot
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :subgroups feature_category :subgroups
tags :exclude_from_kubernetes
urgency :low urgency :low
def perform def perform
......
...@@ -10,7 +10,6 @@ class MergeRequestCleanupRefsWorker ...@@ -10,7 +10,6 @@ class MergeRequestCleanupRefsWorker
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :code_review feature_category :code_review
tags :exclude_from_kubernetes
idempotent! idempotent!
# Hard-coded to 4 for now. Will be configurable later on via application settings. # Hard-coded to 4 for now. Will be configurable later on via application settings.
......
...@@ -10,7 +10,6 @@ module Metrics ...@@ -10,7 +10,6 @@ module Metrics
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :metrics feature_category :metrics
tags :exclude_from_kubernetes
idempotent! idempotent!
......
...@@ -9,7 +9,6 @@ module Namespaces ...@@ -9,7 +9,6 @@ module Namespaces
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :subgroups feature_category :subgroups
tags :exclude_from_kubernetes
urgency :low urgency :low
def perform def perform
......
...@@ -9,7 +9,6 @@ module Namespaces ...@@ -9,7 +9,6 @@ module Namespaces
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :issue_tracking feature_category :issue_tracking
tags :exclude_from_kubernetes
urgency :low urgency :low
deduplicate :until_executing deduplicate :until_executing
......
...@@ -9,7 +9,6 @@ module Namespaces ...@@ -9,7 +9,6 @@ module Namespaces
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :subgroups feature_category :subgroups
tags :exclude_from_kubernetes
urgency :low urgency :low
deduplicate :until_executing deduplicate :until_executing
......
...@@ -10,7 +10,6 @@ module Namespaces ...@@ -10,7 +10,6 @@ module Namespaces
feature_category :product_analytics feature_category :product_analytics
worker_resource_boundary :cpu worker_resource_boundary :cpu
tags :exclude_from_kubernetes
urgency :low urgency :low
deduplicate :until_executed deduplicate :until_executed
......
...@@ -9,7 +9,6 @@ module Namespaces ...@@ -9,7 +9,6 @@ module Namespaces
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :users feature_category :users
tags :exclude_from_kubernetes
urgency :low urgency :low
idempotent! idempotent!
......
...@@ -10,7 +10,6 @@ module Packages ...@@ -10,7 +10,6 @@ module Packages
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :package_registry feature_category :package_registry
tags :exclude_from_kubernetes
idempotent! idempotent!
......
...@@ -10,7 +10,6 @@ module Packages ...@@ -10,7 +10,6 @@ module Packages
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :package_registry feature_category :package_registry
tags :exclude_from_kubernetes
idempotent! idempotent!
......
...@@ -13,7 +13,6 @@ module Packages ...@@ -13,7 +13,6 @@ module Packages
queue_namespace :package_repositories queue_namespace :package_repositories
feature_category :package_registry feature_category :package_registry
tags :exclude_from_kubernetes
def perform(package_file_id, user_id) def perform(package_file_id, user_id)
@package_file_id = package_file_id @package_file_id = package_file_id
......
...@@ -12,7 +12,6 @@ module Packages ...@@ -12,7 +12,6 @@ module Packages
queue_namespace :package_repositories queue_namespace :package_repositories
feature_category :package_registry feature_category :package_registry
tags :exclude_from_kubernetes
deduplicate :until_executing deduplicate :until_executing
idempotent! idempotent!
......
...@@ -13,7 +13,6 @@ module Packages ...@@ -13,7 +13,6 @@ module Packages
queue_namespace :package_repositories queue_namespace :package_repositories
feature_category :package_registry feature_category :package_registry
tags :exclude_from_kubernetes
deduplicate :until_executing deduplicate :until_executing
idempotent! idempotent!
......
...@@ -11,7 +11,6 @@ module Packages ...@@ -11,7 +11,6 @@ module Packages
queue_namespace :package_repositories queue_namespace :package_repositories
feature_category :package_registry feature_category :package_registry
tags :exclude_from_kubernetes
deduplicate :until_executing deduplicate :until_executing
def perform(package_file_id) def perform(package_file_id)
......
...@@ -8,7 +8,6 @@ class PagesDomainSslRenewalWorker # rubocop:disable Scalability/IdempotentWorker ...@@ -8,7 +8,6 @@ class PagesDomainSslRenewalWorker # rubocop:disable Scalability/IdempotentWorker
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :pages feature_category :pages
tags :requires_disk_io, :exclude_from_kubernetes
def perform(domain_id) def perform(domain_id)
domain = PagesDomain.find_by_id(domain_id) domain = PagesDomain.find_by_id(domain_id)
......
...@@ -8,7 +8,6 @@ class PagesDomainVerificationWorker # rubocop:disable Scalability/IdempotentWork ...@@ -8,7 +8,6 @@ class PagesDomainVerificationWorker # rubocop:disable Scalability/IdempotentWork
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :pages feature_category :pages
tags :requires_disk_io, :exclude_from_kubernetes
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def perform(domain_id) def perform(domain_id)
......
...@@ -8,7 +8,6 @@ class PagesRemoveWorker # rubocop:disable Scalability/IdempotentWorker ...@@ -8,7 +8,6 @@ class PagesRemoveWorker # rubocop:disable Scalability/IdempotentWorker
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :pages feature_category :pages
tags :exclude_from_kubernetes
loggable_arguments 0 loggable_arguments 0
def perform(project_id) def perform(project_id)
......
...@@ -10,7 +10,6 @@ class PagesTransferWorker # rubocop:disable Scalability/IdempotentWorker ...@@ -10,7 +10,6 @@ class PagesTransferWorker # rubocop:disable Scalability/IdempotentWorker
TransferFailedError = Class.new(StandardError) TransferFailedError = Class.new(StandardError)
feature_category :pages feature_category :pages
tags :exclude_from_kubernetes
loggable_arguments 0, 1 loggable_arguments 0, 1
def perform(method, args) def perform(method, args)
......
...@@ -9,7 +9,6 @@ class PagesUpdateConfigurationWorker ...@@ -9,7 +9,6 @@ class PagesUpdateConfigurationWorker
idempotent! idempotent!
feature_category :pages feature_category :pages
tags :exclude_from_kubernetes
def self.perform_async(*args) def self.perform_async(*args)
return unless ::Settings.pages.local_store.enabled return unless ::Settings.pages.local_store.enabled
......
...@@ -8,7 +8,6 @@ class PagesWorker # rubocop:disable Scalability/IdempotentWorker ...@@ -8,7 +8,6 @@ class PagesWorker # rubocop:disable Scalability/IdempotentWorker
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :pages feature_category :pages
loggable_arguments 0, 1 loggable_arguments 0, 1
tags :requires_disk_io, :exclude_from_kubernetes
worker_resource_boundary :cpu worker_resource_boundary :cpu
def perform(action, *arg) def perform(action, *arg)
......
...@@ -9,7 +9,6 @@ module PersonalAccessTokens ...@@ -9,7 +9,6 @@ module PersonalAccessTokens
include CronjobQueue include CronjobQueue
feature_category :authentication_and_authorization feature_category :authentication_and_authorization
tags :exclude_from_kubernetes
def perform(*args) def perform(*args)
notification_service = NotificationService.new notification_service = NotificationService.new
......
...@@ -9,7 +9,6 @@ class ProjectDestroyWorker # rubocop:disable Scalability/IdempotentWorker ...@@ -9,7 +9,6 @@ class ProjectDestroyWorker # rubocop:disable Scalability/IdempotentWorker
include ExceptionBacktrace include ExceptionBacktrace
feature_category :source_code_management feature_category :source_code_management
tags :requires_disk_io, :exclude_from_kubernetes
def perform(project_id, user_id, params) def perform(project_id, user_id, params)
project = Project.find(project_id) project = Project.find(project_id)
......
...@@ -5,8 +5,6 @@ module Projects ...@@ -5,8 +5,6 @@ module Projects
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
include GitGarbageCollectMethods include GitGarbageCollectMethods
tags :exclude_from_kubernetes
private private
override :find_resource override :find_resource
......
...@@ -9,7 +9,6 @@ module Projects ...@@ -9,7 +9,6 @@ module Projects
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :source_code_management feature_category :source_code_management
tags :exclude_from_kubernetes
idempotent! idempotent!
def perform(project_id) def perform(project_id)
......
...@@ -6,7 +6,6 @@ class PropagateIntegrationGroupWorker ...@@ -6,7 +6,6 @@ class PropagateIntegrationGroupWorker
data_consistency :always data_consistency :always
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :integrations feature_category :integrations
tags :exclude_from_kubernetes
urgency :low urgency :low
idempotent! idempotent!
......
...@@ -6,7 +6,6 @@ class PropagateIntegrationInheritDescendantWorker ...@@ -6,7 +6,6 @@ class PropagateIntegrationInheritDescendantWorker
data_consistency :always data_consistency :always
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :integrations feature_category :integrations
tags :exclude_from_kubernetes
urgency :low urgency :low
idempotent! idempotent!
......
...@@ -6,7 +6,6 @@ class PropagateIntegrationInheritWorker ...@@ -6,7 +6,6 @@ class PropagateIntegrationInheritWorker
data_consistency :always data_consistency :always
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :integrations feature_category :integrations
tags :exclude_from_kubernetes
urgency :low urgency :low
idempotent! idempotent!
......
...@@ -6,7 +6,6 @@ class PropagateIntegrationProjectWorker ...@@ -6,7 +6,6 @@ class PropagateIntegrationProjectWorker
data_consistency :always data_consistency :always
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :integrations feature_category :integrations
tags :exclude_from_kubernetes
urgency :low urgency :low
idempotent! idempotent!
......
...@@ -9,7 +9,6 @@ module Releases ...@@ -9,7 +9,6 @@ module Releases
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :release_evidence feature_category :release_evidence
tags :exclude_from_kubernetes
# pipeline_id is optional for backward compatibility with existing jobs # pipeline_id is optional for backward compatibility with existing jobs
# caller should always try to provide the pipeline and pass nil only # caller should always try to provide the pipeline and pass nil only
......
...@@ -9,7 +9,6 @@ module Releases ...@@ -9,7 +9,6 @@ module Releases
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :release_evidence feature_category :release_evidence
tags :exclude_from_kubernetes
def perform def perform
releases = Release.without_evidence.released_within_2hrs releases = Release.without_evidence.released_within_2hrs
......
...@@ -8,7 +8,6 @@ class RemoveUnacceptedMemberInvitesWorker # rubocop:disable Scalability/Idempote ...@@ -8,7 +8,6 @@ class RemoveUnacceptedMemberInvitesWorker # rubocop:disable Scalability/Idempote
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :authentication_and_authorization feature_category :authentication_and_authorization
tags :exclude_from_kubernetes
urgency :low urgency :low
idempotent! idempotent!
......
...@@ -8,7 +8,6 @@ class ScheduleMergeRequestCleanupRefsWorker ...@@ -8,7 +8,6 @@ class ScheduleMergeRequestCleanupRefsWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :code_review feature_category :code_review
tags :exclude_from_kubernetes
idempotent! idempotent!
def perform def perform
......
...@@ -9,7 +9,6 @@ module SshKeys ...@@ -9,7 +9,6 @@ module SshKeys
include CronjobQueue include CronjobQueue
feature_category :compliance_management feature_category :compliance_management
tags :exclude_from_kubernetes
idempotent! idempotent!
BATCH_SIZE = 500 BATCH_SIZE = 500
......
...@@ -9,7 +9,6 @@ module SshKeys ...@@ -9,7 +9,6 @@ module SshKeys
include CronjobQueue include CronjobQueue
feature_category :compliance_management feature_category :compliance_management
tags :exclude_from_kubernetes
idempotent! idempotent!
def perform def perform
......
...@@ -9,8 +9,6 @@ module TodosDestroyer ...@@ -9,8 +9,6 @@ module TodosDestroyer
sidekiq_options retry: 3 sidekiq_options retry: 3
include TodosDestroyerQueue include TodosDestroyerQueue
tags :exclude_from_kubernetes
idempotent! idempotent!
def perform(target_id, target_type) def perform(target_id, target_type)
......
...@@ -12,7 +12,6 @@ module UserStatusCleanup ...@@ -12,7 +12,6 @@ module UserStatusCleanup
# rubocop:enable Scalability/CronWorkerContext # rubocop:enable Scalability/CronWorkerContext
feature_category :users feature_category :users
tags :exclude_from_kubernetes
idempotent! idempotent!
......
...@@ -9,7 +9,6 @@ module Users ...@@ -9,7 +9,6 @@ module Users
include CronjobQueue include CronjobQueue
feature_category :utilization feature_category :utilization
tags :exclude_from_kubernetes
NUMBER_OF_BATCHES = 50 NUMBER_OF_BATCHES = 50
BATCH_SIZE = 200 BATCH_SIZE = 200
......
...@@ -7,7 +7,6 @@ module WebHooks ...@@ -7,7 +7,6 @@ module WebHooks
data_consistency :always data_consistency :always
sidekiq_options retry: 3 sidekiq_options retry: 3
feature_category :integrations feature_category :integrations
tags :exclude_from_kubernetes
urgency :low urgency :low
idempotent! idempotent!
......
...@@ -5,8 +5,6 @@ module Wikis ...@@ -5,8 +5,6 @@ module Wikis
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
include GitGarbageCollectMethods include GitGarbageCollectMethods
tags :exclude_from_kubernetes
private private
override :find_resource override :find_resource
......
...@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/337507 ...@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/337507
milestone: '14.2' milestone: '14.2'
type: development type: development
group: group::pipeline authoring group: group::pipeline authoring
default_enabled: false default_enabled: true
...@@ -450,12 +450,12 @@ that proposes expanding this feature to support more variables. ...@@ -450,12 +450,12 @@ that proposes expanding this feature to support more variables.
#### `rules` with `include` #### `rules` with `include`
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/276515) in GitLab 14.2. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/276515) in GitLab 14.2.
> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/337507) in GitLab 14.3 and is ready for production use.
> - [Enabled with `ci_include_rules` flag](https://gitlab.com/gitlab-org/gitlab/-/issues/337507) for self-managed GitLab in GitLab 14.3 and is ready for production use.
NOTE: FLAG:
On self-managed GitLab, by default this feature is not available. To make it available, On self-managed GitLab, by default this feature is available. To hide the feature per project or for your entire instance, ask an administrator to [disable the `ci_include_rules` flag](../../administration/feature_flags.md). On GitLab.com, this feature is available.
ask an administrator to [enable the `ci_include_rules` flag](../../administration/feature_flags.md).
On GitLab.com, this feature is not available. The feature is not ready for production use.
You can use [`rules`](#rules) with `include` to conditionally include other configuration files. You can use [`rules`](#rules) with `include` to conditionally include other configuration files.
You can only use `rules:if` in `include` with [certain variables](#variables-with-include). You can only use `rules:if` in `include` with [certain variables](#variables-with-include).
...@@ -1627,7 +1627,7 @@ To disable directed acyclic graphs (DAG), set the limit to `0`. ...@@ -1627,7 +1627,7 @@ To disable directed acyclic graphs (DAG), set the limit to `0`.
#### Artifact downloads with `needs` #### Artifact downloads with `needs`
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/14311) in GitLab v12.6. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/14311) in GitLab 12.6.
When a job uses `needs`, it no longer downloads all artifacts from previous stages When a job uses `needs`, it no longer downloads all artifacts from previous stages
by default, because jobs with `needs` can start before earlier stages complete. With by default, because jobs with `needs` can start before earlier stages complete. With
...@@ -1679,7 +1679,7 @@ with `needs`. ...@@ -1679,7 +1679,7 @@ with `needs`.
#### Cross project artifact downloads with `needs` **(PREMIUM)** #### Cross project artifact downloads with `needs` **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/14311) in GitLab v12.7. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/14311) in GitLab 12.7.
Use `needs` to download artifacts from up to five jobs in pipelines: Use `needs` to download artifacts from up to five jobs in pipelines:
...@@ -1752,7 +1752,7 @@ pipelines running on the same ref could override the artifacts. ...@@ -1752,7 +1752,7 @@ pipelines running on the same ref could override the artifacts.
#### Artifact downloads to child pipelines #### Artifact downloads to child pipelines
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/255983) in GitLab v13.7. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/255983) in GitLab 13.7.
A [child pipeline](../pipelines/parent_child_pipelines.md) can download artifacts from a job in A [child pipeline](../pipelines/parent_child_pipelines.md) can download artifacts from a job in
its parent pipeline or another child pipeline in the same parent-child pipeline hierarchy. its parent pipeline or another child pipeline in the same parent-child pipeline hierarchy.
...@@ -2379,7 +2379,7 @@ cache-job: ...@@ -2379,7 +2379,7 @@ cache-job:
##### `cache:key:files` ##### `cache:key:files`
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/18986) in GitLab v12.5. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/18986) in GitLab 12.5.
Use the `cache:key:files` keyword to generate a new key when one or two specific files Use the `cache:key:files` keyword to generate a new key when one or two specific files
change. `cache:key:files` lets you reuse some caches, and rebuild them less often, change. `cache:key:files` lets you reuse some caches, and rebuild them less often,
...@@ -2417,7 +2417,7 @@ fallback key is `default`. ...@@ -2417,7 +2417,7 @@ fallback key is `default`.
##### `cache:key:prefix` ##### `cache:key:prefix`
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/18986) in GitLab v12.5. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/18986) in GitLab 12.5.
Use `cache:key:prefix` to combine a prefix with the SHA computed for [`cache:key:files`](#cachekeyfiles). Use `cache:key:prefix` to combine a prefix with the SHA computed for [`cache:key:files`](#cachekeyfiles).
......
...@@ -289,9 +289,9 @@ If the `latest` template does not exist yet, you can copy [the stable template]( ...@@ -289,9 +289,9 @@ If the `latest` template does not exist yet, you can copy [the stable template](
### How to include an older stable template ### How to include an older stable template
Users may want to use an older [stable template](#stable-version) that is not bundled Users may want to use an older [stable template](#stable-version) that is not bundled
in the current GitLab package. For example, the stable templates in GitLab v13.0 and in the current GitLab package. For example, the stable templates in GitLab 13.0 and
GitLab v14.0 could be so different that a user wants to continue using the v13.0 template even GitLab 14.0 could be so different that a user wants to continue using the GitLab 13.0
after upgrading to GitLab 14.0. template even after upgrading to GitLab 14.0.
You can add a note in the template or in documentation explaining how to use `include:remote` You can add a note in the template or in documentation explaining how to use `include:remote`
to include older template versions. If other templates are included with `include: template`, to include older template versions. If other templates are included with `include: template`,
......
...@@ -109,7 +109,7 @@ The following settings can be configured: ...@@ -109,7 +109,7 @@ The following settings can be configured:
- `enabled`: By default this is set to `false`. Set this to `true` to enable Rack Attack. - `enabled`: By default this is set to `false`. Set this to `true` to enable Rack Attack.
- `ip_whitelist`: Whitelist any IPs from being blocked. They must be formatted as strings within a Ruby array. - `ip_whitelist`: Whitelist any IPs from being blocked. They must be formatted as strings within a Ruby array.
CIDR notation is supported in GitLab v12.1 and up. CIDR notation is supported in GitLab 12.1 and later.
For example, `["127.0.0.1", "127.0.0.2", "127.0.0.3", "192.168.0.1/24"]`. For example, `["127.0.0.1", "127.0.0.2", "127.0.0.3", "192.168.0.1/24"]`.
- `maxretry`: The maximum amount of times a request can be made in the - `maxretry`: The maximum amount of times a request can be made in the
specified time. specified time.
......
...@@ -159,7 +159,7 @@ steps to upgrade to v2: ...@@ -159,7 +159,7 @@ steps to upgrade to v2:
To use a specific version of Auto Deploy dependencies, specify the previous Auto Deploy To use a specific version of Auto Deploy dependencies, specify the previous Auto Deploy
stable template that contains the [desired version of `auto-deploy-image` and `auto-deploy-app`](#verify-dependency-versions). stable template that contains the [desired version of `auto-deploy-image` and `auto-deploy-app`](#verify-dependency-versions).
For example, if the template is bundled in GitLab v13.3, change your `.gitlab-ci.yml` to: For example, if the template is bundled in GitLab 13.3, change your `.gitlab-ci.yml` to:
```yaml ```yaml
include: include:
......
...@@ -11,7 +11,7 @@ import { ...@@ -11,7 +11,7 @@ import {
GlFormTextarea, GlFormTextarea,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { TYPE_ITERATIONS_CADENCE } from '~/graphql_shared/constants'; import { TYPE_ITERATIONS_CADENCE } from '~/graphql_shared/constants';
import { convertToGraphQLId } from '~/graphql_shared/utils'; import { convertToGraphQLId, getIdFromGraphQLId } from '~/graphql_shared/utils';
import { s__, __ } from '~/locale'; import { s__, __ } from '~/locale';
import createCadence from '../queries/cadence_create.mutation.graphql'; import createCadence from '../queries/cadence_create.mutation.graphql';
import updateCadence from '../queries/cadence_update.mutation.graphql'; import updateCadence from '../queries/cadence_update.mutation.graphql';
...@@ -164,12 +164,15 @@ export default { ...@@ -164,12 +164,15 @@ export default {
id: this.cadenceId, id: this.cadenceId,
}; };
}, },
result({ data: { group, errors } }) { result({ data: { group, errors }, error }) {
if (error) {
return;
}
if (errors?.length) { if (errors?.length) {
[this.errorMessage] = errors; [this.errorMessage] = errors;
return; return;
} }
const cadence = group?.iterationCadences?.nodes?.[0]; const cadence = group?.iterationCadences?.nodes?.[0];
if (!cadence) { if (!cadence) {
...@@ -244,14 +247,17 @@ export default { ...@@ -244,14 +247,17 @@ export default {
return; return;
} }
const { errors } = data?.result || {}; const { iterationCadence, errors } = data?.result || {};
if (errors?.length > 0) { if (errors?.length > 0) {
[this.errorMessage] = errors; [this.errorMessage] = errors;
return; return;
} }
this.$router.push({ name: 'index' }); this.$router.push({
name: 'index',
query: { createdCadenceId: getIdFromGraphQLId(iterationCadence.id) },
});
}) })
.catch((e) => { .catch((e) => {
this.errorMessage = __('Unable to save cadence. Please try again'); this.errorMessage = __('Unable to save cadence. Please try again');
......
...@@ -15,11 +15,13 @@ import { __, s__ } from '~/locale'; ...@@ -15,11 +15,13 @@ import { __, s__ } from '~/locale';
import { Namespace } from '../constants'; import { Namespace } from '../constants';
import groupQuery from '../queries/group_iterations_in_cadence.query.graphql'; import groupQuery from '../queries/group_iterations_in_cadence.query.graphql';
import projectQuery from '../queries/project_iterations_in_cadence.query.graphql'; import projectQuery from '../queries/project_iterations_in_cadence.query.graphql';
import TimeboxStatusBadge from './timebox_status_badge.vue';
const pageSize = 20; const pageSize = 20;
const i18n = Object.freeze({ const i18n = Object.freeze({
noResults: s__('Iterations|No iterations in cadence.'), noResults: s__('Iterations|No iterations in cadence.'),
createFirstIteration: s__('Iterations|Create your first iteration'),
error: __('Error loading iterations'), error: __('Error loading iterations'),
deleteCadence: s__('Iterations|Delete cadence'), deleteCadence: s__('Iterations|Delete cadence'),
...@@ -43,6 +45,7 @@ export default { ...@@ -43,6 +45,7 @@ export default {
GlInfiniteScroll, GlInfiniteScroll,
GlModal, GlModal,
GlSkeletonLoader, GlSkeletonLoader,
TimeboxStatusBadge,
}, },
apollo: { apollo: {
workspace: { workspace: {
...@@ -84,6 +87,11 @@ export default { ...@@ -84,6 +87,11 @@ export default {
type: String, type: String,
required: true, required: true,
}, },
showStateBadge: {
type: Boolean,
required: false,
default: false,
},
}, },
data() { data() {
return { return {
...@@ -150,6 +158,14 @@ export default { ...@@ -150,6 +158,14 @@ export default {
}; };
}, },
}, },
created() {
if (
`${this.$router.currentRoute?.query.createdCadenceId}` ===
`${getIdFromGraphQLId(this.cadenceId)}`
) {
this.expanded = true;
}
},
methods: { methods: {
fetchMore() { fetchMore() {
if (this.iterations.length === 0 || !this.hasNextPage || this.loading) { if (this.iterations.length === 0 || !this.hasNextPage || this.loading) {
...@@ -213,8 +229,7 @@ export default { ...@@ -213,8 +229,7 @@ export default {
name="chevron-right" name="chevron-right"
class="gl-transition-medium" class="gl-transition-medium"
:class="{ 'gl-rotate-90': expanded }" :class="{ 'gl-rotate-90': expanded }"
/> /><span class="gl-ml-2">{{ title }}</span>
{{ title }}
</gl-button> </gl-button>
<span v-if="durationInWeeks" class="gl-mr-5 gl-display-none gl-sm-display-inline-block"> <span v-if="durationInWeeks" class="gl-mr-5 gl-display-none gl-sm-display-inline-block">
...@@ -279,6 +294,7 @@ export default { ...@@ -279,6 +294,7 @@ export default {
<router-link :to="path(iteration.id)"> <router-link :to="path(iteration.id)">
{{ iteration.title }} {{ iteration.title }}
</router-link> </router-link>
<timebox-status-badge v-if="showStateBadge" :state="iteration.state" />
</li> </li>
</ol> </ol>
<div v-if="loading" class="gl-p-5"> <div v-if="loading" class="gl-p-5">
...@@ -286,9 +302,19 @@ export default { ...@@ -286,9 +302,19 @@ export default {
</div> </div>
</template> </template>
</gl-infinite-scroll> </gl-infinite-scroll>
<p v-else-if="!loading" class="gl-px-5"> <template v-else-if="!loading">
{{ i18n.noResults }} <p class="gl-px-7">{{ i18n.noResults }}</p>
</p> <gl-button
v-if="!automatic"
variant="confirm"
category="secondary"
class="gl-mb-5 gl-ml-7"
data-qa-selector="create_cadence_cta"
:to="newIteration"
>
{{ i18n.createFirstIteration }}
</gl-button>
</template>
</gl-collapse> </gl-collapse>
</li> </li>
</template> </template>
...@@ -97,6 +97,11 @@ export default { ...@@ -97,6 +97,11 @@ export default {
} }
}, },
}, },
mounted() {
if (this.$router.currentRoute.query.createdCadenceId) {
this.$apollo.queries.workspace.refetch();
}
},
methods: { methods: {
nextPage() { nextPage() {
this.pagination = { this.pagination = {
...@@ -172,6 +177,7 @@ export default { ...@@ -172,6 +177,7 @@ export default {
:automatic="cadence.automatic" :automatic="cadence.automatic"
:title="cadence.title" :title="cadence.title"
:iteration-state="state" :iteration-state="state"
:show-state-badge="tabIndex === 2"
@delete-cadence="deleteCadence" @delete-cadence="deleteCadence"
/> />
</ul> </ul>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
/* eslint-disable vue/no-v-html */ /* eslint-disable vue/no-v-html */
import { import {
GlAlert, GlAlert,
GlBadge,
GlDropdown, GlDropdown,
GlDropdownItem, GlDropdownItem,
GlEmptyState, GlEmptyState,
...@@ -13,29 +12,24 @@ import BurnCharts from 'ee/burndown_chart/components/burn_charts.vue'; ...@@ -13,29 +12,24 @@ import BurnCharts from 'ee/burndown_chart/components/burn_charts.vue';
import { TYPE_ITERATION } from '~/graphql_shared/constants'; import { TYPE_ITERATION } from '~/graphql_shared/constants';
import { convertToGraphQLId } from '~/graphql_shared/utils'; import { convertToGraphQLId } from '~/graphql_shared/utils';
import { formatDate } from '~/lib/utils/datetime_utility'; import { formatDate } from '~/lib/utils/datetime_utility';
import { __, s__ } from '~/locale'; import { s__ } from '~/locale';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { Namespace } from '../constants'; import { Namespace } from '../constants';
import query from '../queries/iteration.query.graphql'; import query from '../queries/iteration.query.graphql';
import IterationReportTabs from './iteration_report_tabs.vue'; import IterationReportTabs from './iteration_report_tabs.vue';
import TimeboxStatusBadge from './timebox_status_badge.vue';
const iterationStates = {
closed: 'closed',
upcoming: 'upcoming',
expired: 'expired',
};
export default { export default {
components: { components: {
BurnCharts, BurnCharts,
GlAlert, GlAlert,
GlBadge,
GlIcon, GlIcon,
GlDropdown, GlDropdown,
GlDropdownItem, GlDropdownItem,
GlEmptyState, GlEmptyState,
GlLoadingIcon, GlLoadingIcon,
IterationReportTabs, IterationReportTabs,
TimeboxStatusBadge,
}, },
apollo: { apollo: {
iteration: { iteration: {
...@@ -85,21 +79,6 @@ export default { ...@@ -85,21 +79,6 @@ export default {
showEmptyState() { showEmptyState() {
return !this.loading && this.iteration && !this.iteration.title; return !this.loading && this.iteration && !this.iteration.title;
}, },
status() {
switch (this.iteration.state) {
case iterationStates.closed:
return {
text: __('Closed'),
variant: 'danger',
};
case iterationStates.expired:
return { text: __('Past due'), variant: 'warning' };
case iterationStates.upcoming:
return { text: __('Upcoming'), variant: 'neutral' };
default:
return { text: __('Open'), variant: 'success' };
}
},
editPage() { editPage() {
return { return {
name: 'editIteration', name: 'editIteration',
...@@ -130,9 +109,7 @@ export default { ...@@ -130,9 +109,7 @@ export default {
ref="topbar" ref="topbar"
class="gl-display-flex gl-justify-items-center gl-align-items-center gl-py-3 gl-border-1 gl-border-b-solid gl-border-gray-100" class="gl-display-flex gl-justify-items-center gl-align-items-center gl-py-3 gl-border-1 gl-border-b-solid gl-border-gray-100"
> >
<gl-badge :variant="status.variant"> <timebox-status-badge :state="iteration.state" />
{{ status.text }}
</gl-badge>
<span class="gl-ml-4" <span class="gl-ml-4"
>{{ formatDate(iteration.startDate) }}{{ formatDate(iteration.dueDate) }}</span >{{ formatDate(iteration.startDate) }}{{ formatDate(iteration.dueDate) }}</span
> >
......
<script>
import { GlBadge } from '@gitlab/ui';
import { __ } from '~/locale';
const iterationStates = {
closed: 'closed',
upcoming: 'upcoming',
expired: 'expired',
};
export default {
components: {
GlBadge,
},
props: {
state: {
type: String,
required: false,
default: '',
},
},
computed: {
status() {
switch (this.state) {
case iterationStates.closed:
return {
text: __('Closed'),
variant: 'danger',
};
case iterationStates.expired:
return { text: __('Past due'), variant: 'warning' };
case iterationStates.upcoming:
return { text: __('Upcoming'), variant: 'neutral' };
default:
return { text: __('Open'), variant: 'success' };
}
},
},
};
</script>
<template>
<gl-badge :variant="status.variant">
{{ status.text }}
</gl-badge>
</template>
...@@ -22,7 +22,6 @@ module EE ...@@ -22,7 +22,6 @@ module EE
field :epics, ::Types::EpicType.connection_type, null: true, field :epics, ::Types::EpicType.connection_type, null: true,
description: 'Find epics.', description: 'Find epics.',
extras: [:lookahead], extras: [:lookahead],
max_page_size: 2000,
resolver: ::Resolvers::EpicsResolver resolver: ::Resolvers::EpicsResolver
field :epic_board, field :epic_board,
......
# frozen_string_literal: true
module SetsMaxPageSize
extend ActiveSupport::Concern
DEPRECATED_MAX_PAGE_SIZE = 1000
# We no longer need 1000 page size after epics roadmap pagination feature is released,
# after :performance_roadmap flag rollout we can safely use default max page size(100)
# for epics, child epics and child issues without breaking current roadmaps.
#
# When removing :performance_roadmap flag delete this file and remove its method call and
# the fields using the resolver will keep using default max page size.
# Flag rollout issue: https://gitlab.com/gitlab-org/gitlab/-/issues/337198
private
def set_temp_limit_for(actor)
max_page_size =
if Feature.enabled?(:performance_roadmap, actor, default_enabled: :yaml)
context.schema.default_max_page_size
else
DEPRECATED_MAX_PAGE_SIZE
end
field.max_page_size = max_page_size # rubocop: disable Graphql/Descriptions
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment