• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla-services / cliquet
100%
master: %

Build:
Build:
LAST BUILD BRANCH: 186-215-add-sqlachemy-pooling
DEFAULT BRANCH: master
Repo Added 24 Aug 2015 01:30PM UTC
Files 0
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH refactor-backends-with-request
branch: refactor-backends-with-request
CHANGE BRANCH
x
Reset
  • refactor-backends-with-request
  • 1.4.0
  • 102-move-logger-creation
  • 186-215-add-sqlachemy-pooling
  • 2.10.0
  • 2.10.1
  • 2.10.2
  • 2.10.3
  • 2.10.x
  • 2.11.0
  • 2.12.0
  • 2.13.0
  • 2.13.1
  • 2.14.0
  • 2.15.0
  • 2.7.0
  • 2.8.0
  • 2.8.1
  • 2.8.2
  • 2.9.0
  • 297-refactor-basewebtest
  • 3.0.0
  • 3.1.0
  • 3.1.1
  • 3.1.2
  • 3.1.3
  • 3.1.4
  • 3.1.5
  • 324-cliquet-protocol-version
  • 366-fix-pagination-loop
  • 386-no-backend-by-default
  • 439-rename-baseresource-protected-resource
  • 448-settings-default-with-prefix
  • 448-settings-names
  • 449-no-cache-while-authenticated
  • 450-subrequests-logging
  • 477-patch-empty-body
  • 482-document-patch-format
  • 492-493-555-listeners-configuration
  • 501-impacted-records-events
  • 503-monitor-listeners
  • 503_message
  • 509-sqla-queue-max-backlog
  • 511-follow-redirect-batch
  • 512-import-loadtest
  • 515-static-pool-in-tests-only
  • 518-update-tombstone-instead-of-recreating
  • 528-fix-delete-collection
  • 530-put-create-with-tombstone
  • 534-sort-by-numeric
  • 538-resource-storage
  • 543-improve-permissions-documentation
  • 545-postgresql-installation-error
  • 549-fix-isolated-protected-resource
  • 556-fix-unicode-storage
  • 560-log-redis-errors
  • 588-fix-pagination-token
  • 592-fix-server-crash-on-get-if-none-match
  • 592-remove-asserts
  • 595-rename-hello-to-name
  • 609-use-subscriber-predicates
  • 617-subrequest-400-message
  • 631-reify-current-service
  • 645-switch-to-standard-enum
  • 702-fix-permissions-set
  • a-transaction-per-request
  • add-another-setting
  • add-makefile-rules
  • add-post-commits-events
  • add-pragma-no-cache-by-default
  • add-pyconfr-talk
  • add-request-bound-data
  • add-vary-authorization-header
  • add_missing_readonly
  • add_remove_all_principals
  • allow-failure-load-test
  • allow-override-405-message
  • allow-quotes-in-since
  • api-capabilities
  • auth-name-prefix
  • avoid-backward-incompability
  • build_contributors_file
  • cache-cors-headers
  • cliquet-includes-after-init
  • cliquet-version
  • colour-ouput-console
  • create_heartbeat_if_does_not_exists_yet
  • default-service-parameters
  • demo-test-event
  • deprecate-collection-attribute
  • do-not-recompute-userid-hash
  • docs-improvements
  • empty-permissions
  • enhance-if-match-error-message
  • event-per-transaction
  • events
  • events-docs
  • explicit-put-create
  • expose_statsd_client
  • filter-fields-schemaless
  • fix-behaviour-specified-timestamps
  • fix-bound-data-redirect
  • fix-build-docs-python3
  • fix-changelog
  • fix-crash-redis-permission-backend
  • fix-docs-warnings
  • fix-english-typo
  • fix-events-tests
  • fix-list-settings-error
  • fix-migration-triggers
  • fix-notifications-protected-resources
  • fix-permission-memory-backend
  • fix-permission-record-payload
  • fix-pool-size-for-batch
  • fix-postgresql-permission-empty-list
  • fix-quickstart-docs
  • fix-readonly-bug
  • fix-readonly-feature
  • fix-rst-format-utilities
  • fix-secret-setting-as-bytes
  • fix-statsd-initialization
  • fix-syncto-error
  • fix-transaction-tests
  • fix-typos-listeners
  • fix-unprefixed-keys
  • fix_logger_UnicodeDecodeError
  • force-id-last-modified-fields
  • forged-requests-custom-methods
  • generalize-index-creation-idempotence
  • greeshma-statsd-patch
  • http_api_version
  • improve-concurrency-headers
  • index-postgres-permissions
  • init-service-before-plugins
  • issue-559
  • issue_227
  • keep-last-modified
  • kinto_544-redirect-to-hello-page
  • lbhealthcheck
  • let_plugins_override_get_user_info_request_method
  • loadtest-timestamps
  • master
  • mention-oauth-heartbeat
  • nested_fields_selection
  • new-master
  • notif-multi
  • order-include-plugins
  • permission-refactor
  • pg_cast_id_type
  • plug-permission-backend-principals
  • post-if-none-match
  • prepare-2.10
  • prepare-2.10.1
  • prepare-2.10.2
  • prepare-2.10.3
  • prepare-2.11
  • prepare-2.12
  • prepare-2.13.0
  • prepare-2.13.1
  • prepare-2.14.0
  • prepare-2.15.0
  • prepare-2.7
  • prepare-2.8.0
  • prepare-2.8.2
  • prepare-2.9.0
  • prepare-3.0
  • prepare-3.1.0
  • prepare-3.1.1
  • prepare-3.1.2
  • prepare-3.1.3
  • prepare-3.1.4
  • prepare-3.1.5
  • prevent-run-twice-test-app
  • read-only-mode
  • readthedocs.io
  • redis-fix
  • refactor-redis-client-instantiation
  • release-1.3.3
  • remove-attached-objects-to-request
  • remove-broken-commit-feature
  • remove-imports-init
  • remove-permissions-from-events
  • remove-prefix-in-home
  • rename-collection-to-model
  • rename-viewset-variables
  • resource-module
  • resource-perf-gain
  • rodo-remove_drop_indexes
  • service_unavailable_update
  • should_reject_bad_content_type
  • specify-batch-412-response
  • split-client-from-inheritance
  • startup_check
  • timestamps-of-empty-collections
  • tombstone-recreation-if-none-match
  • tox_path
  • track-statsd-by-policy
  • trailing-slash-redirect-on-404
  • typos
  • ultra-json-readinglist-224
  • unstable-storage-test
  • user-id-in-hello-view
  • vary-header
  • version-v

