You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gaps in the subscriptions API, found while preparing v0.1.0:
Subscriptions without type or value are accepted. The Subscription schema requires only repository_id, callback_url and access_token. Every notification for such a subscription then fails (KeyError in notify_subscriptions), and so every build of the repository is marked FAILED. The spec should require type and value.
Request bodies are stored as they come. Fields that the schema doesn't define are stored and returned by GET (subscriptions, and builds in register_builds); a client-supplied _id makes every insert fail with DuplicateKeyError and the request gets a 500. Only the fields of the schema should be stored.
DELETE /subscriptions/{subscription_id} leaves the identifier in the user's subscription_list and in the repository's list, so GET /subscriptions still lists it. It should be removed from both.
GET /subscriptions answers 404 when there are none, instead of an empty list.
Spec: several calls can answer 404 without declaring it (GET /repositories/{id}, GET and DELETE /subscriptions/{subscription_id}, GET /subscriptions, GET of builds and of a build). GET /repositories/{id}/builds/{build_id} doesn't check that the build belongs to repository {id}; it should answer 404 for builds of other repositories.
Activity