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

copr-frontend clean-expired-projects tracebacks #3046

Closed
FrostyX opened this issue Dec 4, 2023 · 2 comments · Fixed by #3081
Closed

copr-frontend clean-expired-projects tracebacks #3046

FrostyX opened this issue Dec 4, 2023 · 2 comments · Fixed by #3081
Assignees
Labels

Comments

@FrostyX
Copy link
Member

FrostyX commented Dec 4, 2023

We run this from cron

runuser -c '/usr/share/copr/coprs_frontend/manage.py clean-expired-projects' - copr-fe

But it tracebacks:

[root@copr-fe ~][PROD]# runuser -c '/usr/share/copr/coprs_frontend/manage.py clean-expired-projects' - copr-fe
WARNING:root:no boto3 module found
INFO:coprs:logging configuration finished
Running command: /usr/share/copr/coprs_frontend/manage.py clean-expired-projects
INFO:__main__:Running command: /usr/share/copr/coprs_frontend/manage.py clean-expired-projects
/usr/lib/python3.12/site-packages/flask_sqlalchemy/model.py:30: SAWarning: relationship 'Build.package' will copy column package.id to column build.package_id, which conflicts with relationship(s): 'Package.builds' (copies package.id to bu
ild.package_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key cons
traints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   To silence this warning, add the parameter 'overlaps="builds"' to the 'Build.package' relationship. (Backg
round on this error at: https://sqlalche.me/e/14/qzyx)
  return cls.query_class(
deleting project '@python/python3_epel7'
Traceback (most recent call last):
  File "/usr/share/copr/coprs_frontend/manage.py", line 143, in <module>
    app.cli()
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/copr/coprs_frontend/manage.py", line 109, in wrapper
    sys.exit(bool(function(*args, **kwargs)))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/copr/coprs_frontend/commands/__init__.py", line 10, in wrapper
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/share/copr/coprs_frontend/commands/clean_expired_projects.py", line 16, in clean_expired_projects
    ComplexLogic.delete_expired_projects()
  File "/usr/share/copr/coprs_frontend/coprs/logic/complex_logic.py", line 124, in delete_expired_projects
    cls.delete_copr(copr, admin_action=True)
  File "/usr/share/copr/coprs_frontend/coprs/logic/complex_logic.py", line 108, in delete_copr
    BuildsLogic.delete_build(user, build, send_delete_action=False)
  File "/usr/share/copr/coprs_frontend/coprs/logic/builds_logic.py", line 1208, in delete_build
    cls.check_build_to_delete(user, build)
  File "/usr/share/copr/coprs_frontend/coprs/logic/builds_logic.py", line 1190, in check_build_to_delete
    raise InsufficientRightsException(
coprs.exceptions.AccessRestricted: User 'orion' doesn't have permissions to delete build 155728
@github-project-automation github-project-automation bot moved this to Needs triage in CPT Kanban Dec 4, 2023
@nikromen nikromen moved this from Needs triage to In 3 months in CPT Kanban Dec 13, 2023
@nikromen nikromen added the bug label Dec 13, 2023
@nikromen nikromen moved this from In 3 months to Done in CPT Kanban Dec 19, 2023
@nikromen nikromen moved this from Done to In Progress in CPT Kanban Dec 19, 2023
@nikromen nikromen self-assigned this Dec 19, 2023
@praiskup
Copy link
Member

praiskup commented Jan 3, 2024

@praiskup
Copy link
Member

praiskup commented Jan 3, 2024

The build was started by orion, the project was created by orion, but it seems that orion is no longer part of the @python group - that's the reason for the failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants