kinto 22.0.0__tar.gz → 23.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of kinto might be problematic. Click here for more details.

Files changed (394) hide show
  1. {kinto-22.0.0 → kinto-23.0.1}/.github/workflows/test.yml +2 -0
  2. {kinto-22.0.0 → kinto-23.0.1}/Makefile +58 -66
  3. {kinto-22.0.0 → kinto-23.0.1}/PKG-INFO +2 -1
  4. {kinto-22.0.0 → kinto-23.0.1}/constraints.txt +1 -1
  5. {kinto-22.0.0 → kinto-23.0.1}/docs/community.rst +1 -7
  6. {kinto-22.0.0 → kinto-23.0.1}/docs/configuration/settings.rst +9 -0
  7. {kinto-22.0.0 → kinto-23.0.1}/docs/requirements.txt +1 -1
  8. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/initialization.py +3 -4
  9. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/prometheus.py +67 -28
  10. {kinto-22.0.0 → kinto-23.0.1}/kinto.egg-info/PKG-INFO +2 -1
  11. {kinto-22.0.0 → kinto-23.0.1}/kinto.egg-info/requires.txt +1 -0
  12. {kinto-22.0.0 → kinto-23.0.1}/pyproject.toml +1 -0
  13. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_initialization.py +3 -3
  14. {kinto-22.0.0 → kinto-23.0.1}/tests/functional.ini +7 -0
  15. {kinto-22.0.0 → kinto-23.0.1}/tests/functional.py +11 -0
  16. {kinto-22.0.0 → kinto-23.0.1}/tests/plugins/test_prometheus.py +47 -0
  17. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_metrics.py +4 -5
  18. {kinto-22.0.0 → kinto-23.0.1}/.dockerignore +0 -0
  19. {kinto-22.0.0 → kinto-23.0.1}/.github/CODE_OF_CONDUCT.md +0 -0
  20. {kinto-22.0.0 → kinto-23.0.1}/.github/CONTRIBUTING.md +0 -0
  21. {kinto-22.0.0 → kinto-23.0.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  22. {kinto-22.0.0 → kinto-23.0.1}/.github/dependabot.yml +0 -0
  23. {kinto-22.0.0 → kinto-23.0.1}/.github/release.yml +0 -0
  24. {kinto-22.0.0 → kinto-23.0.1}/.github/workflows/labels.yaml +0 -0
  25. {kinto-22.0.0 → kinto-23.0.1}/.github/workflows/publish.yml +0 -0
  26. {kinto-22.0.0 → kinto-23.0.1}/.github/workflows/scheduled.yml +0 -0
  27. {kinto-22.0.0 → kinto-23.0.1}/.gitignore +0 -0
  28. {kinto-22.0.0 → kinto-23.0.1}/.readthedocs.yaml +0 -0
  29. {kinto-22.0.0 → kinto-23.0.1}/CHANGELOG.rst +0 -0
  30. {kinto-22.0.0 → kinto-23.0.1}/CONTRIBUTORS.rst +0 -0
  31. {kinto-22.0.0 → kinto-23.0.1}/Dockerfile +0 -0
  32. {kinto-22.0.0 → kinto-23.0.1}/LICENSE +0 -0
  33. {kinto-22.0.0 → kinto-23.0.1}/README.rst +0 -0
  34. {kinto-22.0.0 → kinto-23.0.1}/SECURITY.md +0 -0
  35. {kinto-22.0.0 → kinto-23.0.1}/SUPPORT.md +0 -0
  36. {kinto-22.0.0 → kinto-23.0.1}/app.wsgi +0 -0
  37. {kinto-22.0.0 → kinto-23.0.1}/constraints.in +0 -0
  38. {kinto-22.0.0 → kinto-23.0.1}/docker-compose.yml +0 -0
  39. {kinto-22.0.0 → kinto-23.0.1}/docs/_static/piwik.js +0 -0
  40. {kinto-22.0.0 → kinto-23.0.1}/docs/_static/theme_overrides.css +0 -0
  41. {kinto-22.0.0 → kinto-23.0.1}/docs/_templates/footer.html +0 -0
  42. {kinto-22.0.0 → kinto-23.0.1}/docs/_templates/indexcontent.html +0 -0
  43. {kinto-22.0.0 → kinto-23.0.1}/docs/_templates/layout.html +0 -0
  44. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_details-delete-list.rst +0 -0
  45. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_details-delete-object.rst +0 -0
  46. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_details-get-list.rst +0 -0
  47. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_details-get-object.rst +0 -0
  48. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_details-head-list.rst +0 -0
  49. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_details-patch-object.rst +0 -0
  50. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_details-post-list.rst +0 -0
  51. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_details-put-object.rst +0 -0
  52. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_status-delete-list.rst +0 -0
  53. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_status-delete-object.rst +0 -0
  54. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_status-get-list.rst +0 -0
  55. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_status-get-object.rst +0 -0
  56. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_status-patch-object.rst +0 -0
  57. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_status-post-list.rst +0 -0
  58. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/_status-put-object.rst +0 -0
  59. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/accounts.rst +0 -0
  60. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/admin.rst +0 -0
  61. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/authentication.rst +0 -0
  62. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/backoff.rst +0 -0
  63. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/batch.rst +0 -0
  64. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/buckets.rst +0 -0
  65. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/collections.rst +0 -0
  66. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/deprecation.rst +0 -0
  67. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/errors.rst +0 -0
  68. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/filtering.rst +0 -0
  69. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/flush.rst +0 -0
  70. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/groups.rst +0 -0
  71. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/history.rst +0 -0
  72. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/index.rst +0 -0
  73. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/openapi.rst +0 -0
  74. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/openid.rst +0 -0
  75. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/pagination.rst +0 -0
  76. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/permissions.rst +0 -0
  77. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/records.rst +0 -0
  78. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/selecting_fields.rst +0 -0
  79. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/sorting.rst +0 -0
  80. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/timestamps.rst +0 -0
  81. {kinto-22.0.0 → kinto-23.0.1}/docs/api/1.x/utilities.rst +0 -0
  82. {kinto-22.0.0 → kinto-23.0.1}/docs/api/index.rst +0 -0
  83. {kinto-22.0.0 → kinto-23.0.1}/docs/api/versioning.rst +0 -0
  84. {kinto-22.0.0 → kinto-23.0.1}/docs/changelog.rst +0 -0
  85. {kinto-22.0.0 → kinto-23.0.1}/docs/commandline.rst +0 -0
  86. {kinto-22.0.0 → kinto-23.0.1}/docs/concepts.rst +0 -0
  87. {kinto-22.0.0 → kinto-23.0.1}/docs/conf.py +0 -0
  88. {kinto-22.0.0 → kinto-23.0.1}/docs/configuration/good-practices.rst +0 -0
  89. {kinto-22.0.0 → kinto-23.0.1}/docs/configuration/index.rst +0 -0
  90. {kinto-22.0.0 → kinto-23.0.1}/docs/configuration/production.rst +0 -0
  91. {kinto-22.0.0 → kinto-23.0.1}/docs/core/_static/theme_overrides.css +0 -0
  92. {kinto-22.0.0 → kinto-23.0.1}/docs/core/api.rst +0 -0
  93. {kinto-22.0.0 → kinto-23.0.1}/docs/core/cache.rst +0 -0
  94. {kinto-22.0.0 → kinto-23.0.1}/docs/core/decorators.rst +0 -0
  95. {kinto-22.0.0 → kinto-23.0.1}/docs/core/errors.rst +0 -0
  96. {kinto-22.0.0 → kinto-23.0.1}/docs/core/glossary.rst +0 -0
  97. {kinto-22.0.0 → kinto-23.0.1}/docs/core/images/cliquet-base.png +0 -0
  98. {kinto-22.0.0 → kinto-23.0.1}/docs/core/images/cliquet-mozilla.png +0 -0
  99. {kinto-22.0.0 → kinto-23.0.1}/docs/core/index.rst +0 -0
  100. {kinto-22.0.0 → kinto-23.0.1}/docs/core/notifications.rst +0 -0
  101. {kinto-22.0.0 → kinto-23.0.1}/docs/core/permission.rst +0 -0
  102. {kinto-22.0.0 → kinto-23.0.1}/docs/core/quickstart.rst +0 -0
  103. {kinto-22.0.0 → kinto-23.0.1}/docs/core/rationale.rst +0 -0
  104. {kinto-22.0.0 → kinto-23.0.1}/docs/core/resource.rst +0 -0
  105. {kinto-22.0.0 → kinto-23.0.1}/docs/core/storage.rst +0 -0
  106. {kinto-22.0.0 → kinto-23.0.1}/docs/core/testing.rst +0 -0
  107. {kinto-22.0.0 → kinto-23.0.1}/docs/core/utils.rst +0 -0
  108. {kinto-22.0.0 → kinto-23.0.1}/docs/core/viewsets.rst +0 -0
  109. {kinto-22.0.0 → kinto-23.0.1}/docs/faq.rst +0 -0
  110. {kinto-22.0.0 → kinto-23.0.1}/docs/images/alwaysdata-button.svg +0 -0
  111. {kinto-22.0.0 → kinto-23.0.1}/docs/images/architecture.svg +0 -0
  112. {kinto-22.0.0 → kinto-23.0.1}/docs/images/color-formatter.png +0 -0
  113. {kinto-22.0.0 → kinto-23.0.1}/docs/images/concepts-general.png +0 -0
  114. {kinto-22.0.0 → kinto-23.0.1}/docs/images/concepts-permissions.png +0 -0
  115. {kinto-22.0.0 → kinto-23.0.1}/docs/images/heroku-button.png +0 -0
  116. {kinto-22.0.0 → kinto-23.0.1}/docs/images/kinto-logo.png +0 -0
  117. {kinto-22.0.0 → kinto-23.0.1}/docs/images/kinto-logo.svg +0 -0
  118. {kinto-22.0.0 → kinto-23.0.1}/docs/images/logo-admin.svg +0 -0
  119. {kinto-22.0.0 → kinto-23.0.1}/docs/images/logo-attachment.svg +0 -0
  120. {kinto-22.0.0 → kinto-23.0.1}/docs/images/logo-community.svg +0 -0
  121. {kinto-22.0.0 → kinto-23.0.1}/docs/images/logo-history.svg +0 -0
  122. {kinto-22.0.0 → kinto-23.0.1}/docs/images/logo-javascript.svg +0 -0
  123. {kinto-22.0.0 → kinto-23.0.1}/docs/images/logo-jsonschema.svg +0 -0
  124. {kinto-22.0.0 → kinto-23.0.1}/docs/images/logo-multiapps.svg +0 -0
  125. {kinto-22.0.0 → kinto-23.0.1}/docs/images/logo-permissions.svg +0 -0
  126. {kinto-22.0.0 → kinto-23.0.1}/docs/images/logo-python.svg +0 -0
  127. {kinto-22.0.0 → kinto-23.0.1}/docs/images/logo-selfhostable.svg +0 -0
  128. {kinto-22.0.0 → kinto-23.0.1}/docs/images/logo-synchronisation.svg +0 -0
  129. {kinto-22.0.0 → kinto-23.0.1}/docs/images/overview-deployonce-selfhost.png +0 -0
  130. {kinto-22.0.0 → kinto-23.0.1}/docs/images/overview-features.png +0 -0
  131. {kinto-22.0.0 → kinto-23.0.1}/docs/images/overview-synchronisation.png +0 -0
  132. {kinto-22.0.0 → kinto-23.0.1}/docs/images/overview-use-cases.png +0 -0
  133. {kinto-22.0.0 → kinto-23.0.1}/docs/images/scalingo-button.svg +0 -0
  134. {kinto-22.0.0 → kinto-23.0.1}/docs/images/screenshot-kinto-admin-1.png +0 -0
  135. {kinto-22.0.0 → kinto-23.0.1}/docs/images/screenshot-kinto-admin-2.png +0 -0
  136. {kinto-22.0.0 → kinto-23.0.1}/docs/images/screenshot-kinto-admin-3.png +0 -0
  137. {kinto-22.0.0 → kinto-23.0.1}/docs/images/screenshot-kinto-admin-4.png +0 -0
  138. {kinto-22.0.0 → kinto-23.0.1}/docs/images/sequence-storage.png +0 -0
  139. {kinto-22.0.0 → kinto-23.0.1}/docs/images/sync-both.svg +0 -0
  140. {kinto-22.0.0 → kinto-23.0.1}/docs/images/sync-newest.svg +0 -0
  141. {kinto-22.0.0 → kinto-23.0.1}/docs/images/sync-oldest.svg +0 -0
  142. {kinto-22.0.0 → kinto-23.0.1}/docs/index.rst +0 -0
  143. {kinto-22.0.0 → kinto-23.0.1}/docs/kinto-admin.rst +0 -0
  144. {kinto-22.0.0 → kinto-23.0.1}/docs/overview.rst +0 -0
  145. {kinto-22.0.0 → kinto-23.0.1}/docs/troubleshooting.rst +0 -0
  146. {kinto-22.0.0 → kinto-23.0.1}/docs/tutorials/custom-id-generator.rst +0 -0
  147. {kinto-22.0.0 → kinto-23.0.1}/docs/tutorials/first-steps.rst +0 -0
  148. {kinto-22.0.0 → kinto-23.0.1}/docs/tutorials/index.rst +0 -0
  149. {kinto-22.0.0 → kinto-23.0.1}/docs/tutorials/install.rst +0 -0
  150. {kinto-22.0.0 → kinto-23.0.1}/docs/tutorials/notifications-custom.rst +0 -0
  151. {kinto-22.0.0 → kinto-23.0.1}/docs/tutorials/permission-setups.rst +0 -0
  152. {kinto-22.0.0 → kinto-23.0.1}/docs/tutorials/permissions.rst +0 -0
  153. {kinto-22.0.0 → kinto-23.0.1}/docs/tutorials/synchronisation.rst +0 -0
  154. {kinto-22.0.0 → kinto-23.0.1}/docs/tutorials/write-plugin.rst +0 -0
  155. {kinto-22.0.0 → kinto-23.0.1}/kinto/__init__.py +0 -0
  156. {kinto-22.0.0 → kinto-23.0.1}/kinto/__main__.py +0 -0
  157. {kinto-22.0.0 → kinto-23.0.1}/kinto/authorization.py +0 -0
  158. {kinto-22.0.0 → kinto-23.0.1}/kinto/config/__init__.py +0 -0
  159. {kinto-22.0.0 → kinto-23.0.1}/kinto/config/kinto.tpl +0 -0
  160. {kinto-22.0.0 → kinto-23.0.1}/kinto/contribute.json +0 -0
  161. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/__init__.py +0 -0
  162. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/authentication.py +0 -0
  163. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/authorization.py +0 -0
  164. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cache/__init__.py +0 -0
  165. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cache/memcached.py +0 -0
  166. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cache/memory.py +0 -0
  167. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cache/postgresql/__init__.py +0 -0
  168. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cache/postgresql/schema.sql +0 -0
  169. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cache/testing.py +0 -0
  170. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice/__init__.py +0 -0
  171. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice/cors.py +0 -0
  172. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice/errors.py +0 -0
  173. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice/pyramidhook.py +0 -0
  174. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice/renderer.py +0 -0
  175. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice/resource.py +0 -0
  176. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice/service.py +0 -0
  177. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice/util.py +0 -0
  178. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice/validators/__init__.py +0 -0
  179. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice/validators/_colander.py +0 -0
  180. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice/validators/_marshmallow.py +0 -0
  181. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice_swagger/__init__.py +0 -0
  182. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice_swagger/converters/__init__.py +0 -0
  183. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice_swagger/converters/exceptions.py +0 -0
  184. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice_swagger/converters/parameters.py +0 -0
  185. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice_swagger/converters/schema.py +0 -0
  186. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice_swagger/swagger.py +0 -0
  187. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice_swagger/templates/index.html +0 -0
  188. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice_swagger/templates/index_script_template.html +0 -0
  189. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice_swagger/util.py +0 -0
  190. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/cornice_swagger/views.py +0 -0
  191. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/decorators.py +0 -0
  192. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/errors.py +0 -0
  193. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/events.py +0 -0
  194. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/listeners/__init__.py +0 -0
  195. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/metrics.py +0 -0
  196. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/openapi.py +0 -0
  197. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/permission/__init__.py +0 -0
  198. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/permission/memory.py +0 -0
  199. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/permission/postgresql/__init__.py +0 -0
  200. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/permission/postgresql/migrations/migration_001_002.sql +0 -0
  201. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/permission/postgresql/schema.sql +0 -0
  202. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/permission/testing.py +0 -0
  203. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/resource/__init__.py +0 -0
  204. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/resource/model.py +0 -0
  205. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/resource/schema.py +0 -0
  206. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/resource/viewset.py +0 -0
  207. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/schema.py +0 -0
  208. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/scripts.py +0 -0
  209. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/statsd.py +0 -0
  210. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/__init__.py +0 -0
  211. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/exceptions.py +0 -0
  212. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/generators.py +0 -0
  213. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/memory.py +0 -0
  214. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/__init__.py +0 -0
  215. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/client.py +0 -0
  216. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_001_002.sql +0 -0
  217. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_002_003.sql +0 -0
  218. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_003_004.sql +0 -0
  219. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_004_005.sql +0 -0
  220. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_005_006.sql +0 -0
  221. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_006_007.sql +0 -0
  222. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_007_008.sql +0 -0
  223. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_008_009.sql +0 -0
  224. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_009_010.sql +0 -0
  225. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_010_011.sql +0 -0
  226. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_011_012.sql +0 -0
  227. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_012_013.sql +0 -0
  228. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_013_014.sql +0 -0
  229. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_014_015.sql +0 -0
  230. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_015_016.sql +0 -0
  231. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_016_017.sql +0 -0
  232. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_017_018.sql +0 -0
  233. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_018_019.sql +0 -0
  234. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_019_020.sql +0 -0
  235. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_020_021.sql +0 -0
  236. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_021_022.sql +0 -0
  237. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrations/migration_022_023.sql +0 -0
  238. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/migrator.py +0 -0
  239. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/pool.py +0 -0
  240. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/postgresql/schema.sql +0 -0
  241. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/testing.py +0 -0
  242. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/storage/utils.py +0 -0
  243. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/testing.py +0 -0
  244. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/utils.py +0 -0
  245. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/views/__init__.py +0 -0
  246. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/views/batch.py +0 -0
  247. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/views/errors.py +0 -0
  248. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/views/heartbeat.py +0 -0
  249. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/views/hello.py +0 -0
  250. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/views/openapi.py +0 -0
  251. {kinto-22.0.0 → kinto-23.0.1}/kinto/core/views/version.py +0 -0
  252. {kinto-22.0.0 → kinto-23.0.1}/kinto/events.py +0 -0
  253. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/__init__.py +0 -0
  254. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/accounts/__init__.py +0 -0
  255. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/accounts/authentication.py +0 -0
  256. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/accounts/scripts.py +0 -0
  257. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/accounts/utils.py +0 -0
  258. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/accounts/views.py +0 -0
  259. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/README.md +0 -0
  260. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/VERSION +0 -0
  261. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/__init__.py +0 -0
  262. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/build/VERSION +0 -0
  263. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/build/assets/asn1-EdZsLKOL.js +0 -0
  264. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/build/assets/clojure-BMjYHr_A.js +0 -0
  265. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/build/assets/css-BnMrqG3P.js +0 -0
  266. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/build/assets/index-Cs7JVwIg.css +0 -0
  267. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/build/assets/index-CylsivYB.js +0 -0
  268. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/build/assets/javascript-qCveANmP.js +0 -0
  269. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/build/assets/logo-VBRiKSPX.png +0 -0
  270. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/build/assets/mllike-CXdrOF99.js +0 -0
  271. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/build/assets/python-BuPzkPfP.js +0 -0
  272. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/build/assets/rpm-CTu-6PCP.js +0 -0
  273. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/build/assets/sql-D0XecflT.js +0 -0
  274. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/build/assets/ttcn-cfg-B9xdYoR4.js +0 -0
  275. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/build/index.html +0 -0
  276. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/public/help.html +0 -0
  277. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/admin/views.py +0 -0
  278. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/default_bucket/__init__.py +0 -0
  279. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/flush.py +0 -0
  280. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/history/__init__.py +0 -0
  281. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/history/listener.py +0 -0
  282. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/history/views.py +0 -0
  283. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/openid/__init__.py +0 -0
  284. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/openid/utils.py +0 -0
  285. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/openid/views.py +0 -0
  286. {kinto-22.0.0 → kinto-23.0.1}/kinto/plugins/statsd.py +0 -0
  287. {kinto-22.0.0 → kinto-23.0.1}/kinto/schema_validation.py +0 -0
  288. {kinto-22.0.0 → kinto-23.0.1}/kinto/views/__init__.py +0 -0
  289. {kinto-22.0.0 → kinto-23.0.1}/kinto/views/admin.py +0 -0
  290. {kinto-22.0.0 → kinto-23.0.1}/kinto/views/buckets.py +0 -0
  291. {kinto-22.0.0 → kinto-23.0.1}/kinto/views/collections.py +0 -0
  292. {kinto-22.0.0 → kinto-23.0.1}/kinto/views/contribute.py +0 -0
  293. {kinto-22.0.0 → kinto-23.0.1}/kinto/views/groups.py +0 -0
  294. {kinto-22.0.0 → kinto-23.0.1}/kinto/views/permissions.py +0 -0
  295. {kinto-22.0.0 → kinto-23.0.1}/kinto/views/records.py +0 -0
  296. {kinto-22.0.0 → kinto-23.0.1}/kinto.egg-info/SOURCES.txt +0 -0
  297. {kinto-22.0.0 → kinto-23.0.1}/kinto.egg-info/dependency_links.txt +0 -0
  298. {kinto-22.0.0 → kinto-23.0.1}/kinto.egg-info/entry_points.txt +0 -0
  299. {kinto-22.0.0 → kinto-23.0.1}/kinto.egg-info/top_level.txt +0 -0
  300. {kinto-22.0.0 → kinto-23.0.1}/scripts/pull-kinto-admin.sh +0 -0
  301. {kinto-22.0.0 → kinto-23.0.1}/setup.cfg +0 -0
  302. {kinto-22.0.0 → kinto-23.0.1}/tests/__init__.py +0 -0
  303. {kinto-22.0.0 → kinto-23.0.1}/tests/browser.ini +0 -0
  304. {kinto-22.0.0 → kinto-23.0.1}/tests/browser.py +0 -0
  305. {kinto-22.0.0 → kinto-23.0.1}/tests/core/__init__.py +0 -0
  306. {kinto-22.0.0 → kinto-23.0.1}/tests/core/listeners.py +0 -0
  307. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/__init__.py +0 -0
  308. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_base.py +0 -0
  309. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_cache_expires.py +0 -0
  310. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_events.py +0 -0
  311. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_filter.py +0 -0
  312. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_model.py +0 -0
  313. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_object.py +0 -0
  314. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_object_permissions.py +0 -0
  315. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_pagination.py +0 -0
  316. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_partial_response.py +0 -0
  317. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_preconditions.py +0 -0
  318. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_schema.py +0 -0
  319. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_sort.py +0 -0
  320. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_sync.py +0 -0
  321. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_views.py +0 -0
  322. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_views_cors.py +0 -0
  323. {kinto-22.0.0 → kinto-23.0.1}/tests/core/resource/test_viewset.py +0 -0
  324. {kinto-22.0.0 → kinto-23.0.1}/tests/core/schema/postgresql-permission-1.sql +0 -0
  325. {kinto-22.0.0 → kinto-23.0.1}/tests/core/schema/postgresql-storage-1.6.sql +0 -0
  326. {kinto-22.0.0 → kinto-23.0.1}/tests/core/schema/postgresql-storage-11.sql +0 -0
  327. {kinto-22.0.0 → kinto-23.0.1}/tests/core/support.py +0 -0
  328. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_authentication.py +0 -0
  329. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_authorization.py +0 -0
  330. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_cache.py +0 -0
  331. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_decorators.py +0 -0
  332. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_deprecation.py +0 -0
  333. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_errors.py +0 -0
  334. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_listeners.py +0 -0
  335. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_logging.py +0 -0
  336. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_metrics.py +0 -0
  337. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_openapi.py +0 -0
  338. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_permission.py +0 -0
  339. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_schema.py +0 -0
  340. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_scripts.py +0 -0
  341. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_storage.py +0 -0
  342. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_storage_migrations.py +0 -0
  343. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_storage_pool.py +0 -0
  344. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_utils.py +0 -0
  345. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_views_batch.py +0 -0
  346. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_views_errors.py +0 -0
  347. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_views_heartbeat.py +0 -0
  348. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_views_hello.py +0 -0
  349. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_views_openapi.py +0 -0
  350. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_views_postgresql.py +0 -0
  351. {kinto-22.0.0 → kinto-23.0.1}/tests/core/test_views_transaction.py +0 -0
  352. {kinto-22.0.0 → kinto-23.0.1}/tests/core/testapp/__init__.py +0 -0
  353. {kinto-22.0.0 → kinto-23.0.1}/tests/core/testapp/static/index.html +0 -0
  354. {kinto-22.0.0 → kinto-23.0.1}/tests/core/testapp/views.py +0 -0
  355. {kinto-22.0.0 → kinto-23.0.1}/tests/core/testplugin/__init__.py +0 -0
  356. {kinto-22.0.0 → kinto-23.0.1}/tests/openapi/__init__.py +0 -0
  357. {kinto-22.0.0 → kinto-23.0.1}/tests/openapi/support.py +0 -0
  358. {kinto-22.0.0 → kinto-23.0.1}/tests/openapi/test_plugins.py +0 -0
  359. {kinto-22.0.0 → kinto-23.0.1}/tests/openapi/test_resources.py +0 -0
  360. {kinto-22.0.0 → kinto-23.0.1}/tests/openapi/test_responses_buckets.py +0 -0
  361. {kinto-22.0.0 → kinto-23.0.1}/tests/openapi/test_responses_collections.py +0 -0
  362. {kinto-22.0.0 → kinto-23.0.1}/tests/openapi/test_responses_errors.py +0 -0
  363. {kinto-22.0.0 → kinto-23.0.1}/tests/openapi/test_responses_groups.py +0 -0
  364. {kinto-22.0.0 → kinto-23.0.1}/tests/openapi/test_responses_records.py +0 -0
  365. {kinto-22.0.0 → kinto-23.0.1}/tests/openapi/test_validation.py +0 -0
  366. {kinto-22.0.0 → kinto-23.0.1}/tests/plugins/__init__.py +0 -0
  367. {kinto-22.0.0 → kinto-23.0.1}/tests/plugins/test_accounts.py +0 -0
  368. {kinto-22.0.0 → kinto-23.0.1}/tests/plugins/test_admin.py +0 -0
  369. {kinto-22.0.0 → kinto-23.0.1}/tests/plugins/test_default_bucket.py +0 -0
  370. {kinto-22.0.0 → kinto-23.0.1}/tests/plugins/test_flush.py +0 -0
  371. {kinto-22.0.0 → kinto-23.0.1}/tests/plugins/test_history.py +0 -0
  372. {kinto-22.0.0 → kinto-23.0.1}/tests/plugins/test_openid.py +0 -0
  373. {kinto-22.0.0 → kinto-23.0.1}/tests/plugins/test_statsd.py +0 -0
  374. {kinto-22.0.0 → kinto-23.0.1}/tests/support.py +0 -0
  375. {kinto-22.0.0 → kinto-23.0.1}/tests/test_authorization.py +0 -0
  376. {kinto-22.0.0 → kinto-23.0.1}/tests/test_config.py +0 -0
  377. {kinto-22.0.0 → kinto-23.0.1}/tests/test_configuration/test.ini +0 -0
  378. {kinto-22.0.0 → kinto-23.0.1}/tests/test_init.py +0 -0
  379. {kinto-22.0.0 → kinto-23.0.1}/tests/test_main.py +0 -0
  380. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_admin.py +0 -0
  381. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_buckets.py +0 -0
  382. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_collections.py +0 -0
  383. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_collections_cache.py +0 -0
  384. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_contribute.py +0 -0
  385. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_disable_default.py +0 -0
  386. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_groups.py +0 -0
  387. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_hello.py +0 -0
  388. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_objects_permissions.py +0 -0
  389. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_permissions.py +0 -0
  390. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_records.py +0 -0
  391. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_schema_collection.py +0 -0
  392. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_schema_group.py +0 -0
  393. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_schema_record.py +0 -0
  394. {kinto-22.0.0 → kinto-23.0.1}/tests/test_views_version.py +0 -0
@@ -190,6 +190,8 @@ jobs:
190
190
  context: .
191
191
 
192
192
  - name: Run container
193
+ env:
194
+ PROMETHEUS_MULTIPROC_DIR: /tmp/metrics
193
195
  run: |
194
196
  docker run --net=host --detach --rm \
195
197
  -p 8888:8888 \
@@ -1,43 +1,30 @@
1
+ VENV ?= .venv
2
+ PYTHON := $(VENV)/bin/python3
3
+ SPHINX_BUILDDIR ?= docs/_build
4
+
1
5
  SERVER_CONFIG = config/kinto.ini
6
+ NAME := kinto
7
+ SOURCE := $(shell git config remote.origin.url | sed -e 's|git@|https://|g' | sed -e 's|github.com:|github.com/|g')
8
+ VERSION := $(shell git describe --always --tag)
9
+ COMMIT := $(shell git log --pretty=format:'%H' -n 1)
10
+
11
+ .IGNORE: clean
2
12
 
3
- SPHINX_BUILDDIR := $(shell echo $${SPHINX_BUILDDIR-docs/_build})
4
- VENV := $(shell echo $${VIRTUAL_ENV-.venv})
5
- PYTHON = $(VENV)/bin/python3
6
13
  DEV_STAMP = $(VENV)/.dev_env_installed.stamp
7
14
  DOC_STAMP = $(VENV)/.doc_env_installed.stamp
8
15
  INSTALL_STAMP = $(VENV)/.install.stamp
9
- TEMPDIR := $(shell mktemp -du)
10
-
11
- .IGNORE: clean distclean maintainer-clean
12
- .PHONY: all install tests
13
-
14
- OBJECTS = .venv .coverage
16
+ OBJECTS = .venv .coverage .pytest_cache/ .ruff_cache/ $(INSTALL_STAMP) $(DEV_STAMP) $(DOC_STAMP)
17
+ .DEFAULT_GOAL := help
15
18
 
16
19
  help:
17
- @echo "Please use 'make <target>' where <target> is one of"
18
- @echo " format reformat code"
19
- @echo " install install dependencies and prepare environment"
20
- @echo " install-monitoring enable monitoring features like StatsD and Newrelic"
21
- @echo " install-postgres install postgresql support"
22
- @echo " install-dev install dependencies and everything needed to run tests"
23
- @echo " pull-kinto-admin pull the Kinto admin UI plugin (requires npm)"
24
- @echo " serve start the kinto server on default port"
25
- @echo " migrate run the kinto migrations"
26
- @echo " lint run the code linters"
27
- @echo " tests run all the tests with all the supported python interpreters (same as CI)"
28
- @echo " test-deps pulls and runs docker postgres and memcached containers for tests"
29
- @echo " tdd run pytest-watch to rerun tests automatically on changes for tdd"
30
- @echo " tests-once only run the tests once with the default python interpreter"
31
- @echo " functional run functional test against a real kinto"
32
- @echo " browser-test run browser test against a real kinto"
33
- @echo " clean remove *.pyc files and __pycache__ directory"
34
- @echo " distclean remove *.egg-info files and *.egg, build and dist directories"
35
- @echo " maintainer-clean remove the .venv directory"
36
- @echo " docs build the docs"
37
- @echo "Check the Makefile to know exactly what each target is doing."
20
+ @echo "Please use 'make <target>' where <target> is one of the following commands.\n"
21
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
22
+ @echo "\nCheck the Makefile to know exactly what each target is doing."
38
23
 
24
+ .PHONY: all
39
25
  all: install
40
- install: $(INSTALL_STAMP)
26
+
27
+ install: $(INSTALL_STAMP) ## install dependencies and prepare environment
41
28
  $(INSTALL_STAMP): $(PYTHON) constraints.txt pyproject.toml
42
29
  $(VENV)/bin/pip install -U pip
43
30
  $(VENV)/bin/pip install -Ue . -c constraints.txt
@@ -46,21 +33,21 @@ $(INSTALL_STAMP): $(PYTHON) constraints.txt pyproject.toml
46
33
  $(PYTHON):
47
34
  python3 -m venv $(VENV)
48
35
 
49
- install-monitoring: $(INSTALL_STAMP) $(DEV_STAMP)
36
+ install-monitoring: $(INSTALL_STAMP) $(DEV_STAMP) ## enable monitoring features like Prometheus and Newrelic
50
37
  $(VENV)/bin/pip install -Ue ".[monitoring]" -c constraints.txt
51
38
 
52
- install-postgres: $(INSTALL_STAMP) $(DEV_STAMP)
39
+ install-postgres: $(INSTALL_STAMP) $(DEV_STAMP) ## install postgresql support
53
40
  $(VENV)/bin/pip install -Ue ".[postgresql]" -c constraints.txt
54
41
 
55
- install-memcached: $(INSTALL_STAMP) $(DEV_STAMP)
42
+ install-memcached: $(INSTALL_STAMP) $(DEV_STAMP) ## install memcached support
56
43
  $(VENV)/bin/pip install -Ue ".[memcached]" -c constraints.txt
57
44
 
58
- install-dev: $(INSTALL_STAMP) $(DEV_STAMP)
45
+ install-dev: $(INSTALL_STAMP) $(DEV_STAMP) ## install dependencies and everything needed to run tests
59
46
  $(DEV_STAMP): $(PYTHON) constraints.txt
60
- $(VENV)/bin/pip install -Ue ".[dev,test]" -c constraints.txt
47
+ $(VENV)/bin/pip install -Ue ".[dev,test,monitoring,postgresql,memcached]" -c constraints.txt
61
48
  touch $(DEV_STAMP)
62
49
 
63
- install-docs: $(DOC_STAMP)
50
+ install-docs: $(DOC_STAMP) ## install dependencies to build the docs
64
51
  $(DOC_STAMP): $(PYTHON) docs/requirements.txt
65
52
  $(VENV)/bin/pip install -r docs/requirements.txt
66
53
  touch $(DOC_STAMP)
@@ -68,33 +55,36 @@ $(DOC_STAMP): $(PYTHON) docs/requirements.txt
68
55
  constraints.txt: constraints.in
69
56
  pip-compile -o constraints.txt constraints.in
70
57
 
71
- pull-kinto-admin:
58
+ pull-kinto-admin: kinto/plugins/admin/build ## pull the Kinto admin UI plugin
59
+ kinto/plugins/admin/build:
72
60
  scripts/pull-kinto-admin.sh
73
61
 
74
62
  $(SERVER_CONFIG):
75
63
  $(VENV)/bin/kinto init --ini $(SERVER_CONFIG)
76
64
 
77
- NAME := kinto
78
- SOURCE := $(shell git config remote.origin.url | sed -e 's|git@|https://|g' | sed -e 's|github.com:|github.com/|g')
79
- VERSION := $(shell git describe --always --tag)
80
- COMMIT := $(shell git log --pretty=format:'%H' -n 1)
81
- version-file:
65
+ version-file: version.json
66
+ version.json:
82
67
  echo '{"name":"$(NAME)","version":"$(VERSION)","source":"$(SOURCE)","commit":"$(COMMIT)"}' > version.json
83
68
 
84
- serve: install-dev $(SERVER_CONFIG) migrate version-file
69
+ .PHONY: serve
70
+ serve: install-dev $(SERVER_CONFIG) migrate version-file ## start the kinto server on default port
85
71
  $(VENV)/bin/kinto start --ini $(SERVER_CONFIG) --reload
86
72
 
73
+ .PHONY: migrate
87
74
  migrate: install $(SERVER_CONFIG)
88
75
  $(VENV)/bin/kinto migrate --ini $(SERVER_CONFIG)
89
76
 
90
- test: tests
77
+ .PHONY: test
78
+ test: tests ## run all the tests with all the supported python interpreters (same as CI)
79
+ .PHONY: test-once
91
80
  tests-once: tests
92
- tests: install-postgres install-monitoring install-memcached version-file install-dev
81
+ .PHONY: tests
82
+ tests: version-file install-dev
93
83
  $(VENV)/bin/py.test --cov-config pyproject.toml --cov-report term-missing --cov-fail-under 100 --cov kinto
94
-
84
+ .PHONY: tests-raw
95
85
  tests-raw: version-file install-dev
96
86
  $(VENV)/bin/py.test
97
-
87
+ .PHONY: test-deps
98
88
  test-deps:
99
89
  docker pull memcached
100
90
  docker pull postgres
@@ -103,53 +93,55 @@ test-deps:
103
93
  sleep 2
104
94
  PGPASSWORD=postgres psql -c "CREATE DATABASE testdb ENCODING 'UTF8' TEMPLATE template0;" -U postgres -h localhost
105
95
 
106
- lint: install-dev
96
+ .PHONY: lint
97
+ lint: install-dev ## run the code linters
107
98
  $(VENV)/bin/ruff check kinto tests docs/conf.py
108
99
  $(VENV)/bin/ruff format --check kinto tests docs/conf.py
109
100
 
110
- format: install-dev
101
+ .PHONY: format
102
+ format: install-dev ## reformat code
111
103
  $(VENV)/bin/ruff check --fix kinto tests docs/conf.py
112
104
  $(VENV)/bin/ruff format kinto tests docs/conf.py
113
105
 
114
- tdd: install-dev
106
+ .PHONY: tdd
107
+ tdd: install-dev ## run pytest-watch to rerun tests automatically on changes for tdd
115
108
  $(VENV)/bin/ptw --runner $(VENV)/bin/py.test
116
109
 
117
110
  need-kinto-running:
118
111
  @curl http://localhost:8888/v0/ 2>/dev/null 1>&2 || (echo "Run 'make runkinto' before starting tests." && exit 1)
119
112
 
120
- runkinto: install-dev
113
+ .PHONY: runkinto
114
+ runkinto: install-dev ## run a kinto server
121
115
  $(VENV)/bin/kinto migrate --ini tests/functional.ini
122
- $(VENV)/bin/kinto start --ini tests/functional.ini
116
+ PROMETHEUS_MULTIPROC_DIR=/tmp/metrics KINTO_INI=tests/functional.ini $(VENV)/bin/uwsgi --http :8888 --ini tests/functional.ini
123
117
 
124
- functional: install-dev need-kinto-running
118
+ .PHONY: functional
119
+ functional: install-dev need-kinto-running ## run functional tests against a real kinto
125
120
  $(VENV)/bin/py.test tests/functional.py
126
121
 
127
- browser-test: need-kinto-running
122
+ .PHONY: browser-test
123
+ browser-test: need-kinto-running ## run browser tests against a real kinto
128
124
  $(VENV)/bin/playwright install firefox
129
125
  $(VENV)/bin/py.test tests/browser.py
130
126
 
131
- clean:
132
- find . -name '*.pyc' -delete
127
+ clean: ## remove built files and start fresh
128
+ rm -fr $(OBJECTS)
133
129
  find . -name '__pycache__' -type d | xargs rm -fr
134
130
  rm -fr docs/_build/
131
+ rm -fr kinto/plugins/admin/build/ kinto/plugins/admin/node_modules/
135
132
  docker rm -f kinto-memcached || echo ""
136
133
  docker rm -f kinto-postgres || echo ""
137
134
 
138
- distclean: clean
139
- rm -fr *.egg *.egg-info/ dist/ build/
140
-
141
- maintainer-clean: distclean
142
- rm -fr .venv/ kinto/plugins/admin/build/ kinto/plugins/admin/node_modules/
143
-
144
- docs: install-docs
135
+ docs: install-docs ## build the docs
145
136
  $(VENV)/bin/sphinx-build -a -W -n -b html -d $(SPHINX_BUILDDIR)/doctrees docs $(SPHINX_BUILDDIR)/html
146
137
  @echo
147
138
  @echo "Build finished. The HTML pages are in $(SPHINX_BUILDDIR)/html/index.html"
148
139
 
149
140
  .PHONY: build
150
- build:
141
+ build: ## build the docker image
151
142
  docker build --build-arg="KINTO_VERSION=$(shell git describe --abbrev=0)" --pull -t kinto/kinto-server:latest .
152
143
 
153
- test-description: install-dev
144
+ .PHONY: test-description
145
+ test-description: install-dev ## test the built wheel metadata
154
146
  $(VENV)/bin/python -m build
155
147
  $(VENV)/bin/twine check dist/*.whl
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kinto
3
- Version: 22.0.0
3
+ Version: 23.0.1
4
4
  Summary: Kinto Web Service - Store, Sync, Share, and Self-Host.
5
5
  Author-email: Mozilla Services <developers@kinto-storage.org>
6
6
  License: Copyright 2012 - Mozilla Foundation
@@ -70,6 +70,7 @@ Provides-Extra: dev
70
70
  Requires-Dist: build; extra == "dev"
71
71
  Requires-Dist: ruff; extra == "dev"
72
72
  Requires-Dist: twine; extra == "dev"
73
+ Requires-Dist: uwsgi; extra == "dev"
73
74
  Dynamic: license-file
74
75
 
75
76
  Kinto
@@ -149,7 +149,7 @@ rpds-py==0.17.1
149
149
  # via
150
150
  # jsonschema
151
151
  # referencing
152
- ruff==0.11.8
152
+ ruff==0.11.9
153
153
  # via -r constraints.in
154
154
  sentry-sdk==2.8.0
155
155
  # via -r constraints.in
@@ -244,13 +244,7 @@ In another terminal, run the end-to-end tests with:
244
244
  Cleaning your environment
245
245
  -------------------------
246
246
 
247
- There are three levels of cleaning your environment:
248
-
249
- - ``make clean`` will remove ``*.pyc`` files and ``__pycache__`` directory.
250
- - ``make distclean`` will also remove ``*.egg-info`` files and ``*.egg``,
251
- ``build`` and ``dist`` directories.
252
- - ``make maintainer-clean`` will also remove the ``.venv`` directory.
253
-
247
+ - ``make clean``
254
248
 
255
249
  How to release
256
250
  ==============
@@ -519,6 +519,15 @@ Prometheus metrics can be enabled with (disabled by default):
519
519
  # Control cardinality when URL fields become labels (default: bucket_id collection_id group_id record_id)
520
520
  # kinto.metrics_matchdict_fields = bucket_id collection_id
521
521
 
522
+ # Disable default metrics that are not useful in your use-case
523
+ # kinto.disabled_metrics = request_duration_seconds
524
+ # authentication_basicauth_seconds
525
+ # backend_permission_seconds
526
+ # backend_cache_seconds
527
+
528
+ # Control duration buckets in seconds (global for all histograms)
529
+ # kinto.prometheus_histogram_buckets = 0.005 0.1 1 Inf
530
+
522
531
  Metrics can then be crawled from the ``/__metrics__`` endpoint.
523
532
 
524
533
 
@@ -2,7 +2,7 @@ Sphinx==8.2.3
2
2
  sphinx_rtd_theme==3.0.2
3
3
  docutils==0.20.1
4
4
  sphinxcontrib-httpdomain==1.8.1
5
- sphinx-github-changelog==1.4.0
5
+ sphinx-github-changelog==1.7.1
6
6
  kinto
7
7
  mock==5.2.0
8
8
  webtest==3.0.4
@@ -510,17 +510,16 @@ def setup_metrics(config):
510
510
  request_labels = [
511
511
  ("method", request.method.lower()),
512
512
  ("endpoint", endpoint),
513
- ("status", str(status)),
514
513
  ] + metrics_matchdict_labels
515
514
 
516
515
  # Count served requests.
517
- metrics_service.count("request_summary", unique=request_labels)
516
+ metrics_service.count("request_summary", unique=request_labels + [("status", str(status))])
518
517
 
519
518
  try:
520
519
  current = utils.msec_time()
521
- duration = current - request._received_at
520
+ duration = (current - request._received_at) / 1000
522
521
  metrics_service.timer(
523
- "request_duration",
522
+ "request_duration_seconds",
524
523
  value=duration,
525
524
  labels=request_labels,
526
525
  )
@@ -6,7 +6,7 @@ from time import perf_counter as time_now
6
6
 
7
7
  from pyramid.exceptions import ConfigurationError
8
8
  from pyramid.response import Response
9
- from pyramid.settings import asbool
9
+ from pyramid.settings import asbool, aslist
10
10
  from zope.interface import implementer
11
11
 
12
12
  from kinto.core import metrics
@@ -101,9 +101,17 @@ class Timer:
101
101
  return self
102
102
 
103
103
 
104
+ class NoOpHistogram: # pragma: no cover
105
+ def observe(self, value):
106
+ pass
107
+
108
+ def labels(self, *args):
109
+ return self
110
+
111
+
104
112
  @implementer(metrics.IMetricsService)
105
113
  class PrometheusService:
106
- def __init__(self, prefix=""):
114
+ def __init__(self, prefix="", disabled_metrics=[], histogram_buckets=None):
107
115
  prefix_clean = ""
108
116
  if prefix:
109
117
  # In GCP Console, the metrics are grouped by the first
@@ -112,17 +120,23 @@ class PrometheusService:
112
120
  # (eg. `remote-settings` -> `remotesettings_`, `kinto_` -> `kinto_`)
113
121
  prefix_clean = _fix_metric_name(prefix).replace("_", "") + "_"
114
122
  self.prefix = prefix_clean.lower()
123
+ self.disabled_metrics = [m.replace(self.prefix, "") for m in disabled_metrics]
124
+ self.histogram_buckets = histogram_buckets
115
125
 
116
126
  def timer(self, key, value=None, labels=[]):
117
127
  global _METRICS
118
- key = self.prefix + key
119
128
 
129
+ key = _fix_metric_name(key)
130
+ if key in self.disabled_metrics:
131
+ return Timer(histogram=NoOpHistogram())
132
+
133
+ key = self.prefix + key
120
134
  if key not in _METRICS:
121
135
  _METRICS[key] = prometheus_module.Histogram(
122
- _fix_metric_name(key),
136
+ key,
123
137
  f"Histogram of {key}",
124
- registry=get_registry(),
125
138
  labelnames=[label_name for label_name, _ in labels],
139
+ buckets=self.histogram_buckets,
126
140
  )
127
141
 
128
142
  if not isinstance(_METRICS[key], prometheus_module.Histogram):
@@ -130,7 +144,7 @@ class PrometheusService:
130
144
  f"Metric {key} already exists with different type ({_METRICS[key]})"
131
145
  )
132
146
 
133
- timer = Timer(_METRICS[key])
147
+ timer = Timer(histogram=_METRICS[key])
134
148
  timer.set_labels(labels)
135
149
 
136
150
  if value is not None:
@@ -144,14 +158,17 @@ class PrometheusService:
144
158
 
145
159
  def observe(self, key, value, labels=[]):
146
160
  global _METRICS
147
- key = self.prefix + key
148
161
 
162
+ key = _fix_metric_name(key)
163
+ if key in self.disabled_metrics:
164
+ return
165
+
166
+ key = self.prefix + key
149
167
  if key not in _METRICS:
150
168
  _METRICS[key] = prometheus_module.Summary(
151
- _fix_metric_name(key),
169
+ key,
152
170
  f"Summary of {key}",
153
171
  labelnames=[label_name for label_name, _ in labels],
154
- registry=get_registry(),
155
172
  )
156
173
 
157
174
  if not isinstance(_METRICS[key], prometheus_module.Summary):
@@ -167,10 +184,12 @@ class PrometheusService:
167
184
 
168
185
  def count(self, key, count=1, unique=None):
169
186
  global _METRICS
170
- key = self.prefix + key
171
187
 
172
- labels = []
188
+ key = _fix_metric_name(key)
189
+ if key in self.disabled_metrics:
190
+ return
173
191
 
192
+ labels = []
174
193
  if unique:
175
194
  if isinstance(unique, str):
176
195
  warnings.warn(
@@ -189,12 +208,12 @@ class PrometheusService:
189
208
  (_fix_metric_name(label_name), label_value) for label_name, label_value in unique
190
209
  ]
191
210
 
211
+ key = self.prefix + key
192
212
  if key not in _METRICS:
193
213
  _METRICS[key] = prometheus_module.Counter(
194
- _fix_metric_name(key),
214
+ key,
195
215
  f"Counter of {key}",
196
216
  labelnames=[label_name for label_name, _ in labels],
197
- registry=get_registry(),
198
217
  )
199
218
 
200
219
  if not isinstance(_METRICS[key], prometheus_module.Counter):
@@ -223,6 +242,19 @@ def _reset_multiproc_folder_content(): # pragma: no cover
223
242
  os.makedirs(PROMETHEUS_MULTIPROC_DIR, exist_ok=True)
224
243
 
225
244
 
245
+ def reset_registry():
246
+ # This is mainly useful in tests, where the plugin is included
247
+ # several times with different settings.
248
+ registry = get_registry()
249
+
250
+ for collector in _METRICS.values():
251
+ try:
252
+ registry.unregister(collector)
253
+ except KeyError: # pragma: no cover
254
+ pass
255
+ _METRICS.clear()
256
+
257
+
226
258
  def includeme(config):
227
259
  if prometheus_module is None:
228
260
  error_msg = (
@@ -235,27 +267,34 @@ def includeme(config):
235
267
  if not asbool(settings.get("prometheus_created_metrics_enabled", True)):
236
268
  prometheus_module.disable_created_metrics()
237
269
 
270
+ prefix = settings.get("prometheus_prefix", settings["project_name"])
271
+ disabled_metrics = aslist(settings.get("prometheus_disabled_metrics", ""))
272
+
273
+ # Default buckets for histogram metrics are (.005, .01, .025, .05, .075, .1, .25, .5, .75, 1.0, 2.5, 5.0, 7.5, 10.0, INF)
274
+ # we reduce it from 15 to 8 values by default here, and let the user override it if needed.
275
+ histogram_buckets_values = aslist(
276
+ settings.get(
277
+ "prometheus_histogram_buckets", "0.01 0.05 0.1 0.5 1.0 3.0 6.0 Inf"
278
+ ) # Note: Inf is added by default.
279
+ )
280
+ histogram_buckets = [float(x) for x in histogram_buckets_values]
281
+ # Note: we don't need to check for INF or list size, it's done in the prometheus_client library.
282
+
283
+ get_registry() # Initialize the registry.
284
+
285
+ metrics_impl = PrometheusService(
286
+ prefix=prefix, disabled_metrics=disabled_metrics, histogram_buckets=histogram_buckets
287
+ )
288
+
238
289
  config.add_api_capability(
239
290
  "prometheus",
240
291
  description="Prometheus metrics.",
241
292
  url="https://github.com/Kinto/kinto/",
293
+ prefix=metrics_impl.prefix,
294
+ disabled_metrics=disabled_metrics,
242
295
  )
243
296
 
244
297
  config.add_route("prometheus_metrics", "/__metrics__")
245
298
  config.add_view(metrics_view, route_name="prometheus_metrics")
246
299
 
247
- # Reinitialize the registry on initialization.
248
- # This is mainly useful in tests, where the plugin is included
249
- # several times with different settings.
250
- registry = get_registry()
251
-
252
- for collector in _METRICS.values():
253
- try:
254
- registry.unregister(collector)
255
- except KeyError: # pragma: no cover
256
- pass
257
- _METRICS.clear()
258
-
259
- prefix = settings.get("prometheus_prefix", settings["project_name"])
260
-
261
- config.registry.registerUtility(PrometheusService(prefix=prefix), metrics.IMetricsService)
300
+ config.registry.registerUtility(metrics_impl, metrics.IMetricsService)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kinto
3
- Version: 22.0.0
3
+ Version: 23.0.1
4
4
  Summary: Kinto Web Service - Store, Sync, Share, and Self-Host.
5
5
  Author-email: Mozilla Services <developers@kinto-storage.org>
6
6
  License: Copyright 2012 - Mozilla Foundation
@@ -70,6 +70,7 @@ Provides-Extra: dev
70
70
  Requires-Dist: build; extra == "dev"
71
71
  Requires-Dist: ruff; extra == "dev"
72
72
  Requires-Dist: twine; extra == "dev"
73
+ Requires-Dist: uwsgi; extra == "dev"
73
74
  Dynamic: license-file
74
75
 
75
76
  Kinto
@@ -17,6 +17,7 @@ python-rapidjson
17
17
  build
18
18
  ruff
19
19
  twine
20
+ uwsgi
20
21
 
21
22
  [memcached]
22
23
  python-memcached
@@ -92,6 +92,7 @@ dev = [
92
92
  "build",
93
93
  "ruff",
94
94
  "twine",
95
+ "uwsgi",
95
96
  ]
96
97
 
97
98
  [tool.pip-tools]
@@ -433,7 +433,7 @@ class MetricsConfigurationTest(unittest.TestCase):
433
433
  self.mocked().observe.assert_any_call(
434
434
  "request_size",
435
435
  len("{}"),
436
- labels=[("method", "get"), ("endpoint", "heartbeat"), ("status", "200")],
436
+ labels=[("method", "get"), ("endpoint", "heartbeat")],
437
437
  )
438
438
 
439
439
  def test_statsd_observe_request_duration(self):
@@ -441,9 +441,9 @@ class MetricsConfigurationTest(unittest.TestCase):
441
441
  app = webtest.TestApp(self.config.make_wsgi_app())
442
442
  app.get("/v0/__heartbeat__")
443
443
  self.mocked().timer.assert_any_call(
444
- "request_duration",
444
+ "request_duration_seconds",
445
445
  value=mock.ANY,
446
- labels=[("method", "get"), ("endpoint", "heartbeat"), ("status", "200")],
446
+ labels=[("method", "get"), ("endpoint", "heartbeat")],
447
447
  )
448
448
 
449
449
  def test_statsd_counts_unknown_urls(self):
@@ -69,3 +69,10 @@ formatter = color
69
69
 
70
70
  [formatter_color]
71
71
  class = logging_color_formatter.ColorFormatter
72
+
73
+ [uwsgi]
74
+ wsgi-file = app.wsgi
75
+ master = true
76
+ module = kinto
77
+ static-map = /attachments=/tmp/attachments
78
+ processes = 4
@@ -65,6 +65,17 @@ class FunctionalTest(unittest.TestCase):
65
65
  resp.raise_for_status()
66
66
  self.assertEqual(resp.json()["http_api_version"], HTTP_API_VERSION)
67
67
 
68
+ def test_prometheus_metrics_are_unique(self):
69
+ self.session.post(self.server_url, "{collection_url}")
70
+
71
+ resp = self.session.get(
72
+ urljoin(self.server_url, "/__metrics__"), headers={"Accept": "text/plain"}
73
+ )
74
+ resp.raise_for_status()
75
+
76
+ metrics = resp.text.splitlines()
77
+ self.assertEqual(len(metrics), len(set(metrics)))
78
+
68
79
  def test_user_default_bucket_tutorial(self):
69
80
  collection_id = "tasks-%s" % uuid.uuid4()
70
81
  collection_url = urljoin(
@@ -27,6 +27,10 @@ class PrometheusMissing(unittest.TestCase):
27
27
 
28
28
 
29
29
  class PrometheusWebTest(support.BaseWebTest, unittest.TestCase):
30
+ def setUp(self):
31
+ super().setUp()
32
+ prometheus.reset_registry()
33
+
30
34
  @classmethod
31
35
  def get_app_settings(cls, extras=None):
32
36
  settings = super().get_app_settings(extras)
@@ -174,3 +178,46 @@ class PrometheusNoCreatedTest(PrometheusWebTest):
174
178
 
175
179
  self.assertIn("TYPE kintoprod_price summary", resp.text)
176
180
  self.assertNotIn("TYPE kintoprod_price_created summary", resp.text)
181
+
182
+
183
+ @skip_if_no_prometheus
184
+ class PrometheusDisabledMetricsTest(PrometheusWebTest):
185
+ @classmethod
186
+ def get_app_settings(cls, extras=None):
187
+ settings = super().get_app_settings(extras)
188
+ settings["prometheus_disabled_metrics"] = "kintoprod_price kintoprod_key func_latency"
189
+ return settings
190
+
191
+ def test_disabled_etrics_not_in_response(self):
192
+ self.app.app.registry.metrics.observe("price", 111)
193
+ self.app.app.registry.metrics.count("key")
194
+ self.app.app.registry.metrics.observe("size", 3.14, labels=[("endpoint", "/buckets")])
195
+ decorated = self.app.app.registry.metrics.timer("func.latency")(my_func)
196
+ decorated(1, 34) # Call the function to trigger the timer and NoOpHistogram
197
+
198
+ resp = self.app.get("/__metrics__")
199
+
200
+ self.assertIn("TYPE kintoprod_size summary", resp.text)
201
+ self.assertNotIn("TYPE kintoprod_key counter", resp.text)
202
+ self.assertNotIn("TYPE kintoprod_price summary", resp.text)
203
+ self.assertNotIn("TYPE kintoprod_func_latency histogram", resp.text)
204
+
205
+
206
+ @skip_if_no_prometheus
207
+ class PrometheusCustomTest(PrometheusWebTest):
208
+ @classmethod
209
+ def get_app_settings(cls, extras=None):
210
+ settings = super().get_app_settings(extras)
211
+ settings["prometheus_histogram_buckets"] = "0.1 1 Inf"
212
+ return settings
213
+
214
+ def test_duration_metrics_only_contain_specified_buckets(self):
215
+ self.app.app.registry.metrics.timer("func")(my_func)
216
+ my_func(1, 34)
217
+
218
+ resp = self.app.get("/__metrics__")
219
+
220
+ self.assertEqual(resp.text.count("kintoprod_func_bucket"), 3)
221
+ self.assertIn('kintoprod_func_bucket{le="0.1"}', resp.text)
222
+ self.assertIn('kintoprod_func_bucket{le="1.0"}', resp.text)
223
+ self.assertIn('kintoprod_func_bucket{le="+Inf"}', resp.text)
@@ -33,22 +33,21 @@ class ViewsMetricsTest(BaseWebTest, unittest.TestCase):
33
33
  resp = self.app.get("/__metrics__")
34
34
 
35
35
  self.assertIn(
36
- 'request_size_sum{bucket_id="beers",collection_id="",endpoint="bucket-object",group_id="",method="put",record_id="",status="201"}',
36
+ 'request_size_sum{bucket_id="beers",collection_id="",endpoint="bucket-object",group_id="",method="put",record_id=""}',
37
37
  resp.text,
38
38
  )
39
39
  self.assertIn(
40
- 'request_size_sum{bucket_id="beers",collection_id="",endpoint="group-object",group_id="amateurs",method="put",record_id="",status="201"}',
40
+ 'request_size_sum{bucket_id="beers",collection_id="",endpoint="group-object",group_id="amateurs",method="put",record_id=""}',
41
41
  resp.text,
42
42
  )
43
43
  self.assertIn(
44
- 'request_summary_total{bucket_id="beers",collection_id="barley",endpoint="collection-object",group_id="",method="put",record_id="",status="201"}',
44
+ 'request_duration_seconds_sum{bucket_id="beers",collection_id="barley",endpoint="record-object",group_id="",method="put",record_id="abc"}',
45
45
  resp.text,
46
46
  )
47
47
  self.assertIn(
48
- 'request_duration_sum{bucket_id="beers",collection_id="barley",endpoint="record-object",group_id="",method="put",record_id="abc",status="201"}',
48
+ 'request_summary_total{bucket_id="beers",collection_id="barley",endpoint="collection-object",group_id="",method="put",record_id="",status="201"}',
49
49
  resp.text,
50
50
  )
51
-
52
51
  self.assertIn(
53
52
  'request_summary_total{bucket_id="",collection_id="",endpoint="bucket-plural",group_id="",method="get",record_id="",status="200"}',
54
53
  resp.text,