https://issues.rhodecode.com/https://issues.rhodecode.com/favicon.ico?16960560042021-01-12T22:55:31ZRhodeCode - issuesRhodeCode CE/EE - Bug #5651: 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)https://issues.rhodecode.com/issues/5651?journal_id=268742021-01-12T22:55:31ZYechen Qiao
<ul></ul><p>On pull request workflow: pull request has the yellow status "merging" and when attempting to open throws a 503 on web browser.</p>
RhodeCode CE/EE - Bug #5651: 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)https://issues.rhodecode.com/issues/5651?journal_id=268752021-01-12T23:00:48ZMarcin Kuzminski [CTO]marcin@rhodecode.com
<ul></ul><p>I think we for 4.23.X optimized the metadata column and it shouldn't be so big that it would not fit into the DB. But that PR should be either deleted by API, or Merged by API. The 503 error is a timeout from worker, or your HTTP server that waits too long for rendering.<br>
Alternative would be to use the <code>rccontrol ishell</code> to interact with this pr manually.</p>
RhodeCode CE/EE - Bug #5651: 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)https://issues.rhodecode.com/issues/5651?journal_id=268762021-01-12T23:01:54ZMarcin Kuzminski [CTO]marcin@rhodecode.com
<ul><li><strong>Affected Version</strong> <i>v4.22</i> added</li><li><strong>Affected Version</strong> deleted (<del><i>v4.20</i></del>)</li></ul> RhodeCode CE/EE - Bug #5651: 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)https://issues.rhodecode.com/issues/5651?journal_id=268772021-01-13T00:12:23ZYechen Qiao
<ul></ul><p>Hi,</p>
<p>Thanks for the quick response!</p>
<p>I have followed your suggestion above.</p>
<p>I can confirm this is also causing issue for the latest RhodeCode 4.23.2. I have updated it and I am still seeing the trace. I've attached the long stacktrace at the end of this message.</p>
<p>I tried to delete the PR via rccontrol. However, it seems to be failing. Maybe delete is not implemented for this object at database level?<br>
toDelete = PullRequest.get(900)<br>
PullRequest.delete(toDelete)</p>
<p>The following error happens when I hit enter.<br>
UnmappedInstanceError Traceback (most recent call last)<br>
/opt/rhodecode/store/5vmp7ipy3w2m4qii4fymlz8amzc9xd3k-python2.7-rhodecode-enterprise-ce-4.23.2/lib/python2.7/site-packages/rhodecode/lib/rc_commands/ishell.pyc in ()<br>
----> 1 PullRequest.delete(toDelete)</p>
<p>/opt/rhodecode/store/5vmp7ipy3w2m4qii4fymlz8amzc9xd3k-python2.7-rhodecode-enterprise-ce-4.23.2/lib/python2.7/site-packages/rhodecode/model/db.pyc in delete(cls, id_)<br>
293 def delete(cls, id_):<br>
294 obj = cls.query().get(id_)<br>
--> 295 Session().delete(obj)<br>
296<br>
297 @classmethod</p>
<p>/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/session.pyc in delete(self, instance)<br>
2013 except exc.NO_STATE as err:<br>
2014 util.raise_(<br>
-> 2015 exc.UnmappedInstanceError(instance), replace_context=err,<br>
2016 )<br>
2017</p>
<p>/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/util/compat.pyc in raise_(exception, with_traceback, replace_context, from_)</p>
<p>2021-01-12 18:29:21.981 [13523] ERROR [rhodecode.config.middleware] error occurred handling this request for path: /internalproducts/sapiofoundations/sapiofoundations-clientside/pull-request/900<br>
Traceback (most recent call last):<br>
File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/tweens.py", line 41, in excview_tween<br>
response = handler(request)<br>
File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/router.py", line 148, in handle_request<br>
registry, request, context, context_iface, view_name<br>
File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/view.py", line 667, in <u>call_view<br>
response = view_callable(context, request)<br>
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<br>
return view(context, request)<br>
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<br>
return view(context, request)<br>
File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/viewderivers.py", line 436, in rendered_view<br>
result = view(context, request)<br>
File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/viewderivers.py", line 132, in _class_view<br>
response = getattr(inst, attr)()<br>
File "/opt/rhodecode/store/5vmp7ipy3w2m4qii4fymlz8amzc9xd3k-python2.7-rhodecode-enterprise-ce-4.23.2/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 2507, in local_wrapper<br>
return wrapper(func, *args, **kwds)<br>
File "/opt/rhodecode/store/5vmp7ipy3w2m4qii4fymlz8amzc9xd3k-python2.7-rhodecode-enterprise-ce-4.23.2/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 1823, in __wrapper<br>
return func(*fargs, **fkwargs)<br>
File "/opt/rhodecode/store/5vmp7ipy3w2m4qii4fymlz8amzc9xd3k-python2.7-rhodecode-enterprise-ce-4.23.2/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 2507, in local_wrapper<br>
return wrapper(func, *args, **kwds)<br>
File "/opt/rhodecode/store/5vmp7ipy3w2m4qii4fymlz8amzc9xd3k-python2.7-rhodecode-enterprise-ce-4.23.2/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 1897, in __wrapper<br>
return func(*fargs, **fkwargs)<br>
File "/opt/rhodecode/store/5vmp7ipy3w2m4qii4fymlz8amzc9xd3k-python2.7-rhodecode-enterprise-ce-4.23.2/lib/python2.7/site-packages/rhodecode/apps/repository/views/repo_pull_requests.py", line 448, in pull_request_show<br>
force_shadow_repo_refresh=force_refresh)<br>
File "/opt/rhodecode/store/5vmp7ipy3w2m4qii4fymlz8amzc9xd3k-python2.7-rhodecode-enterprise-ce-4.23.2/lib/python2.7/site-packages/rhodecode/model/pull_request.py", line 2160, in validate<br>
force_shadow_repo_refresh=force_shadow_repo_refresh)<br>
File "/opt/rhodecode/store/5vmp7ipy3w2m4qii4fymlz8amzc9xd3k-python2.7-rhodecode-enterprise-ce-4.23.2/lib/python2.7/site-packages/rhodecode/model/pull_request.py", line 1687, in merge_status<br>
pull_request, force_shadow_repo_refresh=force_shadow_repo_refresh)<br>
File "/opt/rhodecode/store/5vmp7ipy3w2m4qii4fymlz8amzc9xd3k-python2.7-rhodecode-enterprise-ce-4.23.2/lib/python2.7/site-packages/rhodecode/model/pull_request.py", line 1750, in _try_merge<br>
pull_request, target_vcs, target_ref)<br>
File "/opt/rhodecode/store/5vmp7ipy3w2m4qii4fymlz8amzc9xd3k-python2.7-rhodecode-enterprise-ce-4.23.2/lib/python2.7/site-packages/rhodecode/model/pull_request.py", line 1814, in _refresh_merge_state<br>
Session().commit()<br>
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1036, in commit<br>
self.transaction.commit()<br>
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 503, in commit<br>
self._prepare_impl()<br>
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<br>
self.session.flush()<br>
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2496, in flush<br>
self._flush(objects)<br>
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2637, in _flush<br>
transaction.rollback(_capture_exception=True)<br>
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 69, in __exit</u>_<br>
exc_value, with_traceback=exc_tb,<br>
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2597, in <u>flush<br>
flush_context.execute()<br>
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute<br>
rec.execute(self)<br>
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 589, in execute<br>
uow,<br>
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<br>
update,<br>
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<br>
statement, multiparams<br>
File "/opt/rhodecode/store/d9q26gqyfrarins50zxxq1c611alijr2-python2.7-sqlalchemy-1.3.15/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 984, in execute<br>
return meth(self, multiparams, params)<br>
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<br>
return connection._execute_clauseelement(self, multiparams, params)<br>
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<br>
distilled_params,<br>
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<br>
e, statement, parameters, cursor, context<br>
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<br>
sqlalchemy_exception, with_traceback=exc_info[2], from</u>=e<br>
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<br>
cursor, statement, parameters, context<br>
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<br>
cursor.execute(statement, parameters)<br>
File "/opt/rhodecode/store/qy6y6npssdfx02kg1cg66lgazr98lx1l-python2.7-mysql-python-1.2.5/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute<br>
self.errorhandler(self, exc, value)<br>
File "/opt/rhodecode/store/qy6y6npssdfx02kg1cg66lgazr98lx1l-python2.7-mysql-python-1.2.5/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler<br>
raise errorclass, errorvalue<br>
DataError: (_mysql_exceptions.DataError) (1406, "Data too long for column 'last_merge_metadata' at row 1")</p>
RhodeCode CE/EE - Bug #5651: 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)https://issues.rhodecode.com/issues/5651?journal_id=268842021-03-08T14:34:23ZYechen Qiao
<ul></ul><p>Can confirm this is fixed at 4.24.1.</p>
<p>Delete is working.<br>
I can also delete the broken pull request directly from UI. It no longer throws exception at those diffs.</p>
RhodeCode CE/EE - Bug #5651: 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)https://issues.rhodecode.com/issues/5651?journal_id=268922021-04-30T08:53:18ZRedmine Integration
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li></ul><p>Commit <code>a708386857c8</code> by Milka Kuzminski <a href="mailto:milka@rhodecode.com">milka@rhodecode.com</a> on <code>stable</code> branch changed this issue.<br>
<a href="https://code.rhodecode.com/rhodecode-enterprise-ce/changeset/a708386857c8250525b807628ae18debe06ce7c2" class="external">https://code.rhodecode.com/rhodecode-enterprise-ce/changeset/a708386857c8250525b807628ae18debe06ce7c2</a></p>