summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-04 17:42:58 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-04 17:42:58 +0000
commit7114ad8ea2418f8fdc4741c8b7f5b551bcc467a7 (patch)
tree589d36c0e93fddcea736dd6cb085a89252c6501a
parent0b4b96be1f12bf2a0b9b561daba716e0468a9e61 (diff)
downloadgitlab-ce-7114ad8ea2418f8fdc4741c8b7f5b551bcc467a7.tar.gz
Add latest changes from gitlab-org/gitlab@13-8-stable-ee
-rw-r--r--app/helpers/markup_helper.rb3
-rwxr-xr-xbin/web_puma2
-rw-r--r--changelogs/unreleased/fj-fix-regression-old-uploads.yml5
-rw-r--r--changelogs/unreleased/sh-revert-multipart-upload-optimization.yml5
-rw-r--r--lib/object_storage/direct_upload.rb2
-rwxr-xr-xlib/support/init.d/gitlab4
-rw-r--r--spec/helpers/markup_helper_spec.rb15
-rw-r--r--spec/lib/object_storage/direct_upload_spec.rb4
8 files changed, 31 insertions, 9 deletions
diff --git a/app/helpers/markup_helper.rb b/app/helpers/markup_helper.rb
index 25d56ffca2c..ad206d0e5b5 100644
--- a/app/helpers/markup_helper.rb
+++ b/app/helpers/markup_helper.rb
@@ -126,7 +126,8 @@ module MarkupHelper
text = wiki_page.content
return '' unless text.present?
- html = markup_unsafe(wiki_page.path, text, render_wiki_content_context(@wiki, wiki_page, context))
+ context = render_wiki_content_context(@wiki, wiki_page, context)
+ html = markup_unsafe(wiki_page.path, text, context)
prepare_for_rendering(html, context)
end
diff --git a/bin/web_puma b/bin/web_puma
index 29d72cd4a41..6a9b729f6dd 100755
--- a/bin/web_puma
+++ b/bin/web_puma
@@ -25,7 +25,7 @@ get_puma_pid()
start()
{
- spawn_puma -d
+ spawn_puma &
}
start_foreground()
diff --git a/changelogs/unreleased/fj-fix-regression-old-uploads.yml b/changelogs/unreleased/fj-fix-regression-old-uploads.yml
new file mode 100644
index 00000000000..5e2cc5fcf9d
--- /dev/null
+++ b/changelogs/unreleased/fj-fix-regression-old-uploads.yml
@@ -0,0 +1,5 @@
+---
+title: Fix regression with old wiki image uploads
+merge_request: 52656
+author:
+type: fixed
diff --git a/changelogs/unreleased/sh-revert-multipart-upload-optimization.yml b/changelogs/unreleased/sh-revert-multipart-upload-optimization.yml
new file mode 100644
index 00000000000..ff3fa4f8919
--- /dev/null
+++ b/changelogs/unreleased/sh-revert-multipart-upload-optimization.yml
@@ -0,0 +1,5 @@
+---
+title: Revert multipart URL optimization for AWS S3
+merge_request: 52561
+author:
+type: fixed
diff --git a/lib/object_storage/direct_upload.rb b/lib/object_storage/direct_upload.rb
index 3a8fa51e198..7f1c30e574d 100644
--- a/lib/object_storage/direct_upload.rb
+++ b/lib/object_storage/direct_upload.rb
@@ -206,7 +206,7 @@ module ObjectStorage
end
def requires_multipart_upload?
- config.aws? && !has_length && !use_workhorse_s3_client?
+ config.aws? && !has_length
end
def upload_id
diff --git a/lib/support/init.d/gitlab b/lib/support/init.d/gitlab
index 98cac0b0d1d..4fe7f0cf480 100755
--- a/lib/support/init.d/gitlab
+++ b/lib/support/init.d/gitlab
@@ -138,8 +138,8 @@ wait_for_pids(){
i=$((i+1))
if [ $((i%10)) = 0 ]; then
echo -n "."
- elif [ $((i)) = 301 ]; then
- echo "Waited 30s for the processes to write their pids, something probably went wrong."
+ elif [ $((i)) = 601 ]; then
+ echo "Waited 60s for the processes to write their pids, something probably went wrong."
exit 1;
fi
done
diff --git a/spec/helpers/markup_helper_spec.rb b/spec/helpers/markup_helper_spec.rb
index 45e8a2e7e1a..3d1690f6588 100644
--- a/spec/helpers/markup_helper_spec.rb
+++ b/spec/helpers/markup_helper_spec.rb
@@ -355,6 +355,21 @@ RSpec.describe MarkupHelper do
expect(doc.css('.gl-label-link')).not_to be_empty
end
end
+
+ context 'when content has uploads' do
+ let(:upload_link) { '/uploads/test.png' }
+ let(:content) { "![ImageTest](#{upload_link})" }
+
+ before do
+ allow(wiki).to receive(:wiki_base_path).and_return(project.wiki.wiki_base_path)
+ end
+
+ it 'renders uploads relative to project' do
+ result = helper.render_wiki_content(wiki)
+
+ expect(result).to include("#{project.full_path}#{upload_link}")
+ end
+ end
end
context 'when file is Asciidoc' do
diff --git a/spec/lib/object_storage/direct_upload_spec.rb b/spec/lib/object_storage/direct_upload_spec.rb
index bd9d197afa0..547bba5117a 100644
--- a/spec/lib/object_storage/direct_upload_spec.rb
+++ b/spec/lib/object_storage/direct_upload_spec.rb
@@ -162,10 +162,6 @@ RSpec.describe ObjectStorage::DirectUpload do
it 'enables the Workhorse client' do
expect(subject[:UseWorkhorseClient]).to be true
end
-
- it 'omits the multipart upload URLs' do
- expect(subject).not_to include(:MultipartUpload)
- end
end
context 'when only server side encryption is used' do