Skip to content

fix: complete the subscriptions API #93

Closed

Description

@uniqueg

Gaps in the subscriptions API, found while preparing v0.1.0:

  1. 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.
  2. 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.
  3. 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.
  4. GET /subscriptions answers 404 when there are none, instead of an empty list.
  5. 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

  1. added this to the v0.1.0 milestone on Nov 9, 2026
  2. added
    priority: medium
    status: triage
    type: bug
    workload: hours
    status: in progress
    and removed
    status: triage
    on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumstatus: in progresstype: bugworkload: hours

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions