diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-18 18:08:22 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-18 18:08:22 +0000 |
commit | 40cdcdd45b204fd23be63adeef7379b9b3ddfcad (patch) | |
tree | ab47c0f96deb09186d4df2d91d2c6840be9baadf /app | |
parent | e35f91f05bc00106dda3b9268c462db14c7f8ad6 (diff) | |
download | gitlab-ce-40cdcdd45b204fd23be63adeef7379b9b3ddfcad.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/ide/components/pipelines/list.vue | 4 | ||||
-rw-r--r-- | app/assets/javascripts/releases/components/app_edit.vue | 25 | ||||
-rw-r--r-- | app/models/blob.rb | 4 | ||||
-rw-r--r-- | app/models/snippet.rb | 2 | ||||
-rw-r--r-- | app/services/deployments/older_deployments_drop_service.rb | 4 |
5 files changed, 21 insertions, 18 deletions
diff --git a/app/assets/javascripts/ide/components/pipelines/list.vue b/app/assets/javascripts/ide/components/pipelines/list.vue index 39d67b0762a..cf6d01b6351 100644 --- a/app/assets/javascripts/ide/components/pipelines/list.vue +++ b/app/assets/javascripts/ide/components/pipelines/list.vue @@ -88,14 +88,14 @@ export default { </div> <tabs v-else class="ide-pipeline-list"> <tab :active="!pipelineFailed"> - <template slot="title"> + <template #title> {{ __('Jobs') }} <span v-if="jobsCount" class="badge badge-pill"> {{ jobsCount }} </span> </template> <jobs-list :loading="isLoadingJobs" :stages="stages" /> </tab> <tab :active="pipelineFailed"> - <template slot="title"> + <template #title> {{ __('Failed Jobs') }} <span v-if="failedJobsCount" class="badge badge-pill"> {{ failedJobsCount }} </span> </template> diff --git a/app/assets/javascripts/releases/components/app_edit.vue b/app/assets/javascripts/releases/components/app_edit.vue index 433df839acb..01dd0638023 100644 --- a/app/assets/javascripts/releases/components/app_edit.vue +++ b/app/assets/javascripts/releases/components/app_edit.vue @@ -184,18 +184,19 @@ export default { :add-spacing-classes="false" class="prepend-top-10 append-bottom-10" > - <textarea - id="release-notes" - slot="textarea" - v-model="releaseNotes" - class="note-textarea js-gfm-input js-autosize markdown-area" - dir="auto" - data-supports-quick-actions="false" - :aria-label="__('Release notes')" - :placeholder="__('Write your release notes or drag your files here…')" - @keydown.meta.enter="updateRelease()" - @keydown.ctrl.enter="updateRelease()" - ></textarea> + <template #textarea> + <textarea + id="release-notes" + v-model="releaseNotes" + class="note-textarea js-gfm-input js-autosize markdown-area" + dir="auto" + data-supports-quick-actions="false" + :aria-label="__('Release notes')" + :placeholder="__('Write your release notes or drag your files here…')" + @keydown.meta.enter="updateRelease()" + @keydown.ctrl.enter="updateRelease()" + ></textarea> + </template> </markdown-field> </div> </gl-form-group> diff --git a/app/models/blob.rb b/app/models/blob.rb index 56f6066b576..c8df6c7732a 100644 --- a/app/models/blob.rb +++ b/app/models/blob.rb @@ -86,8 +86,8 @@ class Blob < SimpleDelegator new(blob, container) end - def self.lazy(container, commit_id, path, blob_size_limit: Gitlab::Git::Blob::MAX_DATA_DISPLAY_SIZE) - BatchLoader.for([commit_id, path]).batch(key: container.repository) do |items, loader, args| + def self.lazy(repository, commit_id, path, blob_size_limit: Gitlab::Git::Blob::MAX_DATA_DISPLAY_SIZE) + BatchLoader.for([commit_id, path]).batch(key: repository) do |items, loader, args| args[:key].blobs_at(items, blob_size_limit: blob_size_limit).each do |blob| loader.call([blob.commit_id, blob.path], blob) if blob end diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 32f3309b0a3..37bbf3bbb9a 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -204,7 +204,7 @@ class Snippet < ApplicationRecord def blobs return [] unless repository_exists? - repository.ls_files(repository.root_ref).map { |file| Blob.lazy(self, repository.root_ref, file) } + repository.ls_files(repository.root_ref).map { |file| Blob.lazy(repository, repository.root_ref, file) } end def hook_attrs diff --git a/app/services/deployments/older_deployments_drop_service.rb b/app/services/deployments/older_deployments_drop_service.rb index 122f8ac89ed..e765d2484ea 100644 --- a/app/services/deployments/older_deployments_drop_service.rb +++ b/app/services/deployments/older_deployments_drop_service.rb @@ -12,7 +12,9 @@ module Deployments return unless @deployment&.running? older_deployments.find_each do |older_deployment| - older_deployment.deployable&.drop!(:forward_deployment_failure) + Gitlab::OptimisticLocking.retry_lock(older_deployment.deployable) do |deployable| + deployable.drop(:forward_deployment_failure) + end rescue => e Gitlab::ErrorTracking.track_exception(e, subject_id: @deployment.id, deployment_id: older_deployment.id) end |