Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New repositories from new organization do not show up #73

Open
PonteIneptique opened this issue Jun 19, 2017 · 1 comment
Open

New repositories from new organization do not show up #73

PonteIneptique opened this issue Jun 19, 2017 · 1 comment

Comments

@PonteIneptique
Copy link
Member

It is not necessary an issue with the app itself but an issue of permissions on github....
We would need to investigate

@PonteIneptique
Copy link
Member Author

[Wed Jun 21 13:03:30.718662 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822] [2017-06-21 13:03:30,718] ERROR in app: Exception on /api/hook/v2.0/user/repositories [POST]
[Wed Jun 21 13:03:30.718681 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822] Traceback (most recent call last):
[Wed Jun 21 13:03:30.718684 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/flask/app.py", line 1982, in wsgi_app
[Wed Jun 21 13:03:30.718686 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     response = self.full_dispatch_request()
[Wed Jun 21 13:03:30.718688 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/flask/app.py", line 1614, in full_dispatch_request
[Wed Jun 21 13:03:30.718690 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     rv = self.handle_user_exception(e)
[Wed Jun 21 13:03:30.718692 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/flask/app.py", line 1517, in handle_user_exception
[Wed Jun 21 13:03:30.718694 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     reraise(exc_type, exc_value, tb)
[Wed Jun 21 13:03:30.718696 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
[Wed Jun 21 13:03:30.718698 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     raise value
[Wed Jun 21 13:03:30.718700 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/flask/app.py", line 1612, in full_dispatch_request
[Wed Jun 21 13:03:30.718702 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     rv = self.dispatch_request()
[Wed Jun 21 13:03:30.718703 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/flask/app.py", line 1598, in dispatch_request
[Wed Jun 21 13:03:30.718711 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     return self.view_functions[rule.endpoint](**req.view_args)
[Wed Jun 21 13:03:30.718714 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/flask_login/utils.py", line 228, in decorated_view
[Wed Jun 21 13:03:30.718715 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     return func(*args, **kwargs)
[Wed Jun 21 13:03:30.718717 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/Hook-1.0.0-py3.5.egg/Hook/ext.py", line 267, in r_api_user_repositories
[Wed Jun 21 13:03:30.718719 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     return self.fetch_repositories(request.method)
[Wed Jun 21 13:03:30.718721 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/Hook-1.0.0-py3.5.egg/Hook/ext.py", line 856, in fetch_repositories
[Wed Jun 21 13:03:30.718723 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     current_user.remove_authorship()
[Wed Jun 21 13:03:30.718724 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/Hook-1.0.0-py3.5.egg/Hook/models.py", line 104, in remove_authorship
[Wed Jun 21 13:03:30.718726 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     db.session.commit()
[Wed Jun 21 13:03:30.718728 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/sqlalchemy/orm/scoping.py", line 157, in do
[Wed Jun 21 13:03:30.718730 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     return getattr(self.registry(), name)(*args, **kwargs)
[Wed Jun 21 13:03:30.718732 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 874, in commit
[Wed Jun 21 13:03:30.718734 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     self.transaction.commit()
[Wed Jun 21 13:03:30.718735 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 461, in commit
[Wed Jun 21 13:03:30.718737 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     self._prepare_impl()
[Wed Jun 21 13:03:30.718739 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 441, in _prepare_impl
[Wed Jun 21 13:03:30.718741 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     self.session.flush()
[Wed Jun 21 13:03:30.718742 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2139, in flush
[Wed Jun 21 13:03:30.718744 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     self._flush(objects)
[Wed Jun 21 13:03:30.718746 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2259, in _flush
[Wed Jun 21 13:03:30.718748 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     transaction.rollback(_capture_exception=True)
[Wed Jun 21 13:03:30.718749 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
[Wed Jun 21 13:03:30.718753 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     compat.reraise(exc_type, exc_value, exc_tb)
[Wed Jun 21 13:03:30.718755 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
[Wed Jun 21 13:03:30.718757 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     raise value
[Wed Jun 21 13:03:30.718759 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2223, in _flush
[Wed Jun 21 13:03:30.718761 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     flush_context.execute()
[Wed Jun 21 13:03:30.718762 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/sqlalchemy/orm/unitofwork.py", line 389, in execute
[Wed Jun 21 13:03:30.718764 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     rec.execute(self)
[Wed Jun 21 13:03:30.718766 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/sqlalchemy/orm/unitofwork.py", line 503, in execute
[Wed Jun 21 13:03:30.718768 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     self.dependency_processor.process_saves(uow, states)
[Wed Jun 21 13:03:30.718769 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/sqlalchemy/orm/dependency.py", line 1092, in process_saves
[Wed Jun 21 13:03:30.718771 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     secondary_update, secondary_delete)
[Wed Jun 21 13:03:30.718773 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]   File "/usr/local/hook/venv/lib/python3.5/site-packages/sqlalchemy/orm/dependency.py", line 1113, in _run_crud
[Wed Jun 21 13:03:30.718775 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822]     result.rowcount)
[Wed Jun 21 13:03:30.718778 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822] sqlalchemy.orm.exc.StaleDataError: DELETE statement on table 'repoownership' expected to delete 254 row(s); Only 373 were matched.
[Wed Jun 21 13:03:30.718802 2017] [wsgi:error] [pid 21629:tid 140226762385152] [remote 90.65.47.233:55822] 

PonteIneptique added a commit that referenced this issue Jun 22, 2017
- Added test in test_ui.py that would replicate the error by removing a repository that existed (3 to delete, 4 found)
- Added fix by using dyn_repositories. No strong understanding of why, would need to dive back into this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant