diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-18 15:09:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-18 15:09:21 +0300 |
commit | a300f4d5c7fdd5d557288ee526986e0adb683b35 (patch) | |
tree | 8fb18970393c8b4e3b9681262b0318db00f7ba51 /app | |
parent | 7bbc9509dc0567d2a2d8314e99179aaad33ba361 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
20 files changed, 144 insertions, 89 deletions
diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue index 2c330d8c851..bc49464a560 100644 --- a/app/assets/javascripts/diffs/components/app.vue +++ b/app/assets/javascripts/diffs/components/app.vue @@ -472,7 +472,7 @@ export default { fetchData(toggleTree = true) { this.fetchDiffFilesMeta() .then(({ real_size = 0 }) => { - this.diffFilesLength = parseInt(real_size, 10); + this.diffFilesLength = parseInt(real_size, 10) || 0; if (toggleTree) { this.setTreeDisplay(); } diff --git a/app/assets/javascripts/groups/components/overview_tabs.vue b/app/assets/javascripts/groups/components/overview_tabs.vue index 84e992b6365..15a0c686548 100644 --- a/app/assets/javascripts/groups/components/overview_tabs.vue +++ b/app/assets/javascripts/groups/components/overview_tabs.vue @@ -19,34 +19,35 @@ export default { components: { GlTabs, GlTab, GroupsApp, GlSearchBoxByType, GlSorting, GlSortingItem }, inject: ['endpoints', 'initialSort'], data() { + const tabs = [ + { + title: this.$options.i18n[ACTIVE_TAB_SUBGROUPS_AND_PROJECTS], + key: ACTIVE_TAB_SUBGROUPS_AND_PROJECTS, + renderEmptyState: true, + lazy: this.$route.name !== ACTIVE_TAB_SUBGROUPS_AND_PROJECTS, + service: new GroupsService(this.endpoints[ACTIVE_TAB_SUBGROUPS_AND_PROJECTS]), + store: new GroupsStore({ showSchemaMarkup: true }), + }, + { + title: this.$options.i18n[ACTIVE_TAB_SHARED], + key: ACTIVE_TAB_SHARED, + renderEmptyState: false, + lazy: this.$route.name !== ACTIVE_TAB_SHARED, + service: new GroupsService(this.endpoints[ACTIVE_TAB_SHARED]), + store: new GroupsStore(), + }, + { + title: this.$options.i18n[ACTIVE_TAB_ARCHIVED], + key: ACTIVE_TAB_ARCHIVED, + renderEmptyState: false, + lazy: this.$route.name !== ACTIVE_TAB_ARCHIVED, + service: new GroupsService(this.endpoints[ACTIVE_TAB_ARCHIVED]), + store: new GroupsStore(), + }, + ]; return { - tabs: [ - { - title: this.$options.i18n[ACTIVE_TAB_SUBGROUPS_AND_PROJECTS], - key: ACTIVE_TAB_SUBGROUPS_AND_PROJECTS, - renderEmptyState: true, - lazy: false, - service: new GroupsService(this.endpoints[ACTIVE_TAB_SUBGROUPS_AND_PROJECTS]), - store: new GroupsStore({ showSchemaMarkup: true }), - }, - { - title: this.$options.i18n[ACTIVE_TAB_SHARED], - key: ACTIVE_TAB_SHARED, - renderEmptyState: false, - lazy: true, - service: new GroupsService(this.endpoints[ACTIVE_TAB_SHARED]), - store: new GroupsStore(), - }, - { - title: this.$options.i18n[ACTIVE_TAB_ARCHIVED], - key: ACTIVE_TAB_ARCHIVED, - renderEmptyState: false, - lazy: true, - service: new GroupsService(this.endpoints[ACTIVE_TAB_ARCHIVED]), - store: new GroupsStore(), - }, - ], - activeTabIndex: 0, + tabs, + activeTabIndex: tabs.findIndex((tab) => tab.key === this.$route.name), sort: SORTING_ITEM_NAME, isAscending: true, search: '', @@ -75,14 +76,6 @@ export default { ) || SORTING_ITEM_NAME; this.sort = sort; this.isAscending = sort.asc === sortQueryStringValue; - - const activeTabIndex = this.tabs.findIndex((tab) => tab.key === this.$route.name); - - if (activeTabIndex === -1) { - return; - } - - this.activeTabIndex = activeTabIndex; }, methods: { handleTabInput(tabIndex) { diff --git a/app/assets/javascripts/vue_shared/components/gitlab_version_check.vue b/app/assets/javascripts/vue_shared/components/gitlab_version_check.vue index 25c4b01af44..c2be5e4f7a1 100644 --- a/app/assets/javascripts/vue_shared/components/gitlab_version_check.vue +++ b/app/assets/javascripts/vue_shared/components/gitlab_version_check.vue @@ -57,7 +57,7 @@ export default { this.status = res.data.severity; this.track('rendered_version_badge', { - label: this.status, + label: this.title, }); } }) @@ -66,19 +66,24 @@ export default { this.status = null; }); }, + onClick() { + this.track('click_version_badge', { label: this.title }); + }, }, UPGRADE_DOCS_URL, }; </script> <template> - <gl-badge - v-if="status" - :href="$options.UPGRADE_DOCS_URL" - class="version-check-badge" - :variant="status" - :size="size" - @click="track('click_version_badge', { label: status })" - >{{ title }}</gl-badge - > + <!-- TODO: remove the span element once bootstrap-vue is updated to version 2.21.1 --> + <!-- TODO: https://github.com/bootstrap-vue/bootstrap-vue/issues/6219 --> + <span v-if="status" data-testid="badge-click-wrapper" @click="onClick"> + <gl-badge + :href="$options.UPGRADE_DOCS_URL" + class="version-check-badge" + :variant="status" + :size="size" + >{{ title }}</gl-badge + > + </span> </template> diff --git a/app/graphql/mutations/ci/job/artifacts_destroy.rb b/app/graphql/mutations/ci/job/artifacts_destroy.rb index c27ab9c4d89..34c58fc1240 100644 --- a/app/graphql/mutations/ci/job/artifacts_destroy.rb +++ b/app/graphql/mutations/ci/job/artifacts_destroy.rb @@ -25,12 +25,21 @@ module Mutations def resolve(id:) job = authorized_find!(id: id) - result = ::Ci::JobArtifacts::DestroyBatchService.new(job.job_artifacts, pick_up_at: Time.current).execute - { - job: job, - destroyed_artifacts_count: result[:destroyed_artifacts_count], - errors: Array(result[:errors]) - } + result = ::Ci::JobArtifacts::DeleteService.new(job).execute + + if result.success? + { + job: job, + destroyed_artifacts_count: result.payload[:destroyed_artifacts_count], + errors: Array(result.payload[:errors]) + } + else + { + job: job, + destroyed_artifacts_count: 0, + errors: Array(result.message) + } + end end end end diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index fa8951bf642..f83aa79b461 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -120,7 +120,7 @@ class ApplicationSetting < ApplicationRecord if: :help_page_support_url_column_exists? validates :help_page_documentation_base_url, - length: { maximum: 255, message: _("is too long (maximum is %{count} characters)") }, + length: { maximum: 255, message: N_("is too long (maximum is %{count} characters)") }, allow_blank: true, addressable_url: true @@ -148,7 +148,7 @@ class ApplicationSetting < ApplicationRecord if: :akismet_enabled validates :spam_check_api_key, - length: { maximum: 2000, message: _('is too long (maximum is %{count} characters)') }, + length: { maximum: 2000, message: N_('is too long (maximum is %{count} characters)') }, allow_blank: true validates :unique_ips_limit_per_user, @@ -228,7 +228,7 @@ class ApplicationSetting < ApplicationRecord validates :default_artifacts_expire_in, presence: true, duration: true validates :container_expiration_policies_enable_historic_entries, - inclusion: { in: [true, false], message: _('must be a boolean value') } + inclusion: { in: [true, false], message: N_('must be a boolean value') } validates :container_registry_token_expire_delay, presence: true, @@ -320,8 +320,8 @@ class ApplicationSetting < ApplicationRecord validates :personal_access_token_prefix, format: { with: %r{\A[a-zA-Z0-9_+=/@:.-]+\z}, - message: _("can contain only letters of the Base64 alphabet (RFC4648) with the addition of '@', ':' and '.'") }, - length: { maximum: 20, message: _('is too long (maximum is %{count} characters)') }, + message: N_("can contain only letters of the Base64 alphabet (RFC4648) with the addition of '@', ':' and '.'") }, + length: { maximum: 20, message: N_('is too long (maximum is %{count} characters)') }, allow_blank: true validates :commit_email_hostname, format: { with: /\A[^@]+\z/ } @@ -369,7 +369,7 @@ class ApplicationSetting < ApplicationRecord validates :email_restrictions, untrusted_regexp: true - validates :hashed_storage_enabled, inclusion: { in: [true], message: _("Hashed storage can't be disabled anymore for new projects") } + validates :hashed_storage_enabled, inclusion: { in: [true], message: N_("Hashed storage can't be disabled anymore for new projects") } validates :container_registry_delete_tags_service_timeout, :container_registry_cleanup_tags_service_max_list_size, @@ -377,7 +377,7 @@ class ApplicationSetting < ApplicationRecord numericality: { only_integer: true, greater_than_or_equal_to: 0 } validates :container_registry_expiration_policies_caching, - inclusion: { in: [true, false], message: _('must be a boolean value') } + inclusion: { in: [true, false], message: N_('must be a boolean value') } validates :container_registry_import_max_tags_count, :container_registry_import_max_retries, @@ -404,11 +404,11 @@ class ApplicationSetting < ApplicationRecord numericality: { only_integer: true, greater_than_or_equal_to: 0 } validates :invisible_captcha_enabled, - inclusion: { in: [true, false], message: _('must be a boolean value') } + inclusion: { in: [true, false], message: N_('must be a boolean value') } validates :invitation_flow_enforcement, :can_create_group, allow_nil: false, - inclusion: { in: [true, false], message: _('must be a boolean value') } + inclusion: { in: [true, false], message: N_('must be a boolean value') } Gitlab::SSHPublicKey.supported_types.each do |type| validates :"#{type}_key_restriction", presence: true, key_restriction: { type: type } @@ -513,11 +513,11 @@ class ApplicationSetting < ApplicationRecord rsa_key: true, allow_nil: true validates :rate_limiting_response_text, - length: { maximum: 255, message: _('is too long (maximum is %{count} characters)') }, + length: { maximum: 255, message: N_('is too long (maximum is %{count} characters)') }, allow_blank: true validates :jira_connect_application_key, - length: { maximum: 255, message: _('is too long (maximum is %{count} characters)') }, + length: { maximum: 255, message: N_('is too long (maximum is %{count} characters)') }, allow_blank: true with_options(presence: true, numericality: { only_integer: true, greater_than: 0 }) do @@ -561,7 +561,7 @@ class ApplicationSetting < ApplicationRecord allow_nil: false validates :admin_mode, - inclusion: { in: [true, false], message: _('must be a boolean value') } + inclusion: { in: [true, false], message: N_('must be a boolean value') } validates :external_pipeline_validation_service_url, addressable_url: true, allow_blank: true @@ -574,7 +574,7 @@ class ApplicationSetting < ApplicationRecord inclusion: { in: ApplicationSetting.whats_new_variants.keys } validates :floc_enabled, - inclusion: { in: [true, false], message: _('must be a boolean value') } + inclusion: { in: [true, false], message: N_('must be a boolean value') } enum sidekiq_job_limiter_mode: { Gitlab::SidekiqMiddleware::SizeLimiter::Validator::TRACK_MODE => 0, @@ -589,7 +589,7 @@ class ApplicationSetting < ApplicationRecord numericality: { only_integer: true, greater_than_or_equal_to: 0 } validates :sentry_enabled, - inclusion: { in: [true, false], message: _('must be a boolean value') } + inclusion: { in: [true, false], message: N_('must be a boolean value') } validates :sentry_dsn, addressable_url: true, presence: true, length: { maximum: 255 }, if: :sentry_enabled? @@ -601,7 +601,7 @@ class ApplicationSetting < ApplicationRecord if: :sentry_enabled? validates :error_tracking_enabled, - inclusion: { in: [true, false], message: _('must be a boolean value') } + inclusion: { in: [true, false], message: N_('must be a boolean value') } validates :error_tracking_api_url, presence: true, addressable_url: true, @@ -670,7 +670,7 @@ class ApplicationSetting < ApplicationRecord attr_encrypted :jitsu_administrator_password, encryption_options_base_32_aes_256_gcm validates :disable_feed_token, - inclusion: { in: [true, false], message: _('must be a boolean value') } + inclusion: { in: [true, false], message: N_('must be a boolean value') } before_validation :ensure_uuid! before_validation :coerce_repository_storages_weighted, if: :repository_storages_weighted_changed? diff --git a/app/models/ci/job_token/scope.rb b/app/models/ci/job_token/scope.rb index 26a49d6a730..1aa49b95201 100644 --- a/app/models/ci/job_token/scope.rb +++ b/app/models/ci/job_token/scope.rb @@ -23,7 +23,7 @@ module Ci def includes?(target_project) # if the setting is disabled any project is considered to be in scope. - return true unless source_project.ci_job_token_scope_enabled? + return true unless source_project.ci_outbound_job_token_scope_enabled? target_project.id == source_project.id || Ci::JobToken::ProjectScopeLink.from_project(source_project).to_project(target_project).exists? diff --git a/app/models/group_group_link.rb b/app/models/group_group_link.rb index 7005c8593bd..15949570f9c 100644 --- a/app/models/group_group_link.rb +++ b/app/models/group_group_link.rb @@ -8,7 +8,7 @@ class GroupGroupLink < ApplicationRecord validates :shared_group, presence: true validates :shared_group_id, uniqueness: { scope: [:shared_with_group_id], - message: _('The group has already been shared with this group') } + message: N_('The group has already been shared with this group') } validates :shared_with_group, presence: true validates :group_access, inclusion: { in: Gitlab::Access.all_values }, presence: true diff --git a/app/models/incident_management/timeline_event.rb b/app/models/incident_management/timeline_event.rb index de193308558..735d4e4298c 100644 --- a/app/models/incident_management/timeline_event.rb +++ b/app/models/incident_management/timeline_event.rb @@ -21,6 +21,11 @@ module IncidentManagement validates :note, presence: true, length: { maximum: 10_000 } validates :note_html, length: { maximum: 10_000 } + has_many :timeline_event_tag_links, class_name: 'IncidentManagement::TimelineEventTagLink' + has_many :timeline_event_tags, + class_name: 'IncidentManagement::TimelineEventTag', + through: :timeline_event_tag_links + scope :order_occurred_at_asc_id_asc, -> { reorder(occurred_at: :asc, id: :asc) } end end diff --git a/app/models/incident_management/timeline_event_tag.rb b/app/models/incident_management/timeline_event_tag.rb new file mode 100644 index 00000000000..cde3afcaa16 --- /dev/null +++ b/app/models/incident_management/timeline_event_tag.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module IncidentManagement + class TimelineEventTag < ApplicationRecord + self.table_name = 'incident_management_timeline_event_tags' + + belongs_to :project, inverse_of: :incident_management_timeline_event_tags + + has_many :timeline_event_tag_links, + class_name: 'IncidentManagement::TimelineEventTagLink' + + has_many :timeline_events, + class_name: 'IncidentManagement::TimelineEvent', + through: :timeline_event_tag_links + + validates :name, presence: true, format: { with: /\A[^,]+\z/ } + validates :name, uniqueness: { scope: :project_id } + validates :name, length: { maximum: 255 } + end +end diff --git a/app/models/incident_management/timeline_event_tag_link.rb b/app/models/incident_management/timeline_event_tag_link.rb new file mode 100644 index 00000000000..912339717a8 --- /dev/null +++ b/app/models/incident_management/timeline_event_tag_link.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module IncidentManagement + class TimelineEventTagLink < ApplicationRecord + self.table_name = 'incident_management_timeline_event_tag_links' + + belongs_to :timeline_event_tag, class_name: 'IncidentManagement::TimelineEventTag' + + belongs_to :timeline_event, class_name: 'IncidentManagement::TimelineEvent' + end +end diff --git a/app/models/jira_import_state.rb b/app/models/jira_import_state.rb index 76b5f1def6a..97d6cd00fb8 100644 --- a/app/models/jira_import_state.rb +++ b/app/models/jira_import_state.rb @@ -24,7 +24,7 @@ class JiraImportState < ApplicationRecord validates :project, uniqueness: { conditions: -> { where.not(status: STATUSES.values_at(:failed, :finished)) }, - message: _('Cannot have multiple Jira imports running at the same time') + message: N_('Cannot have multiple Jira imports running at the same time') } before_save :ensure_error_message_size diff --git a/app/models/member.rb b/app/models/member.rb index f23705816b6..ff1d8f18c25 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -55,7 +55,7 @@ class Member < ApplicationRecord validate :signup_email_valid?, on: :create, if: ->(member) { member.invite_email.present? } validates :user_id, uniqueness: { - message: _('project bots cannot be added to other groups / projects') + message: N_('project bots cannot be added to other groups / projects') }, if: :project_bot? validate :access_level_inclusion diff --git a/app/models/project.rb b/app/models/project.rb index a5589c71f73..7b61010ab01 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -262,6 +262,7 @@ class Project < ApplicationRecord has_many :source_of_merge_requests, foreign_key: 'source_project_id', class_name: 'MergeRequest' has_many :issues has_many :incident_management_issuable_escalation_statuses, through: :issues, inverse_of: :project, class_name: 'IncidentManagement::IssuableEscalationStatus' + has_many :incident_management_timeline_event_tags, inverse_of: :project, class_name: 'IncidentManagement::TimelineEventTag' has_many :labels, class_name: 'ProjectLabel' has_many :integrations has_many :events @@ -476,7 +477,7 @@ class Project < ApplicationRecord delegate :dashboard_timezone, to: :metrics_setting, allow_nil: true, prefix: true delegate :default_git_depth, :default_git_depth=, to: :ci_cd_settings, prefix: :ci, allow_nil: true delegate :forward_deployment_enabled, :forward_deployment_enabled=, to: :ci_cd_settings, prefix: :ci, allow_nil: true - delegate :job_token_scope_enabled, :job_token_scope_enabled=, to: :ci_cd_settings, prefix: :ci, allow_nil: true + delegate :job_token_scope_enabled, :job_token_scope_enabled=, to: :ci_cd_settings, prefix: :ci_outbound, allow_nil: true delegate :inbound_job_token_scope_enabled, :inbound_job_token_scope_enabled=, to: :ci_cd_settings, prefix: :ci, allow_nil: true delegate :keep_latest_artifact, :keep_latest_artifact=, to: :ci_cd_settings, allow_nil: true delegate :opt_in_jwt, :opt_in_jwt=, to: :ci_cd_settings, prefix: :ci, allow_nil: true @@ -503,7 +504,7 @@ class Project < ApplicationRecord validates :description, length: { maximum: 2000 }, allow_blank: true validates :ci_config_path, format: { without: %r{(\.{2}|\A/)}, - message: _('cannot include leading slash or directory traversal.') }, + message: N_('cannot include leading slash or directory traversal.') }, length: { maximum: 255 }, allow_blank: true validates :name, @@ -699,13 +700,13 @@ class Project < ApplicationRecord enum auto_cancel_pending_pipelines: { disabled: 0, enabled: 1 } chronic_duration_attr :build_timeout_human_readable, :build_timeout, - default: 3600, error_message: _('Maximum job timeout has a value which could not be accepted') + default: 3600, error_message: N_('Maximum job timeout has a value which could not be accepted') validates :build_timeout, allow_nil: true, numericality: { greater_than_or_equal_to: 10.minutes, less_than: MAX_BUILD_TIMEOUT, only_integer: true, - message: _('needs to be between 10 minutes and 1 month') } + message: N_('needs to be between 10 minutes and 1 month') } # Used by Projects::CleanupService to hold a map of rewritten object IDs mount_uploader :bfg_object_map, AttachmentUploader @@ -2896,7 +2897,7 @@ class Project < ApplicationRecord ci_cd_settings.allow_fork_pipelines_to_run_in_parent_project? end - def ci_job_token_scope_enabled? + def ci_outbound_job_token_scope_enabled? return false unless ci_cd_settings ci_cd_settings.job_token_scope_enabled? diff --git a/app/models/project_group_link.rb b/app/models/project_group_link.rb index 2ba3c74df5b..9f9447c1de2 100644 --- a/app/models/project_group_link.rb +++ b/app/models/project_group_link.rb @@ -9,7 +9,7 @@ class ProjectGroupLink < ApplicationRecord validates :project_id, presence: true validates :group, presence: true - validates :group_id, uniqueness: { scope: [:project_id], message: _("already shared with this group") } + validates :group_id, uniqueness: { scope: [:project_id], message: N_("already shared with this group") } validates :group_access, presence: true validates :group_access, inclusion: { in: Gitlab::Access.values }, presence: true validate :different_group diff --git a/app/models/user.rb b/app/models/user.rb index 74035414970..b36b00fcbaf 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -286,10 +286,10 @@ class User < ApplicationRecord validate :check_username_format, if: :username_changed? validates :theme_id, allow_nil: true, inclusion: { in: Gitlab::Themes.valid_ids, - message: _("%{placeholder} is not a valid theme") % { placeholder: '%{value}' } } + message: ->(*) { _("%{placeholder} is not a valid theme") % { placeholder: '%{value}' } } } validates :color_scheme_id, allow_nil: true, inclusion: { in: Gitlab::ColorSchemes.valid_ids, - message: _("%{placeholder} is not a valid color scheme") % { placeholder: '%{value}' } } + message: ->(*) { _("%{placeholder} is not a valid color scheme") % { placeholder: '%{value}' } } } validates :website_url, allow_blank: true, url: true, if: :website_url_changed? diff --git a/app/models/users/banned_user.rb b/app/models/users/banned_user.rb index c52b6d4b728..615668e2b55 100644 --- a/app/models/users/banned_user.rb +++ b/app/models/users/banned_user.rb @@ -7,6 +7,6 @@ module Users belongs_to :user validates :user, presence: true - validates :user_id, uniqueness: { message: _("banned user already exists") } + validates :user_id, uniqueness: { message: N_("banned user already exists") } end end diff --git a/app/services/ci/job_artifacts/delete_service.rb b/app/services/ci/job_artifacts/delete_service.rb index 65cae03312e..c9d590eccc4 100644 --- a/app/services/ci/job_artifacts/delete_service.rb +++ b/app/services/ci/job_artifacts/delete_service.rb @@ -15,13 +15,23 @@ module Ci method: 'Ci::JobArtifacts::DeleteService#execute', project_id: build.project_id ) + return ServiceResponse.error( + message: 'Action temporarily disabled. The project this job belongs to is undergoing stats refresh.', + reason: :project_stats_refresh + ) end - # fix_expire_at is false because in this case we want to explicitly delete the job artifacts - # this flag is a workaround that will be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/355833 - Ci::JobArtifacts::DestroyBatchService.new(build.job_artifacts.erasable, fix_expire_at: false).execute + result = Ci::JobArtifacts::DestroyBatchService.new(build.job_artifacts.erasable).execute - ServiceResponse.success + if result.fetch(:status) == :success + ServiceResponse.success(payload: + { + destroyed_artifacts_count: result.fetch(:destroyed_artifacts_count), + statistics_updates: result.fetch(:statistics_updates) + }) + else + ServiceResponse.error(message: result.fetch(:message)) + end end private diff --git a/app/views/admin/application_settings/appearances/preview_sign_in.html.haml b/app/views/admin/application_settings/appearances/preview_sign_in.html.haml index 2e4ab714048..1c2350e2835 100644 --- a/app/views/admin/application_settings/appearances/preview_sign_in.html.haml +++ b/app/views/admin/application_settings/appearances/preview_sign_in.html.haml @@ -9,5 +9,5 @@ = label_tag :password = password_field_tag :password, nil, disabled: true, class: "form-control gl-form-input bottom", title: title .form-group - = button_tag _("Sign in"), disabled: true, class: "btn gl-button btn-confirm", type: "button", title: title - + = render Pajamas::ButtonComponent.new(variant: :confirm, disabled: true, button_options: { title: title }) do + = _("Sign in") diff --git a/app/views/shared/issuable/_label_page_create.html.haml b/app/views/shared/issuable/_label_page_create.html.haml index ec78b3f7ce3..eb3acd8e055 100644 --- a/app/views/shared/issuable/_label_page_create.html.haml +++ b/app/views/shared/issuable/_label_page_create.html.haml @@ -19,7 +19,7 @@ %input.js-add-list{ type: "checkbox", name: "add_list", checked: add_list } %span= _('Add list') .clearfix - %button.gl-button.btn.btn-confirm.float-left.js-new-label-btn{ type: "button" } + = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { class: 'float-left js-new-label-btn' }) do = _('Create') - %button.gl-button.btn.btn-default.float-right.js-cancel-label-btn{ type: "button" } + = render Pajamas::ButtonComponent.new(button_options: { class: 'float-right js-cancel-label-btn' }) do = _('Cancel') diff --git a/app/workers/ci/cancel_pipeline_worker.rb b/app/workers/ci/cancel_pipeline_worker.rb index 147839a0625..2735498b6bb 100644 --- a/app/workers/ci/cancel_pipeline_worker.rb +++ b/app/workers/ci/cancel_pipeline_worker.rb @@ -10,6 +10,7 @@ module Ci idempotent! deduplicate :until_executed urgency :high + loggable_arguments 1 def perform(pipeline_id, auto_canceled_by_pipeline_id) ::Ci::Pipeline.find_by_id(pipeline_id).try do |pipeline| |