Allow 0 for gitlab pages size in project and namespace settings
What does this MR do?
Addresses #199422 (closed)
0 is already properly handled by https://gitlab.com/gitlab-org/gitlab/-/blob/272d02bf8c857c4614f652807d987c6e8a0febdb/app/services/projects/update_pages_service.rb#L139
I simply made a wrong validation initially
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Merge request reports
Activity
changed milestone to %Backlog
removed [deprecated] Accepting merge requests label
added 331 commits
-
7044df7d...e2a39353 - 330 commits from branch
master
- e6ccfdba - Allow 0 for project/namespace max_pages_size as infinity
-
7044df7d...e2a39353 - 330 commits from branch
assigned to @vshushlin
@jaime since you were already involved, can you please review?
Please assign to a maintainer if it looks good to you
assigned to @jaime and unassigned @vshushlin
35 Warnings This merge request is definitely too big (more than 5945 lines changed), please split it into multiple merge requests. This merge request changed files with disabled eslint rules. Please consider fixing them. d9c303ad: The commit subject length is acceptable, but please try to reduce it to 50 characters. 791c330f: Commits that change 30 or more lines across at least 3 files must describe these changes in the commit body e65dc7e3: The commit subject length is acceptable, but please try to reduce it to 50 characters. 1b6e861a: The commit subject length is acceptable, but please try to reduce it to 50 characters. ae2235c8: The commit subject length is acceptable, but please try to reduce it to 50 characters. ae2235c8: Commits that change 30 or more lines across at least 3 files must describe these changes in the commit body 9e7a0854: The commit subject length is acceptable, but please try to reduce it to 50 characters. 6a135d60: The commit subject length is acceptable, but please try to reduce it to 50 characters. 02d1b0dc: The commit subject length is acceptable, but please try to reduce it to 50 characters. 7720e830: The commit subject length is acceptable, but please try to reduce it to 50 characters. 9994aa1c: The commit subject length is acceptable, but please try to reduce it to 50 characters. 25a623b9: The commit subject length is acceptable, but please try to reduce it to 50 characters. 61e7ce60: The commit subject length is acceptable, but please try to reduce it to 50 characters. 90c9ac7b: The commit subject length is acceptable, but please try to reduce it to 50 characters. 06ac90c0: The commit subject may not be longer than 72 characters b470ed51: The commit subject length is acceptable, but please try to reduce it to 50 characters. e6149394: The commit subject must not end with a period 0f657ee8: The commit subject length is acceptable, but please try to reduce it to 50 characters. 37c7d82c: The commit subject length is acceptable, but please try to reduce it to 50 characters. d71c000e: The commit subject must start with a capital letter ead2a33d: The commit subject must contain at least 3 words ead2a33d: The commit subject must start with a capital letter 521518a8: The commit subject may not be longer than 72 characters 521518a8: The commit subject must not end with a period 987d5970: The commit subject length is acceptable, but please try to reduce it to 50 characters. 7ff4df0c: The commit subject length is acceptable, but please try to reduce it to 50 characters. 59baa51b: The commit subject length is acceptable, but please try to reduce it to 50 characters. fbf670a0: The commit subject length is acceptable, but please try to reduce it to 50 characters. f9eb72d9: The commit subject length is acceptable, but please try to reduce it to 50 characters. bc225327: The commit subject length is acceptable, but please try to reduce it to 50 characters. 93676c82: The commit subject length is acceptable, but please try to reduce it to 50 characters. This merge request includes more than 10 commits. Please rebase these commits into a smaller number of commits or split this merge request into multiple smaller merge requests. : The merge request title length is acceptable, but please try to reduce it to 50 characters. 1 Message This merge request adds or changes files that require a review from the Database team. Disabled eslint rules
The following files have disabled
eslint
rules. Please consider fixing them:app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/profile/gl_crop.js
Run the following command for more details
node_modules/.bin/eslint --report-unused-disable-directives --no-inline-config \ 'app/assets/javascripts/boards/stores/boards_store.js' \ 'app/assets/javascripts/profile/gl_crop.js'
This merge request requires a database review. To make sure these changes are reviewed, take the following steps:
- Ensure the merge request has database and databasereview pending labels. If the merge request modifies database files, Danger will do this for you.
- Prepare your MR for database review according to the docs.
- Assign and mention the database reviewer suggested by Reviewer Roulette.
The following files require a review from the Database team:
db/migrate/20180305144721_add_privileged_to_runner.rb
db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb
db/migrate/20180529093006_ensure_remote_mirror_columns.rb
db/migrate/20180601213245_add_deploy_strategy_to_project_auto_devops.rb
db/migrate/20180831164905_add_common_to_prometheus_metrics.rb
db/migrate/20180907015926_add_legacy_abac_to_cluster_providers_gcp.rb
db/migrate/20181017001059_add_cluster_type_to_clusters.rb
db/migrate/20190218134158_add_masked_to_ci_variables.rb
db/migrate/20190218134209_add_masked_to_ci_group_variables.rb
db/migrate/20190220142344_add_email_header_and_footer_enabled_flag_to_appearances_table.rb
db/migrate/20190228192410_add_multi_line_attributes_to_suggestion.rb
db/migrate/20190322164830_add_auto_ssl_enabled_to_pages_domain.rb
db/migrate/20190325165127_add_managed_to_cluster.rb
db/migrate/20190415030217_add_variable_type_to_ci_variables.rb
db/migrate/20190416185130_add_merge_train_enabled_to_ci_cd_settings.rb
db/migrate/20190416213556_add_variable_type_to_ci_group_variables.rb
db/migrate/20190416213631_add_variable_type_to_ci_pipeline_schedule_variables.rb
db/migrate/20190426180107_add_deployment_events_to_services.rb
db/migrate/20190520200123_add_rule_type_to_approval_merge_request_approval_rules.rb
db/migrate/20190607085356_add_source_to_pages_domains.rb
db/migrate/20190628145246_add_strategies_to_operations_feature_flag_scopes.rb
db/migrate/20190709204413_add_rule_type_to_approval_project_rules.rb
db/migrate/20190712064021_add_namespace_per_environment_flag_to_clusters.rb
db/migrate/20190715173819_add_object_storage_flag_to_geo_node.rb
db/migrate/20190729180447_add_merge_requests_require_code_owner_approval_to_protected_branches.rb
db/migrate/20190816151221_add_active_jobs_limit_to_plans.rb
db/migrate/20190901174200_add_max_issue_count_to_list.rb
db/migrate/20190905140605_add_cloud_run_to_clusters_providers_gcp.rb
db/migrate/20190907184714_add_show_whitespace_in_diffs_to_user_preferences.rb
db/migrate/20190918104731_add_cleanup_status_to_cluster.rb
db/migrate/20191001170300_create_ci_ref.rb
db/migrate/20191014123159_add_expire_notification_delivered_to_personal_access_tokens.rb
db/migrate/20191023093207_add_comment_actions_to_services.rb
db/migrate/20191028130054_add_max_issue_weight_to_list.rb
db/migrate/20191029191901_add_enabled_to_grafana_integrations.rb
db/migrate/20191105155113_add_secret_to_snippet.rb
db/migrate/20191106144901_add_state_to_merge_trains.rb
db/migrate/20191111165017_add_fixed_pipeline_to_notification_settings.rb
db/migrate/20191112090226_add_artifacts_to_ci_build_need.rb
db/migrate/20191121193110_add_issue_links_type.rb
db/migrate/20191127163053_add_confidential_to_doorkeeper_application.rb
db/migrate/20191127221608_add_wildcard_and_domain_type_to_pages_domains.rb
db/migrate/20191129134844_add_broadcast_type_to_broadcast_message.rb
db/migrate/20191218124915_add_repository_storage_to_snippets.rb
db/migrate/20191218125015_add_storage_version_to_snippets.rb
db/migrate/20200122161638_add_deploy_token_type_to_deploy_tokens.rb
db/migrate/20200128184209_add_usage_to_pages_domains.rb
db/migrate/20200224163804_add_version_to_feature_flags_table.rb
db/migrate/20200226162156_rename_closed_at_to_dismissed_at_in_vulnerabilities.rb
db/migrate/20200226162634_rename_closed_by_to_dismissed_by_in_vulnerabilities.rb
db/post_migrate/20191115115043_migrate_epic_mentions_to_db.rb
db/post_migrate/20200120083607_remove_storage_version_column_from_snippets.rb
db/post_migrate/20200214173000_cleanup_empty_epic_user_mentions.rb
db/post_migrate/20200214174519_remigrate_epic_mentions_to_db.rb
db/post_migrate/20200214174607_remigrate_epic_notes_mentions_to_db.rb
db/post_migrate/20200221142216_remove_repository_storage_from_snippets.rb
db/post_migrate/20200226162239_cleanup_closed_at_rename_in_vulnerabilities.rb
db/post_migrate/20200226162723_cleanup_closed_by_rename_in_vulnerabilities.rb
db/schema.rb
ee/app/finders/packages/packages_finder.rb
ee/db/geo/migrate/20170606155045_add_needs_resync_to_project_registry.rb
ee/db/geo/migrate/20171009162208_add_file_registry_success.rb
ee/db/geo/migrate/20180323182105_add_missing_on_primary_to_file_registry.rb
ee/db/geo/migrate/20180402170913_add_missing_on_primary_to_job_artifact_registry..rb
lib/gitlab/background_migration/user_mentions/models/epic.rb
rubocop/cop/migration/add_column_with_default.rb
Commit message standards
The merge request title that will be used in the squash commit does not meet our Git commit message standards.
For more information on how to write a good commit message, take a look at How to Write a Git Commit Message.
Here is an example of a good commit message:
Reject ruby interpolation in externalized strings When using ruby interpolation in externalized strings, they can't be detected. Which means they will never be presented to be translated. To mix variables into translations we need to use `sprintf` instead. Instead of: _("Hello #{subject}") Use: _("Hello %{subject}") % { subject: 'world' }
This is an example of a bad commit message:
updated README.md
This commit message is bad because although it tells us that README.md is updated, it doesn't tell us why or how it was updated.
Reviewer roulette
Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.
To spread load more evenly across eligible reviewers, Danger has randomly picked a candidate for each review slot. Feel free to override this selection if you think someone else would be better-suited, or the chosen person is unavailable.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not (yet?) automatically notify them for you.
Category Reviewer Maintainer Engineering Productivity for CI, Danger Albert Salim ( @caalberts
)No maintainer available frontend Nicolò Maria Mezzopera ( @nmezzopera
)Mike Greiling ( @mikegreiling
)backend Corinna Wiesner ( @cwiesner
)James Fargher ( @proglottis
)database Steve Abrams ( @sabrams
)Adam Hegyi ( @ahegyi
)test Quality for spec/features/*
No reviewer available No maintainer available Generated by
DangerEdited by 🤖 GitLab Bot 🤖changed milestone to %12.9
added workflowin review label and removed workflowplanning breakdown label
thanks @vshushlin! LGTM
marked the checklist item Documentation (if required) as completed
marked the checklist item Code review guidelines as completed
marked the checklist item Merge request performance guidelines as completed
marked the checklist item Style guides as completed
marked the checklist item Database guides as completed
marked the checklist item Separation of EE specific content as completed
marked the checklist item Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. as completed
- Resolved by Vladimir Shushlin
@vshushlin Thanks, LGTM!
- Shouldn't we have a changelog entry?
- It would be awesome to have a test other than the validation tests (which always seem kind of redundant) that sets it to 0 for a project or namespace for unlimited/maximum. Maybe around https://gitlab.com/gitlab-org/gitlab/blob/master/spec/services/projects/update_pages_service_spec.rb#L195?
assigned to @vshushlin and unassigned @mkozono
assigned to @mkozono and unassigned @vshushlin
assigned to @vshushlin and unassigned @mkozono
Thanks, @mkozono!
Back to you
added 370 commits
-
e6ccfdba...681b47de - 369 commits from branch
master
- e65dc7e3 - Allow 0 for project/namespace max_pages_size as infinity
-
e6ccfdba...681b47de - 369 commits from branch
marked the checklist item Changelog entry as completed
enabled an automatic merge when the pipeline for 8ed0136a succeeds
Thanks @vshushlin!
added database databasereview pending labels
mentioned in commit 5ba40342
added workflowstaging label and removed workflowin review label
added workflowcanary label and removed workflowstaging label
added workflowproduction label and removed workflowcanary label
mentioned in merge request !28086 (merged)
mentioned in merge request !24250 (closed)