#4851 TypeError: '<' not supported between instances of 'User' and 'User'
Closed: Fixed 3 years ago by pingou. Opened 3 years ago by yogmk.

Symptom: When tryingt to access specific project (not all) on Pagure, user runs into 'Fatal Error(500)'.

My suspicion is that a certain user has problem. When that user is added to a project, the project no longer becomes accessible and starts to error. [History: The user while signing up complained that there was 'some error' and he was unable to complete/confirm his account. When I compared the token he got in the email with one in database (user.token), they were totally different. I sent him one from the DB and with modified URL his account was confirmed.]

apache2 error_log as well as journal entries for pagure_worker show the same error. And the error is also seen during git push to the project in trouble.

/c/DATA/pagure/MyPro (master) $ git push
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 510 bytes | 85.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: /usr/lib64/python3.8/site-packages/sqlalchemy/orm/relationships.py:1864: SAWarning: Setting backref / back_populates on relationship User.co_projects_admins to refer to viewonly relationship Project.admins will be deprecated in SQLAlchemy 1.4, and will be disallowed in a future release.  viewonly relationships should not be mutated (this warning may be suppressed after 10 occurrences)

.. repeats ..

remote:   util.warn_limited(
remote: /usr/lib64/python3.8/site-packages/sqlalchemy/orm/relationships.py:1864: SAWarning: Setting backref / back_populates on relationship Project.committer_groups to refer to viewonly relationship PagureGroup.projects_committer_groups will be deprecated in SQLAlchemy 1.4, and will be disallowed in a future release.  viewonly relationships should not be mutated (this warning may be suppressed after 10 occurrences)
remote:   util.warn_limited(
remote: Traceback (most recent call last):
remote:   File "/usr/lib/python3.8/site-packages/pagure/hooks/__init__.py", line 387, in run_project_hooks
remote:     plugin.runner.runhook(
remote:   File "/usr/lib/python3.8/site-packages/pagure/hooks/__init__.py", line 105, in runhook
remote:     cls.post_receive(
remote:   File "/usr/lib/python3.8/site-packages/pagure/hooks/default.py", line 417, in post_receive
remote:     send_notifications(
remote:   File "/usr/lib/python3.8/site-packages/pagure/hooks/default.py", line 197, in send_notifications
remote:     repo=project.to_json(public=True)
remote:   File "/usr/lib/python3.8/site-packages/pagure/lib/model.py", line 1048, in to_json
remote:     "access_users": self.access_users_json,
remote:   File "/usr/lib/python3.8/site-packages/pagure/lib/model.py", line 989, in access_users_json
remote:     for access, users in self.access_users.items():
remote:   File "/usr/lib/python3.8/site-packages/pagure/lib/model.py", line 978, in access_users
remote:     "commit": sorted(
remote: TypeError: '<' not supported between instances of 'User' and 'User'
remote: Sending to redis to log activity and send commit notification emails
remote: * Publishing information for 1 commits
To ssh://<host>.<domain>.com/playground/Delme.git
   91f76bd..295f817  master -> master

pagure instance info

Information for package pagure:
-------------------------------
Repository     : openSUSE-Tumbleweed-Oss
Name           : pagure
Version        : 5.9.1-1.1
Arch           : noarch
Vendor         : openSUSE
Installed Size : 16.6 MiB
Installed      : Yes
Status         : up-to-date
Source package : pagure-5.9.1-1.1.src
Summary        : A git-centered forge
Description    :
    Pagure is a git-centered forge based on pygit2.

python -V Python 3.8.2

Q. If I want to delete the user completely I'd remove his reference from gitolite.conf, pagure.user table, anything more which is not obvious?


So far you're basically running into all the issues I have ran into with the first actual deployment of pagure on python 3. So that issue is solved in https://pagure.io/pagure/pull-request/4826 :)

So will that make it into 5.10 release? or will there be a minor-version update release?
And any idea about typically how long does it take for openSUSE packages to reflect the newer releases?

So will that make it into 5.10 release? or will there be a minor-version update release?

This will make it into the upcoming release, yes.

And any idea about typically how long does it take for openSUSE packages to reflect the newer releases?

openSUSE tends to get the new version submitted to Factory within a day of the release, usually within a few hours. When it lands is more or less up to the Factory maintainers.

@yogmk Pagure 5.10 release has been submitted to openSUSE:

I'm going to close this ticket as Fixed.

Feel free to reopen if you think it is not

Metadata Update from @pingou:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata