Commit 5084c6e9 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 9ba1176e 5961d3df
......@@ -1275,5 +1275,3 @@ FactoryBot/InlineAssociation:
- 'spec/factories/packages.rb'
- 'spec/factories/packages/package_file.rb'
- 'spec/factories/sent_notifications.rb'
- 'spec/factories/uploads.rb'
- 'spec/factories/wiki_pages.rb'
---
title: Update diff_max_patch_bytes from 100kb -> 200kb
merge_request: 46276
author:
type: changed
---
title: Upgrade GitLab Pages to 1.29.0
merge_request: 46665
author:
type: added
# frozen_string_literal: true
class IncreaseDefaultDiffMaxPatchBytes < ActiveRecord::Migration[6.0]
DOWNTIME = false
def change
change_column_default(:application_settings, :diff_max_patch_bytes, from: 102400, to: 204800)
end
end
# frozen_string_literal: true
class MigrateDefaultDiffMaxPatchBytesToMinimum200kb < ActiveRecord::Migration[6.0]
DOWNTIME = false
MAX_SIZE = 200.kilobytes
class ApplicationSetting < ActiveRecord::Base
self.table_name = 'application_settings'
end
def up
table = ApplicationSetting.arel_table
ApplicationSetting.where(table[:diff_max_patch_bytes].lt(MAX_SIZE)).update_all(diff_max_patch_bytes: MAX_SIZE)
end
def down
table = ApplicationSetting.arel_table
ApplicationSetting.where(table[:diff_max_patch_bytes].eq(MAX_SIZE)).update_all(diff_max_patch_bytes: 100.kilobytes)
end
end
402e9a6e92802888ba01ee216850ab5b0fe9997a84415c9ffe8d5d37a9823220
\ No newline at end of file
ec5bab20a1b591b77b48b85dc0b871e88a41891d256201b7d8eb86195ef1c4ad
\ No newline at end of file
......@@ -9207,7 +9207,7 @@ CREATE TABLE application_settings (
custom_project_templates_group_id integer,
usage_stats_set_by_user_id integer,
receive_max_input_size integer,
diff_max_patch_bytes integer DEFAULT 102400 NOT NULL,
diff_max_patch_bytes integer DEFAULT 204800 NOT NULL,
archive_builds_in_seconds integer,
commit_email_hostname character varying,
protected_ci_variables boolean DEFAULT true NOT NULL,
......
......@@ -3,7 +3,7 @@
exports[`CustomStageForm Editing a custom stage isSavingCustomStage=true displays a loading icon 1`] = `
"<button type=\\"button\\" disabled=\\"disabled\\" class=\\"btn js-save-stage btn-success btn-md disabled gl-button\\">
<!---->
<!----> <span class=\\"gl-button-text\\"><span class=\\"gl-spinner-container\\"><span aria-label=\\"Loading\\" class=\\"align-text-bottom gl-spinner gl-spinner-orange gl-spinner-sm\\"></span></span>
<!----> <span class=\\"gl-button-text\\"><span class=\\"gl-spinner-container\\"><span aria-label=\\"Loading\\" class=\\"align-text-bottom gl-spinner gl-spinner-dark gl-spinner-sm\\"></span></span>
Update stage
</span></button>"
`;
......@@ -11,7 +11,7 @@ exports[`CustomStageForm Editing a custom stage isSavingCustomStage=true display
exports[`CustomStageForm isSavingCustomStage=true displays a loading icon 1`] = `
"<button type=\\"button\\" disabled=\\"disabled\\" class=\\"btn js-save-stage btn-success btn-md disabled gl-button\\">
<!---->
<!----> <span class=\\"gl-button-text\\"><span class=\\"gl-spinner-container\\"><span aria-label=\\"Loading\\" class=\\"align-text-bottom gl-spinner gl-spinner-orange gl-spinner-sm\\"></span></span>
<!----> <span class=\\"gl-button-text\\"><span class=\\"gl-spinner-container\\"><span aria-label=\\"Loading\\" class=\\"align-text-bottom gl-spinner gl-spinner-dark gl-spinner-sm\\"></span></span>
Add stage
</span></button>"
`;
......@@ -20,7 +20,7 @@ exports[`Value Stream Analytics LabelsSelector with no item selected will render
violets
</gl-dropdown-item-stub>
<div class=\\"text-center\\" style=\\"display: none;\\">
<gl-loading-icon-stub label=\\"Loading\\" size=\\"md\\" color=\\"orange\\" inline=\\"true\\"></gl-loading-icon-stub>
<gl-loading-icon-stub label=\\"Loading\\" size=\\"md\\" color=\\"dark\\" inline=\\"true\\"></gl-loading-icon-stub>
</div>
<div class=\\"text-secondary\\" style=\\"display: none;\\">
No matching labels
......@@ -49,7 +49,7 @@ exports[`Value Stream Analytics LabelsSelector with selectedLabelId set will ren
violets
</gl-dropdown-item-stub>
<div class=\\"text-center\\" style=\\"display: none;\\">
<gl-loading-icon-stub label=\\"Loading\\" size=\\"md\\" color=\\"orange\\" inline=\\"true\\"></gl-loading-icon-stub>
<gl-loading-icon-stub label=\\"Loading\\" size=\\"md\\" color=\\"dark\\" inline=\\"true\\"></gl-loading-icon-stub>
</div>
<div class=\\"text-secondary\\" style=\\"display: none;\\">
No matching labels
......
......@@ -96,7 +96,7 @@ exports[`MetricChart component template when isLoading is true matches the snaps
<gl-loading-icon-stub
class="my-4 py-4"
color="orange"
color="dark"
label="Loading"
size="md"
/>
......
......@@ -48,7 +48,7 @@ exports[`SubscriptionTable component when created matches the snapshot 1`] = `
<div>
<gl-loading-icon-stub
class="gl-mt-3 gl-mb-3"
color="orange"
color="dark"
label="Loading subscriptions"
size="lg"
/>
......
......@@ -25,7 +25,7 @@ module Gitlab
#
# If this value ever changes, make sure to create a migration to update
# current records, and default of `ApplicationSettings#diff_max_patch_bytes`.
DEFAULT_MAX_PATCH_BYTES = 100.kilobytes
DEFAULT_MAX_PATCH_BYTES = 200.kilobytes
# This is a limitation applied on the source (Gitaly), therefore we don't allow
# persisting limits over that.
......
......@@ -2,7 +2,7 @@
FactoryBot.define do
factory :upload do
model { create(:project) }
model { association(:project) }
size { 100.kilobytes }
uploader { "AvatarUploader" }
mount_point { :avatar }
......@@ -20,7 +20,7 @@ FactoryBot.define do
end
trait :personal_snippet_upload do
model { create(:personal_snippet) }
model { association(:personal_snippet) }
path { File.join(secret, filename) }
uploader { "PersonalFileUploader" }
secret { SecureRandom.hex }
......@@ -46,7 +46,7 @@ FactoryBot.define do
end
trait :namespace_upload do
model { create(:group) }
model { association(:group) }
path { File.join(secret, filename) }
uploader { "NamespaceFileUploader" }
secret { SecureRandom.hex }
......@@ -54,7 +54,7 @@ FactoryBot.define do
end
trait :favicon_upload do
model { create(:appearance) }
model { association(:appearance) }
uploader { "FaviconUploader" }
secret { SecureRandom.hex }
mount_point { :favicon }
......@@ -62,13 +62,13 @@ FactoryBot.define do
trait :attachment_upload do
mount_point { :attachment }
model { create(:note) }
model { association(:note) }
uploader { "AttachmentUploader" }
end
trait :design_action_image_v432x230_upload do
mount_point { :image_v432x230 }
model { create(:design_action) }
model { association(:design_action) }
uploader { ::DesignManagement::DesignV432x230Uploader.name }
end
end
......
......@@ -39,14 +39,14 @@ FactoryBot.define do
factory :wiki_page_meta, class: 'WikiPage::Meta' do
title { generate(:wiki_page_title) }
project { create(:project) }
project { association(:project) }
trait :for_wiki_page do
transient do
wiki_page { create(:wiki_page, container: project) }
wiki_page { association(:wiki_page, container: project) }
end
project { @overrides[:wiki_page]&.container || create(:project) }
project { @overrides[:wiki_page]&.container || association(:project) }
title { wiki_page.title }
initialize_with do
......@@ -58,7 +58,7 @@ FactoryBot.define do
end
factory :wiki_page_slug, class: 'WikiPage::Slug' do
wiki_page_meta { create(:wiki_page_meta) }
wiki_page_meta { association(:wiki_page_meta) }
slug { generate(:sluggified_title) }
canonical { false }
......
......@@ -8,6 +8,8 @@ RSpec.describe 'Expand and collapse diffs', :js do
before do
stub_feature_flags(increased_diff_limits: false)
allow(Gitlab::CurrentSettings).to receive(:diff_max_patch_bytes).and_return(100.kilobytes)
sign_in(create(:admin))
# Ensure that undiffable.md is in .gitattributes
......
......@@ -8,6 +8,8 @@ RSpec.describe 'User expands diff', :js do
before do
stub_feature_flags(increased_diff_limits: false)
allow(Gitlab::CurrentSettings).to receive(:diff_max_patch_bytes).and_return(100.kilobytes)
visit(diffs_project_merge_request_path(project, merge_request))
wait_for_requests
......
......@@ -44,7 +44,7 @@ exports[`Design management upload button component renders loading icon 1`] = `
<gl-loading-icon-stub
class="ml-1"
color="orange"
color="dark"
inline="true"
label="Loading"
size="sm"
......
......@@ -277,7 +277,7 @@ exports[`Design management index page designs renders loading icon 1`] = `
class="gl-mt-6"
>
<gl-loading-icon-stub
color="orange"
color="dark"
label="Loading"
size="md"
/>
......
......@@ -136,7 +136,7 @@ exports[`Design management design index page sets loading state 1`] = `
>
<gl-loading-icon-stub
class="gl-align-self-center"
color="orange"
color="dark"
label="Loading"
size="xl"
/>
......
......@@ -27,7 +27,7 @@ exports[`SidebarTodo template renders component container element with proper da
</span>
<gl-loading-icon-stub
color="orange"
color="dark"
inline="true"
label="Loading"
size="sm"
......
......@@ -114,7 +114,7 @@ exports[`WebIDE runs 1`] = `
>
<span
aria-label="Loading"
class="align-text-bottom gl-spinner gl-spinner-orange gl-spinner-md"
class="align-text-bottom gl-spinner gl-spinner-dark gl-spinner-md"
/>
</div>
</div>
......
......@@ -32,7 +32,7 @@ RSpec.describe Gitlab::GitalyClient::CommitService do
safe_max_files: 100,
safe_max_lines: 5000,
safe_max_bytes: 512000,
max_patch_bytes: 102400
max_patch_bytes: 204800
)
expect_any_instance_of(Gitaly::DiffService::Stub).to receive(:commit_diff).with(request, kind_of(Hash))
......@@ -57,7 +57,7 @@ RSpec.describe Gitlab::GitalyClient::CommitService do
safe_max_files: 100,
safe_max_lines: 5000,
safe_max_bytes: 512000,
max_patch_bytes: 102400
max_patch_bytes: 204800
)
expect_any_instance_of(Gitaly::DiffService::Stub).to receive(:commit_diff).with(request, kind_of(Hash))
......
......@@ -105,7 +105,7 @@ RSpec.describe API::Settings, 'Settings' do
enforce_terms: true,
terms: 'Hello world!',
performance_bar_allowed_group_path: group.full_path,
diff_max_patch_bytes: 150_000,
diff_max_patch_bytes: 300_000,
default_branch_protection: ::Gitlab::Access::PROTECTION_DEV_CAN_MERGE,
local_markdown_version: 3,
allow_local_requests_from_web_hooks_and_services: true,
......@@ -148,7 +148,7 @@ RSpec.describe API::Settings, 'Settings' do
expect(json_response['enforce_terms']).to be(true)
expect(json_response['terms']).to eq('Hello world!')
expect(json_response['performance_bar_allowed_group_id']).to eq(group.id)
expect(json_response['diff_max_patch_bytes']).to eq(150_000)
expect(json_response['diff_max_patch_bytes']).to eq(300_000)
expect(json_response['default_branch_protection']).to eq(Gitlab::Access::PROTECTION_DEV_CAN_MERGE)
expect(json_response['local_markdown_version']).to eq(3)
expect(json_response['allow_local_requests_from_web_hooks_and_services']).to eq(true)
......
......@@ -866,10 +866,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.174.0.tgz#954b4d908a6188a2fcc45f00f748beeb23f054b0"
integrity sha512-CgnZvO2miZkWxANhFdaK+2S4qRgkrMRE3vh3Xxwc+hIV9ki9KavlAAez9MNIs0Um/SJ1UpfmqKoM/dMyZX7K/w==
"@gitlab/ui@21.41.0":
version "21.41.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-21.41.0.tgz#185f5a534d6cd038f48588f432a25576d08c5780"
integrity sha512-Jl0OcEMQ+GKB9wTnZH9rU6YmL3rVDMHkEZc7Sa5QvNvP6A1Se/UEKbzhLi9rdyAoKpvrm3++tYg3ZJklIRZIsg==
"@gitlab/ui@21.42.0":
version "21.42.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-21.42.0.tgz#9cba612a6b0c8ee533865fa0c1e12243ced0c6e2"
integrity sha512-1q55KuGozOZ3iQPzE+GD7ChX+BCCe9eYGtaLMrFP6mjtyGDI1v9AHfYqHIqgS3+chaTKWCr8YpJ0PECPaLLM6A==
dependencies:
"@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.3.0"
......
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