Commit 7114ad8e authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@13-8-stable-ee

parent 0b4b96be
......@@ -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
......
......@@ -25,7 +25,7 @@ get_puma_pid()
start()
{
spawn_puma -d
spawn_puma &
}
start_foreground()
......
---
title: Fix regression with old wiki image uploads
merge_request: 52656
author:
type: fixed
---
title: Revert multipart URL optimization for AWS S3
merge_request: 52561
author:
type: fixed
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
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