Exception thrown when using /rebase in description of conflict-free MR
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
When opening an MR which doesn't contain merge conflicts, and using the /rebase
in the MR description, an exception is thrown.
Steps to reproduce
- Create a project
- Introduce a change, and commit into a new branch
- Create an MR from new branch into default branch
- Use
/rebase
anywhere in the Description
Example Project
https://gitlab.com/customer-issue-reproduction/zd-622067
What is the current bug behavior?
A user facing exception is thrown:
01JSHNQ4PJEF2TQNZ4FKK3V0ND
What is the expected correct behavior?
Either:
-
/rebase
is ignored or, - a user-friendly error is thrown.
Workaround
Don't use /rebase
in MR descriptions.
Relevant logs and/or screenshots
Log event
{
"correlation_id": "01JSHNQ4PJEF2TQNZ4FKK3V0ND",
"username": "niklasjanz",
"meta.caller_id": "Projects::MergeRequests::CreationsController#create",
"user_id": 7538998,
"meta.feature_category": "code_review_workflow",
"meta.user": "niklasjanz",
"meta.project": "customer-issue-reproduction/zd-622067",
"cf_ray": "934e8a2420a18fe8-IAD",
"status": 500,
"cf_ipcountry": "DE",
"exception.backtrace": [
"app/services/issuable_base_service.rb:201:in `create'",
"app/services/merge_requests/base_service.rb:149:in `create'",
"app/services/merge_requests/create_service.rb:16:in `execute'",
"app/controllers/projects/merge_requests/creations_controller.rb:38:in `create'",
"lib/gitlab/ip_address_state.rb:11:in `with'",
"ee/app/controllers/ee/application_controller.rb:45:in `set_current_ip_address'",
"app/controllers/application_controller.rb:487:in `set_current_admin'",
"lib/gitlab/session.rb:11:in `with_session'",
"app/controllers/application_controller.rb:478:in `set_session_storage'",
"lib/gitlab/i18n.rb:114:in `with_locale'",
"lib/gitlab/i18n.rb:120:in `with_user_locale'",
"app/controllers/application_controller.rb:469:in `set_locale'",
"app/controllers/application_controller.rb:462:in `set_current_context'",
"lib/gitlab/middleware/action_controller_static_context.rb:23:in `call'",
"ee/lib/omni_auth/strategies/group_saml.rb:41:in `other_phase'",
"lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call'",
"lib/gitlab/middleware/sidekiq_shard_awareness_validation.rb:20:in `block in call'",
"lib/gitlab/sidekiq_sharding/validator.rb:42:in `enabled'",
"lib/gitlab/middleware/sidekiq_shard_awareness_validation.rb:20:in `call'",
"lib/gitlab/middleware/memory_report.rb:13:in `call'",
"lib/gitlab/middleware/speedscope.rb:13:in `call'",
"lib/gitlab/database/load_balancing/rack_middleware.rb:23:in `call'",
"lib/gitlab/middleware/rails_queue_duration.rb:33:in `call'",
"lib/gitlab/etag_caching/middleware.rb:21:in `call'",
"lib/gitlab/metrics/rack_middleware.rb:16:in `block in call'",
"lib/gitlab/metrics/web_transaction.rb:46:in `run'",
"lib/gitlab/metrics/rack_middleware.rb:16:in `call'",
"lib/gitlab/middleware/go.rb:21:in `call'",
"lib/gitlab/middleware/query_analyzer.rb:11:in `block in call'",
"lib/gitlab/database/query_analyzer.rb:83:in `within'",
"lib/gitlab/middleware/query_analyzer.rb:11:in `call'",
"lib/ci/job_token/middleware.rb:11:in `call'",
"lib/gitlab/middleware/multipart.rb:173:in `call'",
"lib/gitlab/middleware/read_only/controller.rb:50:in `call'",
"lib/gitlab/middleware/read_only.rb:18:in `call'",
"lib/gitlab/middleware/unauthenticated_session_expiry.rb:18:in `call'",
"lib/gitlab/middleware/secure_headers.rb:11:in `call'",
"lib/gitlab/middleware/same_site_cookies.rb:27:in `call'",
"lib/gitlab/middleware/path_traversal_check.rb:40:in `call'",
"lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call'",
"lib/gitlab/middleware/basic_health_check.rb:25:in `call'",
"lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'",
"lib/gitlab/middleware/request_context.rb:15:in `call'",
"lib/gitlab/middleware/webhook_recursion_detection.rb:15:in `call'",
"config/initializers/fix_local_cache_middleware.rb:11:in `call'",
"lib/gitlab/middleware/compressed_json.rb:44:in `call'",
"lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in `call'",
"lib/gitlab/middleware/sidekiq_web_static.rb:20:in `call'",
"lib/gitlab/metrics/requests_rack_middleware.rb:83:in `call'",
"lib/gitlab/middleware/release_env.rb:12:in `call'"
],
"format": "html",
"method": "POST",
"shard": "default",
"meta.root_namespace": "customer-issue-reproduction",
"params": [
{
"key": "authenticity_token",
"value": "[FILTERED]"
},
{
"key": "merge_request",
"value": "{\"title\"=>\"[FILTERED]\", \"description\"=>\"[FILTERED]\", \"assignee_ids\"=>[\"0\"], \"reviewer_ids\"=>[\"0\"], \"milestone_id\"=>\"\", \"merge_after\"=>\"\", \"force_remove_source_branch\"=>\"1\", \"squash\"=>\"0\", \"lock_version\"=>\"0\", \"source_project_id\"=>\"69227657\", \"source_branch\"=>\"niklasjanz-main-patch-81781\", \"target_project_id\"=>\"69227657\", \"target_branch\"=>\"main\"}"
},
{
"value": "acf5066599cce24771381e80e828331024296ec8",
"key": "merge_request_diff_head_sha"
},
{
"key": "namespace_id",
"value": "customer-issue-reproduction"
},
{
"key": "project_id",
"value": "zd-622067"
}
],
"redis_shared_state_calls": 4,
"exception.class": "ActiveModel::UnknownAttributeError",
"controller": "Projects::MergeRequests::CreationsController",
"type": "web",
"meta.http_router_rule_action": "proxy",
"subcomponent": "production_json",
"exception.message": "unknown attribute 'rebase' for MergeRequest.",
"path": "/customer-issue-reproduction/zd-622067/-/merge_requests",
"action": "create",
"time": "2025-04-23T15:54:28.100Z",
"meta.user_id": 7538998,
"stage": "cny",
"tier": "sv"
}
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
Edited by 🤖 GitLab Bot 🤖