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

Cannot edit an update that doesn't have bugs using the CLI without providing --bugs #2520

Closed
bowlofeggs opened this issue Jul 31, 2018 · 0 comments · Fixed by #2524
Closed
Labels
Client Issues with the bodhi command line interface tool Crash Issues related to an unhandled crash Critical We can't go on living in this sqalor, drop everything and fix it!

Comments

@bowlofeggs
Copy link
Contributor

While testing the second 3.9.0 beta today, I found that I was unable to edit an existing update using the CLI when --bugs was not supplied:

bodhi updates edit --staging --type bugfix FEDORA-2018-a06c4c8780                                                                                                                                                                                                                   
                                                                                                                                                                                                                                             
Warning: url and staging flags are both set. url will be ignored.
                                                                                                                                                                                                                                             
Unable to create update.  'NoneType' object is not iterable

On the server side, I found this traceback:

[Tue Jul 31 17:35:26.828765 2018] [wsgi:error] [pid 12:tid 140210130114304] [client 10.130.0.1:35288] 2018-07-31 17:35:26,828 DEBUG [bodhi.server][Dummy-4] validated = {'close_bugs': False, 'stable_karma': 1, 'csrf_token': u'c766bf3474040a2cbce8f48988fac3b9f82e90ae', 'requirements': None, 'builds': [u'python-rpdb-0.1.6-7.fc27'], 'autokarma': False, 'edited': u'python-rpdb-0.1.6-7.fc27', 'suggest': <unspecified>, 'notes': u'Test', 'request': <testing>, 'bugs': None, 'unstable_karma': -3, 'require_bugs': True, 'require_testcases': True, 'type': <bugfix>, 'severity': <unspecified>}
[Tue Jul 31 17:35:27.062162 2018] [wsgi:error] [pid 12:tid 140210130114304] [client 10.130.0.1:35288] 2018-07-31 17:35:27,062 INFO  [bodhi.server][Dummy-4] Editing update: python-rpdb-0.1.6-7.fc27
[Tue Jul 31 17:35:27.533548 2018] [wsgi:error] [pid 12:tid 140210130114304] [client 10.130.0.1:35288] 2018-07-31 17:35:27,533 INFO  [bodhi.server][Dummy-4] Sending mail to rbarlow@redhat.com: [Fedora Update] [comment] python-rpdb-0.1.6-7.fc27
[Tue Jul 31 17:35:27.533921 2018] [wsgi:error] [pid 12:tid 140210130114304] [client 10.130.0.1:35288] 2018-07-31 17:35:27,533 INFO  [bodhi.server][Dummy-4] Not sending email: No smtp_server defined
[Tue Jul 31 17:35:27.535163 2018] [wsgi:error] [pid 12:tid 140210130114304] [client 10.130.0.1:35288] 2018-07-31 17:35:27,534 ERROR [bodhi.server][Dummy-4] Failed to create update
[Tue Jul 31 17:35:27.535243 2018] [wsgi:error] [pid 12:tid 140210130114304] [client 10.130.0.1:35288] Traceback (most recent call last):
[Tue Jul 31 17:35:27.535306 2018] [wsgi:error] [pid 12:tid 140210130114304] [client 10.130.0.1:35288]   File "/usr/lib/python2.7/site-packages/bodhi/server/services/updates.py", line 504, in new_update
[Tue Jul 31 17:35:27.535367 2018] [wsgi:error] [pid 12:tid 140210130114304] [client 10.130.0.1:35288]     result, _caveats = Update.edit(request, data)
[Tue Jul 31 17:35:27.535427 2018] [wsgi:error] [pid 12:tid 140210130114304] [client 10.130.0.1:35288]   File "/usr/lib/python2.7/site-packages/bodhi/server/models.py", line 2193, in edit
[Tue Jul 31 17:35:27.535487 2018] [wsgi:error] [pid 12:tid 140210130114304] [client 10.130.0.1:35288]     new_bugs = up.update_bugs(data['bugs'], db)
[Tue Jul 31 17:35:27.535588 2018] [wsgi:error] [pid 12:tid 140210130114304] [client 10.130.0.1:35288]   File "/usr/lib/python2.7/site-packages/bodhi/server/models.py", line 2911, in update_bugs
[Tue Jul 31 17:35:27.535677 2018] [wsgi:error] [pid 12:tid 140210130114304] [client 10.130.0.1:35288]     for bug_id in bug_ids:
[Tue Jul 31 17:35:27.535744 2018] [wsgi:error] [pid 12:tid 140210130114304] [client 10.130.0.1:35288] TypeError: 'NoneType' object is not iterable

I am able to use the web UI to edit the same update without adding bugs to it.

@bowlofeggs bowlofeggs added Critical We can't go on living in this sqalor, drop everything and fix it! Client Issues with the bodhi command line interface tool Crash Issues related to an unhandled crash labels Jul 31, 2018
@bowlofeggs bowlofeggs assigned ghost Jul 31, 2018
@bowlofeggs bowlofeggs changed the title Cannot edit an update using the CLI without providing --bugs Cannot edit an update that doesn't have bugs using the CLI without providing --bugs Aug 16, 2018
bowlofeggs pushed a commit that referenced this issue Aug 22, 2018
fixes #2520

Signed-off-by: Vismay Golwala <vgolwala@redhat.com>
mergify bot pushed a commit that referenced this issue Aug 22, 2018
fixes #2520

Signed-off-by: Vismay Golwala <vgolwala@redhat.com>
(cherry picked from commit 1e1d49f)
bowlofeggs pushed a commit that referenced this issue Aug 22, 2018
fixes #2520

Signed-off-by: Vismay Golwala <vgolwala@redhat.com>
(cherry picked from commit 1e1d49f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client Issues with the bodhi command line interface tool Crash Issues related to an unhandled crash Critical We can't go on living in this sqalor, drop everything and fix it!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant