Repository: fedora-infra/bodhi

Issue:
Handle missing build tags in validate_acls
Traceback from production

```
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/paste/deploy/config.py", line 291, in __call__
    return self.app(environ, start_response)
  File "/usr/lib/python2.7/site-packages/pyramid/router.py", line 242, in __call__
    response = self.invoke_subrequest(request, use_tweens=True)
  File "/usr/lib/python2.7/site-packages/pyramid/router.py", line 217, in invoke_subrequest
    response = handle_request(request)
  File "/usr/lib/python2.7/site-packages/pyramid/tweens.py", line 46, in excview_tween
    response = view_callable(exc, request)
  File "/usr/lib/python2.7/site-packages/pyramid/config/views.py", line 385, in viewresult_to_response
    result = view(context, request)
  File "/usr/lib/python2.7/site-packages/pyramid/tweens.py", line 21, in excview_tween
    response = handler(request)
  File "/usr/lib/python2.7/site-packages/pyramid_tm/__init__.py", line 82, in tm_tween
    reraise(*exc_info)
  File "/usr/lib/python2.7/site-packages/pyramid_tm/__init__.py", line 63, in tm_tween
    response = handler(request)
  File "/usr/lib/python2.7/site-packages/pyramid/router.py", line 163, in handle_request
    response = view_callable(context, request)
  File "/usr/lib/python2.7/site-packages/pyramid/config/views.py", line 596, in __call__
    return view(context, request)
  File "/usr/lib/python2.7/site-packages/pyramid/config/views.py", line 329, in attr_view
    return view(context, request)
  File "/usr/lib/python2.7/site-packages/pyramid/config/views.py", line 305, in predicate_wrapper
    return view(context, request)
  File "/usr/lib/python2.7/site-packages/pyramid/config/views.py", line 245, in _secured_view
    return view(context, request)
  File "/usr/lib/python2.7/site-packages/pyramid/config/views.py", line 355, in rendered_view
    result = view(context, request)
  File "/usr/lib/python2.7/site-packages/pyramid/config/views.py", line 501, in _requestonly_view
    response = view(request)
  File "/usr/lib/python2.7/site-packages/cornice/service.py", line 560, in wrapper
    validator(request)
  File "/usr/lib/python2.7/site-packages/bodhi/validators.py", line 174, in validate_acls
    tags = buildinfo['tags']
KeyError: 'tags'

```



Discussion:

Resolving patch:
diff --git a/bodhi/services/builds.py b/bodhi/services/builds.py
--- a/bodhi/services/builds.py
+++ b/bodhi/services/builds.py
@@ -26,7 +26,6 @@
 from bodhi.validators import (
     validate_nvrs,
     validate_uniqueness,
-    validate_acls,
     validate_builds,
     validate_enums,
     validate_updates,
diff --git a/bodhi/services/updates.py b/bodhi/services/updates.py
--- a/bodhi/services/updates.py
+++ b/bodhi/services/updates.py
@@ -90,8 +90,12 @@ def get_update_for_editing(request):
 
 
 @update_request.post(schema=bodhi.schemas.UpdateRequestSchema,
-                     validators=(validate_enums, validate_update_id,
-                                 validate_acls),
+                     validators=(
+                         validate_enums,
+                         validate_update_id,
+                         validate_build_tags,
+                         validate_acls,
+                     ),
                      permission='edit', renderer='json')
 def set_request(request):
     """Sets a specific :class:`bodhi.models.UpdateRequest` on a given update"""
@@ -265,9 +269,14 @@ def query_updates(request):
 @updates.post(schema=bodhi.schemas.SaveUpdateSchema,
               permission='create', renderer='json',
               validators=(
-                  validate_nvrs, validate_builds,
-                  validate_uniqueness, validate_build_tags, validate_acls,
-                  validate_enums, validate_requirements))
+                  validate_nvrs,
+                  validate_builds,
+                  validate_uniqueness,
+                  validate_build_tags,
+                  validate_acls,
+                  validate_enums,
+                  validate_requirements,
+              ))
 def new_update(request):
     """ Save an update.
 


Test patch: