Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
13cacc20b0
commit
d2add0302c
|
|
@ -42,7 +42,7 @@ export function membersBeforeSave(members) {
|
|||
title: sanitize(title),
|
||||
search: sanitize(`${member.username} ${member.name}`),
|
||||
icon: avatarIcon,
|
||||
availability: member.availability,
|
||||
availability: member?.availability,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<script>
|
||||
import { isNumber } from 'lodash';
|
||||
import ArtifactsApp from './artifacts_list_app.vue';
|
||||
import Deployment from './deployment/deployment.vue';
|
||||
import MrWidgetContainer from './mr_widget_container.vue';
|
||||
import MrWidgetPipeline from './mr_widget_pipeline.vue';
|
||||
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
|
||||
|
|
@ -18,7 +17,7 @@ export default {
|
|||
name: 'MrWidgetPipelineContainer',
|
||||
components: {
|
||||
ArtifactsApp,
|
||||
Deployment,
|
||||
Deployment: () => import('./deployment/deployment.vue'),
|
||||
MrWidgetContainer,
|
||||
MrWidgetPipeline,
|
||||
MergeTrainPositionIndicator: () =>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import WidgetHeader from './components/mr_widget_header.vue';
|
|||
import WidgetSuggestPipeline from './components/mr_widget_suggest_pipeline.vue';
|
||||
import WidgetMergeHelp from './components/mr_widget_merge_help.vue';
|
||||
import MrWidgetPipelineContainer from './components/mr_widget_pipeline_container.vue';
|
||||
import Deployment from './components/deployment/deployment.vue';
|
||||
import WidgetRelatedLinks from './components/mr_widget_related_links.vue';
|
||||
import MrWidgetAlertMessage from './components/mr_widget_alert_message.vue';
|
||||
import MergedState from './components/states/mr_widget_merged.vue';
|
||||
|
|
@ -63,7 +62,6 @@ export default {
|
|||
'mr-widget-suggest-pipeline': WidgetSuggestPipeline,
|
||||
'mr-widget-merge-help': WidgetMergeHelp,
|
||||
MrWidgetPipelineContainer,
|
||||
Deployment,
|
||||
'mr-widget-related-links': WidgetRelatedLinks,
|
||||
MrWidgetAlertMessage,
|
||||
'mr-widget-merged': MergedState,
|
||||
|
|
|
|||
|
|
@ -46,8 +46,9 @@ module Users
|
|||
username: user.username,
|
||||
name: user.name,
|
||||
avatar_url: user.avatar_url,
|
||||
availability: user&.status&.availability
|
||||
availability: nil
|
||||
}
|
||||
# Return nil for availability for now due to https://gitlab.com/gitlab-org/gitlab/-/issues/285442
|
||||
end
|
||||
|
||||
def group_as_hash(group, group_counts)
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ class ObjectStoreSettings
|
|||
|
||||
# If a storage type such as Pages defines its own connection and does not
|
||||
# use Workhorse acceleration, we allow it to override the consolidated form.
|
||||
next if allowed_storage_specific_settings?(store_type, section)
|
||||
next if allowed_storage_specific_settings?(store_type, section.to_h)
|
||||
|
||||
# Map bucket (external name) -> remote_directory (internal representation)
|
||||
target_config['remote_directory'] = target_config.delete('bucket')
|
||||
|
|
|
|||
|
|
@ -3,10 +3,77 @@
|
|||
module BulkImports
|
||||
module Pipeline
|
||||
extend ActiveSupport::Concern
|
||||
include Gitlab::ClassAttributes
|
||||
|
||||
included do
|
||||
include Attributes
|
||||
include Runner
|
||||
|
||||
private
|
||||
|
||||
def extractors
|
||||
@extractors ||= self.class.extractors.map(&method(:instantiate))
|
||||
end
|
||||
|
||||
def transformers
|
||||
@transformers ||= self.class.transformers.map(&method(:instantiate))
|
||||
end
|
||||
|
||||
def loaders
|
||||
@loaders ||= self.class.loaders.map(&method(:instantiate))
|
||||
end
|
||||
|
||||
def after_run
|
||||
@after_run ||= self.class.after_run_callback
|
||||
end
|
||||
|
||||
def pipeline_name
|
||||
@pipeline ||= self.class.name
|
||||
end
|
||||
|
||||
def instantiate(class_config)
|
||||
class_config[:klass].new(class_config[:options])
|
||||
end
|
||||
end
|
||||
|
||||
class_methods do
|
||||
def extractor(klass, options = nil)
|
||||
add_attribute(:extractors, klass, options)
|
||||
end
|
||||
|
||||
def transformer(klass, options = nil)
|
||||
add_attribute(:transformers, klass, options)
|
||||
end
|
||||
|
||||
def loader(klass, options = nil)
|
||||
add_attribute(:loaders, klass, options)
|
||||
end
|
||||
|
||||
def after_run(&block)
|
||||
class_attributes[:after_run] = block
|
||||
end
|
||||
|
||||
def extractors
|
||||
class_attributes[:extractors]
|
||||
end
|
||||
|
||||
def transformers
|
||||
class_attributes[:transformers]
|
||||
end
|
||||
|
||||
def loaders
|
||||
class_attributes[:loaders]
|
||||
end
|
||||
|
||||
def after_run_callback
|
||||
class_attributes[:after_run]
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def add_attribute(sym, klass, options)
|
||||
class_attributes[sym] ||= []
|
||||
class_attributes[sym] << { klass: klass, options: options }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,49 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module BulkImports
|
||||
module Pipeline
|
||||
module Attributes
|
||||
extend ActiveSupport::Concern
|
||||
include Gitlab::ClassAttributes
|
||||
|
||||
class_methods do
|
||||
def extractor(klass, options = nil)
|
||||
add_attribute(:extractors, klass, options)
|
||||
end
|
||||
|
||||
def transformer(klass, options = nil)
|
||||
add_attribute(:transformers, klass, options)
|
||||
end
|
||||
|
||||
def loader(klass, options = nil)
|
||||
add_attribute(:loaders, klass, options)
|
||||
end
|
||||
|
||||
def after_run(&block)
|
||||
class_attributes[:after_run] = block
|
||||
end
|
||||
|
||||
def add_attribute(sym, klass, options)
|
||||
class_attributes[sym] ||= []
|
||||
class_attributes[sym] << { klass: klass, options: options }
|
||||
end
|
||||
|
||||
def extractors
|
||||
class_attributes[:extractors]
|
||||
end
|
||||
|
||||
def transformers
|
||||
class_attributes[:transformers]
|
||||
end
|
||||
|
||||
def loaders
|
||||
class_attributes[:loaders]
|
||||
end
|
||||
|
||||
def after_run_callback
|
||||
class_attributes[:after_run]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -5,34 +5,6 @@ module BulkImports
|
|||
module Runner
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
private
|
||||
|
||||
def extractors
|
||||
@extractors ||= self.class.extractors.map(&method(:instantiate))
|
||||
end
|
||||
|
||||
def transformers
|
||||
@transformers ||= self.class.transformers.map(&method(:instantiate))
|
||||
end
|
||||
|
||||
def loaders
|
||||
@loaders ||= self.class.loaders.map(&method(:instantiate))
|
||||
end
|
||||
|
||||
def after_run
|
||||
@after_run ||= self.class.after_run_callback
|
||||
end
|
||||
|
||||
def pipeline_name
|
||||
@pipeline ||= self.class.name
|
||||
end
|
||||
|
||||
def instantiate(class_config)
|
||||
class_config[:klass].new(class_config[:options])
|
||||
end
|
||||
end
|
||||
|
||||
def run(context)
|
||||
info(context, message: "Pipeline started", pipeline: pipeline_name)
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ Migration/UpdateLargeTable:
|
|||
- :taggings
|
||||
- :todos
|
||||
- :users
|
||||
- :user_preferences
|
||||
- :web_hook_logs
|
||||
DeniedMethods:
|
||||
- :change_column_type_concurrently
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ RSpec.describe BulkImports::Groups::Pipelines::GroupPipeline do
|
|||
|
||||
describe 'pipeline parts' do
|
||||
it { expect(described_class).to include_module(BulkImports::Pipeline) }
|
||||
it { expect(described_class).to include_module(BulkImports::Pipeline::Attributes) }
|
||||
it { expect(described_class).to include_module(BulkImports::Pipeline::Runner) }
|
||||
|
||||
it 'has extractors' do
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ RSpec.describe BulkImports::Groups::Pipelines::SubgroupEntitiesPipeline do
|
|||
|
||||
describe 'pipeline parts' do
|
||||
it { expect(described_class).to include_module(BulkImports::Pipeline) }
|
||||
it { expect(described_class).to include_module(BulkImports::Pipeline::Attributes) }
|
||||
it { expect(described_class).to include_module(BulkImports::Pipeline::Runner) }
|
||||
|
||||
it 'has extractors' do
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe BulkImports::Pipeline::Attributes do
|
||||
RSpec.describe BulkImports::Pipeline do
|
||||
describe 'pipeline attributes' do
|
||||
before do
|
||||
stub_const('BulkImports::Extractor', Class.new)
|
||||
|
|
@ -10,7 +10,7 @@ RSpec.describe BulkImports::Pipeline::Attributes do
|
|||
stub_const('BulkImports::Loader', Class.new)
|
||||
|
||||
klass = Class.new do
|
||||
include BulkImports::Pipeline::Attributes
|
||||
include BulkImports::Pipeline
|
||||
|
||||
extractor BulkImports::Extractor, { foo: :bar }
|
||||
transformer BulkImports::Transformer, { foo: :bar }
|
||||
Loading…
Reference in New Issue