Project

General

Profile

Actions

Bug #5651

open

Pull requests can get stuck if the diff is too large (it was created by mistake but we can't open it to delete it)

Added by Yechen Qiao about 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
12.01.2021
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

Description

Affected Version: 4.22.0 (There is no such version in the affected version list so I picked the closest one)

It's a new year. So our copyright statement has been updated with 2021 on it. If a developer forget to merge before PR, then this causes huge amount of diffs and causes the following blowup:

2021-01-12 10:26:50.935 [23364] ERROR [rhodecode.config.middleware] error occurred handling this request for path: /internalproducts/sapiofoundations/sapiofoundations-clientside/pull-request/900
Traceback (most recent call last):
File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/tweens.py", line 41, in excview_tween
response = handler(request)
File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/router.py", line 148, in handle_request
registry, request, context, context_iface, view_name
File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/view.py", line 667, in call_view
response = view_callable(context, request)
File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/config/views.py", line 188, in attr_view
return view(context, request)
File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/config/views.py", line 214, in predicate_wrapper
return view(context, request)
File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/viewderivers.py", line 436, in rendered_view
result = view(context, request)
File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/viewderivers.py", line 132, in _class_view
response = getattr(inst, attr)()
File "/opt/rhodecode/store/cnpzq6z5xjxzxw2m3d1cfb5yhpazscn5-python2.7-rhodecode-enterprise-ce-4.22.0/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 2507, in local_wrapper
return wrapper(func, *args, **kwds)
File "/opt/rhodecode/store/cnpzq6z5xjxzxw2m3d1cfb5yhpazscn5-python2.7-rhodecode-enterprise-ce-4.22.0/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 1823, in __wrapper
return func(*fargs, **fkwargs)
File "/opt/rhodecode/store/cnpzq6z5xjxzxw2m3d1cfb5yhpazscn5-python2.7-rhodecode-enterprise-ce-4.22.0/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 2507, in local_wrapper
return wrapper(func, *args, **kwds)
File "/opt/rhodecode/store/cnpzq6z5xjxzxw2m3d1cfb5yhpazscn5-python2.7-rhodecode-enterprise-ce-4.22.0/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 1897, in __wrapper
return func(*fargs, **fkwargs)
File "/opt/rhodecode/store/cnpzq6z5xjxzxw2m3d1cfb5yhpazscn5-python2.7-rhodecode-enterprise-ce-4.22.0/lib/python2.7/site-packages/rhodecode/apps/repository/views/repo_pull_requests.py", line 442, in pull_request_show
force_shadow_repo_refresh=force_refresh)
File "/opt/rhodecode/store/cnpzq6z5xjxzxw2m3d1cfb5yhpazscn5-python2.7-rhodecode-enterprise-ce-4.22.0/lib/python2.7/site-packages/rhodecode/model/pull_request.py", line 2164, in validate
force_shadow_repo_refresh=force_shadow_repo_refresh)
File "/opt/rhodecode/store/cnpzq6z5xjxzxw2m3d1cfb5yhpazscn5-python2.7-rhodecode-enterprise-ce-4.22.0/lib/python2.7/site-packages/rhodecode/model/pull_request.py", line 1694, in merge_status
pull_request, force_shadow_repo_refresh=force_shadow_repo_refresh)
File "/opt/rhodecode/store/cnpzq6z5xjxzxw2m3d1cfb5yhpazscn5-python2.7-rhodecode-enterprise-ce-4.22.0/lib/python2.7/site-packages/rhodecode/model/pull_request.py", line 1757, in _try_merge
pull_request, target_vcs, target_ref)
File "/opt/rhodecode/store/cnpzq6z5xjxzxw2m3d1cfb5yhpazscn5-python2.7-rhodecode-enterprise-ce-4.22.0/lib/python2.7/site-packages/rhodecode/model/pull_request.py", line 1821, in _refresh_merge_state
Session().commit()
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1036, in commit
self.transaction.commit()
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 503, in commit
self._prepare_impl()
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 482, in _prepare_impl
self.session.flush()
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2496, in flush
self._flush(objects)
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2637, in _flush
transaction.rollback(_capture_exception=True)
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 69, in __exit
_
exc_value, with_traceback=exc_tb,
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2597, in flush
flush_context.execute()
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
rec.execute(self)
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 589, in execute
uow,
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 236, in save_obj
update,
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 995, in _emit_update_statements
statement, multiparams
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 984, in execute
return meth(self, multiparams, params)
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 293, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1103, in _execute_clauseelement
distilled_params,
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1288, in _execute_context
e, statement, parameters, cursor, context
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1482, in _handle_dbapi_exception
sqlalchemy_exception, with_traceback=exc_info[2], from
=e
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
cursor, statement, parameters, context
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 588, in do_execute
cursor.execute(statement, parameters)
File "/opt/rhodecode/store/qy6y6npssdfx02kg1cg66lgazr98lx1l-python2.7-mysql-python-1.2.5/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/opt/rhodecode/store/qy6y6npssdfx02kg1cg66lgazr98lx1l-python2.7-mysql-python-1.2.5/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
DataError: (_mysql_exceptions.DataError) (1406, "Data too long for column 'last_merge_metadata' at row 1")
[SQL: UPDATE pull_requests SET last_merge_org_rev=%s, last_merge_other_rev=%s, merge_status=%s, last_merge_metadata=%s WHERE pull_requests.pull_request_id = %s]
[parameters: ('35076a5bccfe3d1904b164ca7afb23cff83d3900', '20798a817a6c488286d204c6be30d6ec17b74a57', 2, '{"unresolved_files": "\n* conflict: U gwtcps_attachmentViewer/src/main/java/com/velox/gwt/client/plugins/attachmentviewertask/callbacks/AttachmentVi ... (132434 characters truncated) ... ion.java\n * conflict: U workflowbuilderCore/src/main/java/com/velox/gwt/client/plugins/workflowbuilderlite/tag/WorkflowBuilderWorkflowOption.java"}', 900L)]
(Background on this error at: http://sqlalche.me/e/9h9h)

Actions

Also available in: Atom PDF