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

Can't rename mapping for gstreamer #598

Closed
Zlopez opened this issue Aug 29, 2018 · 6 comments
Closed

Can't rename mapping for gstreamer #598

Zlopez opened this issue Aug 29, 2018 · 6 comments
Assignees
Labels
Milestone

Comments

@Zlopez
Copy link
Contributor

Zlopez commented Aug 29, 2018

When trying to rename package mapping for gstreamer on Fedora to gstreamer1 I'm getting following error:

Aug 29 15:04:31 anitya-dev.example.com flask[6718]: Traceback (most recent call last):
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:   File "/home/vagrant/.virtualenvs/anitya/lib/python2.7/site-packages/flask/app.py", line 2309, in __call__                                                   
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:     return self.wsgi_app(environ, start_response)
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:   File "/home/vagrant/.virtualenvs/anitya/lib/python2.7/site-packages/flask/app.py", line 2295, in wsgi_app                                                   
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:     response = self.handle_exception(e)
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:   File "/home/vagrant/.virtualenvs/anitya/lib/python2.7/site-packages/flask_restful/__init__.py", line 273, in error_router                                   
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:     return original_handler(e)
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:   File "/home/vagrant/.virtualenvs/anitya/lib/python2.7/site-packages/flask/app.py", line 1741, in handle_exception                                           
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:     reraise(exc_type, exc_value, tb)
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:   File "/home/vagrant/.virtualenvs/anitya/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app                                                   
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:     response = self.full_dispatch_request()
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:   File "/home/vagrant/.virtualenvs/anitya/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request                                      
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:     rv = self.handle_user_exception(e)
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:   File "/home/vagrant/.virtualenvs/anitya/lib/python2.7/site-packages/flask_restful/__init__.py", line 273, in error_router                                   
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:     return original_handler(e)
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:   File "/home/vagrant/.virtualenvs/anitya/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception                                      
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:     reraise(exc_type, exc_value, tb)
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:   File "/home/vagrant/.virtualenvs/anitya/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request                                      
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:     rv = self.dispatch_request()
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:   File "/home/vagrant/.virtualenvs/anitya/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request                                           
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:     return self.view_functions[rule.endpoint](**req.view_args)                                                                                                
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:   File "/home/vagrant/.virtualenvs/anitya/lib/python2.7/site-packages/flask_login/utils.py", line 261, in decorated_view                                      
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:     return func(*args, **kwargs)
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:   File "/home/vagrant/devel/anitya/ui.py", line 581, in map_project                                                                                           
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:     user_id=flask.g.user.username,
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:   File "/home/vagrant/devel/anitya/lib/utilities.py", line 409, in map_project                                                                                
Aug 29 15:04:31 anitya-dev.example.com flask[6718]:     other_pkg.project.id, other_pkg.project.name)
Aug 29 15:04:31 anitya-dev.example.com flask[6718]: AttributeError: 'NoneType' object has no attribute 'id'
@Zlopez
Copy link
Contributor Author

Zlopez commented Sep 4, 2018

It looks like we have distro mapping without associated project, that is found when checking for duplicities.
The relationship between project and package is probably not set up correctly. Every package mapping for the project should be deleted with project, which isn't happened in this case.

@Zlopez Zlopez self-assigned this Sep 4, 2018
@Zlopez
Copy link
Contributor Author

Zlopez commented Sep 4, 2018

Ok I found 36 mappings that aren't associated to any project and which could cause this bug in the future.
I'm still surprised how this happened, because it should be deleted together with project. Maybe this could be something historical before ON DELETE CASCADE was added to projects table.

However I will add a check, so this wouldn't happen in the future and the conflicting package is removed if there is no association to project.

@Zlopez Zlopez added this to the 0.14.0 milestone Sep 6, 2018
@rathann
Copy link

rathann commented Nov 22, 2019

This is still happening with gstreamer. An attempt to change the mapping for Fedora to gstreamer1 package fails.

@Zlopez
Copy link
Contributor Author

Zlopez commented Nov 22, 2019

I'm not sure, what you are talking about, I added Fedora gstreamer1 mapping without issue. See https://release-monitoring.org/project/1263/

@rathann
Copy link

rathann commented Nov 22, 2019

I was trying to edit the existing gstreamer package mapping. Indeed I can see two mappings for Fedora now. Please delete the one pointing to gstreamer package, then.

@Zlopez
Copy link
Contributor Author

Zlopez commented Nov 22, 2019

Deleted, I'm not sure why it can't be renamed.

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

No branches or pull requests

2 participants