-
Notifications
You must be signed in to change notification settings - Fork 421
Open
Labels
bugeasy-pickstaleFor marking issues as stale. Labeled issues will be closed soon if label is not removed.For marking issues as stale. Labeled issues will be closed soon if label is not removed.
Description
Steps to reproduce
docker run -p 8888:8888 kinto/kinto-server
Running kinto 14.0.1.dev0.
First request
POST /v1/buckets HTTP/1.1
Host: 127.0.0.1:8888
Authorization: Basic AAAA
Content-Type: application/json
Content-Length: 222
{"data": {"collection:schema": {}, "group:schema": {}, "record:schema": {}}, "permissions": {"collection:create": ["write_account"], "group:create": ["write_account"], "read": ["read_account"], "write": ["write_account"]}}
First response HTTP 201
{
"permissions": {
"read": [
"read_account"
],
"write": [
"write_account",
"account:admin"
],
"collection:create": [
"write_account"
],
"group:create": [
"write_account"
]
},
"data": {
"collection:schema": {},
"group:schema": {},
"record:schema": {},
"id": "6UULOFrV",
"last_modified": 1608558398847
}
}
Second request
PUT /v1/buckets/6UULOFrV/groups/0 HTTP/1.1
Host: 127.0.0.1:8888
User-Agent: python-requests/2.24.0
Accept-Encoding: gzip,deflate
Response-Behavior: diff
If-None-Match: "0"
Authorization: Basic AAAA
Content-Type: application/json
Content-Length: 83
{"data": {}, "permissions": {"read": ["read_account"], "write": ["write_account"]}}
Second response HTTP 201
{
"permissions": {
"read": [
"read_account"
],
"write": [
"write_account",
"account:admin"
]
},
"data": {
"members": [],
"id": "0",
"last_modified": 1608558411303
}
}
Third request
PATCH /v1/buckets/6UULOFrV/groups/0 HTTP/1.1
Host: 127.0.0.1:8888
User-Agent: python-requests/2.24.0
Accept-Encoding: gzip,deflate
Response-Behavior: diff
If-None-Match: "0"
Authorization: Basic AAAA
Content-Type: application/json
Content-Length: 83
{"data": {}, "permissions": {"read": ["read_account"], "write": ["write_account"]}}
Third response HTTP 500
{
"code": 500,
"errno": 999,
"error": "Internal Server Error",
"message": "A programmatic error occured, developers have been informed.",
"info": "https://github.com/Kinto/kinto/issues/"
}
Log
"PATCH /v1/buckets/6UULOFrV/groups/0?" ? (? ms) 'id' errno=999
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pyramid/tweens.py", line 41, in excview_tween
response = handler(request)
File "/app/kinto/core/events.py", line 159, in tween
request.registry.notify(event)
File "/usr/local/lib/python3.7/site-packages/pyramid/registry.py", line 109, in notify
[_ for _ in self.subscribers(events, None)]
File "/usr/local/lib/python3.7/site-packages/zope/interface/registry.py", line 448, in subscribers
return self.adapters.subscribers(objects, provided)
File "/usr/local/lib/python3.7/site-packages/zope/interface/adapter.py", line 619, in subscribers
subscription(*objects)
File "/usr/local/lib/python3.7/site-packages/pyramid/config/adapters.py", line 129, in subscriber_wrapper
return derived_subscriber(*arg)
File "/usr/local/lib/python3.7/site-packages/pyramid/config/adapters.py", line 101, in derived_subscriber
return subscriber(arg[0])
File "/app/kinto/views/groups.py", line 79, in on_groups_changed
group_uri = f"/buckets/{event.payload['bucket_id']}/groups/{group['id']}"
KeyError: 'id'
"PATCH /v1/buckets/6UULOFrV/groups/0?" 500 (7 ms) agent=python-requests/2.24.0 authn_type=account errno=999 time=2020-12-21T12:47:57.573000 uid=admin
Metadata
Metadata
Assignees
Labels
bugeasy-pickstaleFor marking issues as stale. Labeled issues will be closed soon if label is not removed.For marking issues as stale. Labeled issues will be closed soon if label is not removed.