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
import { get } from 'lodash';
import { get, pick } from 'lodash';
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) {
return get(window, ['gon', 'experiment', experimentName]);
return getExperimentsData()[experimentName];
}
export function getExperimentContexts(...experimentNames) {
return experimentNames
.map((name) => {
const data = getExperimentData(name);
return data && { schema: TRACKING_CONTEXT_SCHEMA, data };
})
.filter((context) => context);
return Object.values(pick(getExperimentsData(), experimentNames)).map(
convertExperimentDataToExperimentContext,
);
}
export function getAllExperimentContexts() {
return Object.values(getExperimentsData()).map(convertExperimentDataToExperimentContext);
}
export function isExperimentVariant(experimentName, variantName) {
......
import { getAllExperimentContexts } from '~/experimentation/utils';
import { DEFAULT_SNOWPLOW_OPTIONS } from './constants';
import getStandardContext from './get_standard_context';
import Tracking from './tracking';
......@@ -41,7 +42,8 @@ export function initDefaultTrackers() {
window.snowplow('enableActivityTracking', 30, 30);
// must be after enableActivityTracking
const standardContext = getStandardContext();
window.snowplow('trackPageView', null, [standardContext]);
const experimentContexts = getAllExperimentContexts();
window.snowplow('trackPageView', null, [standardContext, ...experimentContexts]);
if (window.snowplowOptions.formTracking) {
Tracking.enableFormTracking(opts.formTrackingConfig);
......
......@@ -9,6 +9,7 @@ module Types
DEFAULT_COMPLEXITY = 1
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)
@calls_gitaly = !!kwargs.delete(:calls_gitaly)
......
......@@ -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 :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 :zentao_tracker_data, autosave: true, inverse_of: :integration, foreign_key: :integration_id, class_name: 'Integrations::ZentaoTrackerData'
def data_fields
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
has_one :unify_circuit_integration, class_name: 'Integrations::UnifyCircuit'
has_one :webex_teams_integration, class_name: 'Integrations::WebexTeams'
has_one :youtrack_integration, class_name: 'Integrations::Youtrack'
has_one :zentao_integration, class_name: 'Integrations::Zentao'
has_one :root_of_fork_network,
foreign_key: 'root_project_id',
......@@ -1455,7 +1456,7 @@ class Project < ApplicationRecord
end
def disabled_integrations
[]
[:zentao]
end
def find_or_initialize_integration(name)
......
This diff is collapsed.
......@@ -13,7 +13,6 @@ module Analytics
DEFAULT_DELAY = 3.minutes.freeze
feature_category :devops_reports
tags :exclude_from_kubernetes
urgency :low
idempotent!
......
......@@ -12,7 +12,6 @@ module Analytics
feature_category :devops_reports
urgency :low
tags :exclude_from_kubernetes
idempotent!
......
......@@ -10,7 +10,6 @@ class ApproveBlockedPendingApprovalUsersWorker
idempotent!
feature_category :users
tags :exclude_from_kubernetes
def perform(current_user_id)
current_user = User.find(current_user_id)
......
......@@ -6,7 +6,6 @@ class BulkImportWorker # rubocop:disable Scalability/IdempotentWorker
data_consistency :always
feature_category :importers
tags :exclude_from_kubernetes
sidekiq_options retry: false, dead: false
......
......@@ -7,7 +7,6 @@ module BulkImports
data_consistency :always
feature_category :importers
tags :exclude_from_kubernetes
sidekiq_options retry: false, dead: false
......
......@@ -9,7 +9,6 @@ module BulkImports
NDJSON_PIPELINE_PERFORM_DELAY = 1.minute
feature_category :importers
tags :exclude_from_kubernetes
sidekiq_options retry: false, dead: false
......
......@@ -10,7 +10,6 @@ module BulkImports
idempotent!
loggable_arguments 2, 3
feature_category :importers
tags :exclude_from_kubernetes
sidekiq_options status_expiration: StuckExportJobsWorker::EXPORT_JOBS_EXPIRATION
def perform(user_id, portable_id, portable_class, relation)
......
......@@ -10,7 +10,6 @@ module Ci
include LimitedCapacity::Worker
feature_category :continuous_integration
tags :exclude_from_kubernetes
idempotent!
def perform_work(*args)
......
......@@ -9,8 +9,6 @@ module Ci
sidekiq_options retry: 3
include PipelineQueue
tags :exclude_from_kubernetes
idempotent!
def perform(pipeline_id, failure_reason)
......
......@@ -10,7 +10,6 @@ module Ci
include PipelineQueue
urgency :low
tags :exclude_from_kubernetes
idempotent!
def perform(job_id)
......
......@@ -11,7 +11,6 @@ module Ci
queue_namespace :pipeline_background
feature_category :code_testing
tags :exclude_from_kubernetes
idempotent!
......
......@@ -15,7 +15,6 @@ module Ci
deduplicate :until_executed, including_scheduled: true
idempotent!
feature_category :continuous_integration
tags :exclude_from_kubernetes
def perform
service = ::Ci::PipelineArtifacts::DestroyAllExpiredService.new
......
......@@ -12,7 +12,6 @@ module Ci
# rubocop:enable Scalability/CronWorkerContext
feature_category :continuous_integration
tags :exclude_from_kubernetes
idempotent!
def perform(*args)
......
......@@ -9,8 +9,6 @@ module Ci
sidekiq_options retry: 3
include PipelineBackgroundQueue
tags :exclude_from_kubernetes
idempotent!
def perform(pipeline_id)
......
......@@ -6,6 +6,5 @@ module ChaosQueue
included do
queue_namespace :chaos
feature_category_not_owned!
tags :exclude_from_gitlab_com
end
end
......@@ -12,7 +12,6 @@ module ContainerExpirationPolicies
queue_namespace :container_repository
feature_category :container_registry
tags :exclude_from_kubernetes
urgency :low
worker_resource_boundary :unknown
idempotent!
......
......@@ -9,7 +9,6 @@ module Database
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :database
tags :exclude_from_kubernetes
idempotent!
LEASE_TIMEOUT_MULTIPLIER = 3
......
......@@ -10,7 +10,6 @@ module Deployments
queue_namespace :deployment
feature_category :continuous_delivery
tags :exclude_from_kubernetes
def perform(deployment_id)
Deployments::OlderDeploymentsDropService.new(deployment_id).execute
......
......@@ -9,7 +9,6 @@ module DesignManagement
sidekiq_options retry: 3
feature_category :design_management
tags :exclude_from_kubernetes
idempotent!
urgency :low
......
......@@ -10,7 +10,6 @@ class DestroyPagesDeploymentsWorker
loggable_arguments 0, 1
sidekiq_options retry: 3
feature_category :pages
tags :exclude_from_kubernetes
def perform(project_id, last_deployment_id = nil)
project = Project.find_by_id(project_id)
......
......@@ -9,7 +9,6 @@ class DisallowTwoFactorForGroupWorker
include ExceptionBacktrace
feature_category :subgroups
tags :exclude_from_kubernetes
idempotent!
def perform(group_id)
......
......@@ -11,7 +11,6 @@ class DisallowTwoFactorForSubgroupsWorker
INTERVAL = 2.seconds.to_i
feature_category :subgroups
tags :exclude_from_kubernetes
idempotent!
def perform(group_id)
......
......@@ -11,7 +11,6 @@ module Environments
idempotent!
worker_has_external_dependencies!
feature_category :continuous_delivery
tags :exclude_from_kubernetes
def perform(environment_id, params)
Environment.find_by_id(environment_id).try do |environment|
......
......@@ -9,7 +9,6 @@ module Experiments
sidekiq_options retry: 3
feature_category :users
tags :exclude_from_kubernetes
urgency :low
idempotent!
......
......@@ -13,7 +13,6 @@ class FlushCounterIncrementsWorker
sidekiq_options retry: 3
feature_category_not_owned!
tags :exclude_from_kubernetes
urgency :low
deduplicate :until_executing, including_scheduled: true
......
......@@ -5,7 +5,6 @@ module Gitlab
class ImportPullRequestMergedByWorker # rubocop:disable Scalability/IdempotentWorker
include ObjectImporter
tags :exclude_from_kubernetes
worker_resource_boundary :cpu
def representation_class
......
......@@ -5,7 +5,6 @@ module Gitlab
class ImportPullRequestReviewWorker # rubocop:disable Scalability/IdempotentWorker
include ObjectImporter
tags :exclude_from_kubernetes
worker_resource_boundary :cpu
def representation_class
......
......@@ -12,8 +12,6 @@ module Gitlab
include GithubImport::Queue
include StageMethods
tags :exclude_from_kubernetes
# client - An instance of Gitlab::GithubImport::Client.
# project - An instance of Project.
def import(client, project)
......
......@@ -12,8 +12,6 @@ module Gitlab
include GithubImport::Queue
include StageMethods
tags :exclude_from_kubernetes
# client - An instance of Gitlab::GithubImport::Client.
# project - An instance of Project.
def import(client, project)
......
......@@ -15,7 +15,6 @@ class GitlabPerformanceBarStatsWorker
STATS_KEY_EXPIRE = 30.minutes.to_i
feature_category :metrics
tags :exclude_from_kubernetes
idempotent!
def perform(lease_uuid)
......
......@@ -9,7 +9,6 @@ class GroupDestroyWorker # rubocop:disable Scalability/IdempotentWorker
include ExceptionBacktrace
feature_category :subgroups
tags :requires_disk_io, :exclude_from_kubernetes
def perform(group_id, user_id)
begin
......
......@@ -13,7 +13,7 @@ module HashedStorage
# Gitlab::HashedStorage::Migrator#migration_pending? depends on the
# 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] finish last ID of the batch
......
......@@ -13,7 +13,7 @@ module HashedStorage
# Gitlab::HashedStorage::Migrator#migration_pending? depends on the
# queue size of this worker.
tags :exclude_from_gitlab_com, :needs_own_queue
tags :needs_own_queue
attr_reader :project_id
......
......@@ -13,7 +13,7 @@ module HashedStorage
# Gitlab::HashedStorage::Migrator#rollback_pending? depends on the
# queue size of this worker.
tags :exclude_from_gitlab_com, :needs_own_queue
tags :needs_own_queue
attr_reader :project_id
......
......@@ -13,7 +13,7 @@ module HashedStorage
# Gitlab::HashedStorage::Migrator#rollback_pending? depends on the
# 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] finish last ID of the batch
......
......@@ -11,7 +11,6 @@ module IncidentManagement
queue_namespace :incident_management
feature_category :incident_management
tags :exclude_from_kubernetes
def perform(incident_id, user_id)
return if incident_id.blank? || user_id.blank?
......
......@@ -10,7 +10,6 @@ class IssueRebalancingWorker
idempotent!
urgency :low
feature_category :issue_tracking
tags :exclude_from_kubernetes
deduplicate :until_executed, including_scheduled: true
def perform(ignore = nil, project_id = nil, root_namespace_id = nil)
......
......@@ -8,7 +8,6 @@ module JiraConnect
queue_namespace :jira_connect
feature_category :integrations
data_consistency :delayed
tags :exclude_from_kubernetes
urgency :low
worker_has_external_dependencies!
......
......@@ -8,7 +8,6 @@ module JiraConnect
queue_namespace :jira_connect
feature_category :integrations
data_consistency :delayed
tags :exclude_from_kubernetes
urgency :low
worker_has_external_dependencies!
......
......@@ -8,7 +8,6 @@ module JiraConnect
queue_namespace :jira_connect
feature_category :integrations
data_consistency :delayed
tags :exclude_from_kubernetes
urgency :low
worker_has_external_dependencies!
......
......@@ -8,7 +8,6 @@ module JiraConnect
queue_namespace :jira_connect
feature_category :integrations
data_consistency :delayed
tags :exclude_from_kubernetes
urgency :low
worker_has_external_dependencies!
......
......@@ -8,7 +8,6 @@ class MemberInvitationReminderEmailsWorker # rubocop:disable Scalability/Idempot
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :subgroups
tags :exclude_from_kubernetes
urgency :low
def perform
......
......@@ -10,7 +10,6 @@ class MergeRequestCleanupRefsWorker
sidekiq_options retry: 3
feature_category :code_review
tags :exclude_from_kubernetes
idempotent!
# Hard-coded to 4 for now. Will be configurable later on via application settings.
......
......@@ -10,7 +10,6 @@ module Metrics
sidekiq_options retry: 3
feature_category :metrics
tags :exclude_from_kubernetes
idempotent!
......
......@@ -9,7 +9,6 @@ module Namespaces
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :subgroups
tags :exclude_from_kubernetes
urgency :low
def perform
......
......@@ -9,7 +9,6 @@ module Namespaces
sidekiq_options retry: 3
feature_category :issue_tracking
tags :exclude_from_kubernetes
urgency :low
deduplicate :until_executing
......
......@@ -9,7 +9,6 @@ module Namespaces
sidekiq_options retry: 3
feature_category :subgroups
tags :exclude_from_kubernetes
urgency :low
deduplicate :until_executing
......
......@@ -10,7 +10,6 @@ module Namespaces
feature_category :product_analytics
worker_resource_boundary :cpu
tags :exclude_from_kubernetes
urgency :low
deduplicate :until_executed
......
......@@ -9,7 +9,6 @@ module Namespaces
sidekiq_options retry: 3
feature_category :users
tags :exclude_from_kubernetes
urgency :low
idempotent!
......
......@@ -10,7 +10,6 @@ module Packages
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :package_registry
tags :exclude_from_kubernetes
idempotent!
......
......@@ -10,7 +10,6 @@ module Packages
sidekiq_options retry: 3
feature_category :package_registry
tags :exclude_from_kubernetes
idempotent!
......
......@@ -13,7 +13,6 @@ module Packages
queue_namespace :package_repositories
feature_category :package_registry
tags :exclude_from_kubernetes
def perform(package_file_id, user_id)
@package_file_id = package_file_id
......
......@@ -12,7 +12,6 @@ module Packages
queue_namespace :package_repositories
feature_category :package_registry
tags :exclude_from_kubernetes
deduplicate :until_executing
idempotent!
......
......@@ -13,7 +13,6 @@ module Packages
queue_namespace :package_repositories
feature_category :package_registry
tags :exclude_from_kubernetes
deduplicate :until_executing
idempotent!
......
......@@ -11,7 +11,6 @@ module Packages
queue_namespace :package_repositories
feature_category :package_registry
tags :exclude_from_kubernetes
deduplicate :until_executing
def perform(package_file_id)
......
......@@ -8,7 +8,6 @@ class PagesDomainSslRenewalWorker # rubocop:disable Scalability/IdempotentWorker
sidekiq_options retry: 3
feature_category :pages
tags :requires_disk_io, :exclude_from_kubernetes
def perform(domain_id)
domain = PagesDomain.find_by_id(domain_id)
......
......@@ -8,7 +8,6 @@ class PagesDomainVerificationWorker # rubocop:disable Scalability/IdempotentWork
sidekiq_options retry: 3
feature_category :pages
tags :requires_disk_io, :exclude_from_kubernetes
# rubocop: disable CodeReuse/ActiveRecord
def perform(domain_id)
......
......@@ -8,7 +8,6 @@ class PagesRemoveWorker # rubocop:disable Scalability/IdempotentWorker
sidekiq_options retry: 3
feature_category :pages
tags :exclude_from_kubernetes
loggable_arguments 0
def perform(project_id)
......
......@@ -10,7 +10,6 @@ class PagesTransferWorker # rubocop:disable Scalability/IdempotentWorker
TransferFailedError = Class.new(StandardError)
feature_category :pages
tags :exclude_from_kubernetes
loggable_arguments 0, 1
def perform(method, args)
......
......@@ -9,7 +9,6 @@ class PagesUpdateConfigurationWorker
idempotent!
feature_category :pages
tags :exclude_from_kubernetes
def self.perform_async(*args)
return unless ::Settings.pages.local_store.enabled
......
......@@ -8,7 +8,6 @@ class PagesWorker # rubocop:disable Scalability/IdempotentWorker
sidekiq_options retry: 3
feature_category :pages
loggable_arguments 0, 1
tags :requires_disk_io, :exclude_from_kubernetes
worker_resource_boundary :cpu
def perform(action, *arg)
......
......@@ -9,7 +9,6 @@ module PersonalAccessTokens
include CronjobQueue
feature_category :authentication_and_authorization
tags :exclude_from_kubernetes
def perform(*args)
notification_service = NotificationService.new
......
......@@ -9,7 +9,6 @@ class ProjectDestroyWorker # rubocop:disable Scalability/IdempotentWorker
include ExceptionBacktrace
feature_category :source_code_management
tags :requires_disk_io, :exclude_from_kubernetes
def perform(project_id, user_id, params)
project = Project.find(project_id)
......
......@@ -5,8 +5,6 @@ module Projects
extend ::Gitlab::Utils::Override
include GitGarbageCollectMethods
tags :exclude_from_kubernetes
private
override :find_resource
......
......@@ -9,7 +9,6 @@ module Projects
sidekiq_options retry: 3
feature_category :source_code_management
tags :exclude_from_kubernetes
idempotent!
def perform(project_id)
......
......@@ -6,7 +6,6 @@ class PropagateIntegrationGroupWorker
data_consistency :always
sidekiq_options retry: 3
feature_category :integrations
tags :exclude_from_kubernetes
urgency :low
idempotent!
......
......@@ -6,7 +6,6 @@ class PropagateIntegrationInheritDescendantWorker
data_consistency :always
sidekiq_options retry: 3
feature_category :integrations
tags :exclude_from_kubernetes
urgency :low
idempotent!
......
......@@ -6,7 +6,6 @@ class PropagateIntegrationInheritWorker
data_consistency :always
sidekiq_options retry: 3
feature_category :integrations
tags :exclude_from_kubernetes
urgency :low
idempotent!
......
......@@ -6,7 +6,6 @@ class PropagateIntegrationProjectWorker
data_consistency :always
sidekiq_options retry: 3
feature_category :integrations
tags :exclude_from_kubernetes
urgency :low
idempotent!
......
......@@ -9,7 +9,6 @@ module Releases
sidekiq_options retry: 3
feature_category :release_evidence
tags :exclude_from_kubernetes
# pipeline_id is optional for backward compatibility with existing jobs
# caller should always try to provide the pipeline and pass nil only
......
......@@ -9,7 +9,6 @@ module Releases
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :release_evidence
tags :exclude_from_kubernetes
def perform
releases = Release.without_evidence.released_within_2hrs
......
......@@ -8,7 +8,6 @@ class RemoveUnacceptedMemberInvitesWorker # rubocop:disable Scalability/Idempote
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :authentication_and_authorization
tags :exclude_from_kubernetes
urgency :low
idempotent!
......
......@@ -8,7 +8,6 @@ class ScheduleMergeRequestCleanupRefsWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :code_review
tags :exclude_from_kubernetes
idempotent!
def perform
......
......@@ -9,7 +9,6 @@ module SshKeys
include CronjobQueue
feature_category :compliance_management
tags :exclude_from_kubernetes
idempotent!
BATCH_SIZE = 500
......
......@@ -9,7 +9,6 @@ module SshKeys
include CronjobQueue
feature_category :compliance_management
tags :exclude_from_kubernetes
idempotent!
def perform
......
......@@ -9,8 +9,6 @@ module TodosDestroyer
sidekiq_options retry: 3
include TodosDestroyerQueue
tags :exclude_from_kubernetes
idempotent!
def perform(target_id, target_type)
......
......@@ -12,7 +12,6 @@ module UserStatusCleanup
# rubocop:enable Scalability/CronWorkerContext
feature_category :users
tags :exclude_from_kubernetes
idempotent!
......
......@@ -9,7 +9,6 @@ module Users
include CronjobQueue
feature_category :utilization
tags :exclude_from_kubernetes
NUMBER_OF_BATCHES = 50
BATCH_SIZE = 200
......
......@@ -7,7 +7,6 @@ module WebHooks
data_consistency :always
sidekiq_options retry: 3
feature_category :integrations
tags :exclude_from_kubernetes
urgency :low
idempotent!
......
......@@ -5,8 +5,6 @@ module Wikis
extend ::Gitlab::Utils::Override
include GitGarbageCollectMethods
tags :exclude_from_kubernetes
private
override :find_resource
......
......@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/337507
milestone: '14.2'
type: development
group: group::pipeline authoring
default_enabled: false
default_enabled: true
......@@ -450,12 +450,12 @@ that proposes expanding this feature to support more variables.
#### `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:
On self-managed GitLab, by default this feature is not available. To make it 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.
FLAG:
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.
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).
......@@ -1627,7 +1627,7 @@ To disable directed acyclic graphs (DAG), set the limit to `0`.
#### 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
by default, because jobs with `needs` can start before earlier stages complete. With
......@@ -1679,7 +1679,7 @@ with `needs`.
#### 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:
......@@ -1752,7 +1752,7 @@ pipelines running on the same ref could override the artifacts.
#### 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
its parent pipeline or another child pipeline in the same parent-child pipeline hierarchy.
......@@ -2379,7 +2379,7 @@ cache-job:
##### `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
change. `cache:key:files` lets you reuse some caches, and rebuild them less often,
......@@ -2417,7 +2417,7 @@ fallback key is `default`.
##### `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).
......
......@@ -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
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
GitLab v14.0 could be so different that a user wants to continue using the v13.0 template even
after upgrading to GitLab 14.0.
in the current GitLab package. For example, the stable templates in GitLab 13.0 and
GitLab 14.0 could be so different that a user wants to continue using the GitLab 13.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`
to include older template versions. If other templates are included with `include: template`,
......
......@@ -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.
- `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"]`.
- `maxretry`: The maximum amount of times a request can be made in the
specified time.
......
......@@ -159,7 +159,7 @@ steps to upgrade to v2:
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).
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
include:
......
......@@ -11,7 +11,7 @@ import {
GlFormTextarea,
} from '@gitlab/ui';
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 createCadence from '../queries/cadence_create.mutation.graphql';
import updateCadence from '../queries/cadence_update.mutation.graphql';
......@@ -164,12 +164,15 @@ export default {
id: this.cadenceId,
};
},
result({ data: { group, errors } }) {
result({ data: { group, errors }, error }) {
if (error) {
return;
}
if (errors?.length) {
[this.errorMessage] = errors;
return;
}
const cadence = group?.iterationCadences?.nodes?.[0];
if (!cadence) {
......@@ -244,14 +247,17 @@ export default {
return;
}
const { errors } = data?.result || {};
const { iterationCadence, errors } = data?.result || {};
if (errors?.length > 0) {
[this.errorMessage] = errors;
return;
}
this.$router.push({ name: 'index' });
this.$router.push({
name: 'index',
query: { createdCadenceId: getIdFromGraphQLId(iterationCadence.id) },
});
})
.catch((e) => {
this.errorMessage = __('Unable to save cadence. Please try again');
......
......@@ -15,11 +15,13 @@ import { __, s__ } from '~/locale';
import { Namespace } from '../constants';
import groupQuery from '../queries/group_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 i18n = Object.freeze({
noResults: s__('Iterations|No iterations in cadence.'),
createFirstIteration: s__('Iterations|Create your first iteration'),
error: __('Error loading iterations'),
deleteCadence: s__('Iterations|Delete cadence'),
......@@ -43,6 +45,7 @@ export default {
GlInfiniteScroll,
GlModal,
GlSkeletonLoader,
TimeboxStatusBadge,
},
apollo: {
workspace: {
......@@ -84,6 +87,11 @@ export default {
type: String,
required: true,
},
showStateBadge: {
type: Boolean,
required: false,
default: false,
},
},
data() {
return {
......@@ -150,6 +158,14 @@ export default {
};
},
},
created() {
if (
`${this.$router.currentRoute?.query.createdCadenceId}` ===
`${getIdFromGraphQLId(this.cadenceId)}`
) {
this.expanded = true;
}
},
methods: {
fetchMore() {
if (this.iterations.length === 0 || !this.hasNextPage || this.loading) {
......@@ -213,8 +229,7 @@ export default {
name="chevron-right"
class="gl-transition-medium"
:class="{ 'gl-rotate-90': expanded }"
/>
{{ title }}
/><span class="gl-ml-2">{{ title }}</span>
</gl-button>
<span v-if="durationInWeeks" class="gl-mr-5 gl-display-none gl-sm-display-inline-block">
......@@ -279,6 +294,7 @@ export default {
<router-link :to="path(iteration.id)">
{{ iteration.title }}
</router-link>
<timebox-status-badge v-if="showStateBadge" :state="iteration.state" />
</li>
</ol>
<div v-if="loading" class="gl-p-5">
......@@ -286,9 +302,19 @@ export default {
</div>
</template>
</gl-infinite-scroll>
<p v-else-if="!loading" class="gl-px-5">
{{ i18n.noResults }}
</p>
<template v-else-if="!loading">
<p class="gl-px-7">{{ i18n.noResults }}</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>
</li>
</template>
......@@ -97,6 +97,11 @@ export default {
}
},
},
mounted() {
if (this.$router.currentRoute.query.createdCadenceId) {
this.$apollo.queries.workspace.refetch();
}
},
methods: {
nextPage() {
this.pagination = {
......@@ -172,6 +177,7 @@ export default {
:automatic="cadence.automatic"
:title="cadence.title"
:iteration-state="state"
:show-state-badge="tabIndex === 2"
@delete-cadence="deleteCadence"
/>
</ul>
......
......@@ -2,7 +2,6 @@
/* eslint-disable vue/no-v-html */
import {
GlAlert,
GlBadge,
GlDropdown,
GlDropdownItem,
GlEmptyState,
......@@ -13,29 +12,24 @@ import BurnCharts from 'ee/burndown_chart/components/burn_charts.vue';
import { TYPE_ITERATION } from '~/graphql_shared/constants';
import { convertToGraphQLId } from '~/graphql_shared/utils';
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 { Namespace } from '../constants';
import query from '../queries/iteration.query.graphql';
import IterationReportTabs from './iteration_report_tabs.vue';
const iterationStates = {
closed: 'closed',
upcoming: 'upcoming',
expired: 'expired',
};
import TimeboxStatusBadge from './timebox_status_badge.vue';
export default {
components: {
BurnCharts,
GlAlert,
GlBadge,
GlIcon,
GlDropdown,
GlDropdownItem,
GlEmptyState,
GlLoadingIcon,
IterationReportTabs,
TimeboxStatusBadge,
},
apollo: {
iteration: {
......@@ -85,21 +79,6 @@ export default {
showEmptyState() {
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() {
return {
name: 'editIteration',
......@@ -130,9 +109,7 @@ export default {
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"
>
<gl-badge :variant="status.variant">
{{ status.text }}
</gl-badge>
<timebox-status-badge :state="iteration.state" />
<span class="gl-ml-4"
>{{ 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
field :epics, ::Types::EpicType.connection_type, null: true,
description: 'Find epics.',
extras: [:lookahead],
max_page_size: 2000,
resolver: ::Resolvers::EpicsResolver
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