pending completion
2320

push

travis-ci

leplatrem
Pass current request along every backends methods.

**Rationale*:

This small refactor paves the way for:

* persisting backend connections on current request (instead of pull/push from queue for each operation performed with one request, e.g batched requests)
* having one transaction per request (with a tween to connect / commit). Particularly interesting for batched requests. (see https://github.com/Kinto/kinto/issues/194)
* have one event per request, with every created/updated/deleted records of a batch

Of course, it may seem ugly to pass the request, but it is advocated [in Pyramid docs](http://pyramid.readthedocs.org/en/1.5-branch/narr/threadlocals.html#why-you-shouldn-t-abuse-thread-locals):

> get_current_request function should never be called because it’s “easier” or “more elegant” to think about calling it **than to pass a request through a series of function calls when creating some API design**. Your application should instead almost certainly pass data derived from the request around rather than relying on being able to call this function to obtain the request in places that actually have no business knowing about it.

We could pass a derived info like `request.bound_data`, but I like the fact to pass the request object.

Especially because it gives a lot of freedom in possible backend implementation (*imagine a box.com storage backend where original request headers are manipulated before being sent to third party service...*)

75 of 75 new or added lines in 13 files covered. (100.0%)

7170 of 7193 relevant lines covered (99.68%)

2.99 hits per line

Relevant lines Covered
Build:
Build:
7193 RELEVANT LINES 7170 COVERED LINES
2.99 HITS PER LINE
Source Files on refactor-backends-with-request
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
2320 refactor-backends-with-request Pass current request along every backends methods. **Rationale*: This small refactor paves the way for: * persisting backend connections on current request (instead of pull/push from queue for each operation performed with one request, e.g batc... push 20 Oct 2015 09:28AM UTC leplatrem travis-ci pending completion  
2316 refactor-backends-with-request POC push 19 Oct 2015 08:28PM UTC leplatrem travis-ci pending completion  
2313 refactor-backends-with-request POC push 19 Oct 2015 07:29PM UTC leplatrem travis-ci pending completion  
2258 refactor-backends-with-request POC push 29 Sep 2015 01:33PM UTC leplatrem travis-ci pending completion  
See All Builds (1221)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc