Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

3.0.0

Compare
Choose a tag to compare
@leplatrem leplatrem released this 29 Feb 16:52
· 108 commits to master since this release

Breaking changes

  • Errors are not swallowed anymore during the execution of ResourceChanged
    events subscribers.

    Subscribers are still executed within the transaction like before.

    Subscribers are still executed even if transaction is eventually rolledback.
    Every subscriber execution succeeds, or none.

    Thus, subscribers of these events should only perform operations that are reversed
    on transaction rollback: most likely database storage operations.

    For irreversible operations see the new AfterResourceChanged event.

Protocol

  • Clients are redirected to URLs without trailing slash only if the current URL
    does not exist (#656)
  • Partial responses can now be specified for nested objects (#660, Kinto/kinto#445)
    For example, /records?_fields=address.street.
  • List responses are now sorted by to last_modified descending by default (#662,
    thanks @ayusharma)

New features

  • Resource events are now merged in batch requests. One event per resource and
    per action is emitted when a transaction is committed (#634)

  • Monitor time of events listeners execution (fixes #503)

  • Add method to remove a principal from every user

  • Validate that the client can accept JSON response. (#667)

  • Validate that the client can only send JSON request body. (#667)

  • Added a new AfterResourceChanged event, that is sent only when the commit
    in database is done and successful.

    Subscribers of this event can fail, errors are swallowed and logged. The
    final transaction result (or response) cannot be altered.

    Since commit occured successfully and operations will not be rolledback,
    subcribers running irreversible actions should subscribe to this event
    (like sending messages, deleting files, or run asynchronous tasks).

  • Track execution time on StatsD for each authentication sub-policy (#639)

  • Output the cliquet version with --version (#636)

Bug fixes

  • ResourceChanged events are not emitted if a batch subrequest fails (#634)
    There are still emitted if the whole batch transaction is eventually rolledback.
  • Fix a migration of PostgreSQL schema introduced in #604 that was never executed
  • Fix PostgreSQL backend timestamps when collection is empty (ref Kinto/kinto#433)
  • Fix statsd initialization on storage (#637)
  • Providing bad last modified values on delete now returns 400 (#665)
  • Providing last modified in the past for delete now follows behaviour create/update (#665)

Internal changes

  • Moved utils.current_service(request) to reified request method (ref #631)
  • Optimized (and cleaned) usage of (un)authenticated_userid (#641)
  • Apply request extensions on forged requests (ref Kinto/kinto#438)
  • Get rid of custom Enum (fixes #645)
  • Pyramid config link updated (#654, thanks @ayusharma)
  • Add missing readonly param for read operations in PostgreSQL (#653)
  • Move Retry-After to error responses in documentation (#657)
  • Improve batch endpoint documentation about transactions (ref #629)
  • Mac OS python installation command updated (#661)
  • Added details about forced timestamps (#665)
  • Added troubleshooting section in docs (thanks @ayusharma)