kinto 21.0.0__tar.gz → 21.1.0__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-21.0.0 → kinto-21.1.0}/PKG-INFO +1 -1
  2. {kinto-21.0.0 → kinto-21.1.0}/app.wsgi +2 -0
  3. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/utilities.rst +5 -0
  4. {kinto-21.0.0 → kinto-21.1.0}/docs/api/index.rst +6 -0
  5. {kinto-21.0.0 → kinto-21.1.0}/docs/configuration/settings.rst +6 -0
  6. {kinto-21.0.0 → kinto-21.1.0}/kinto/__init__.py +1 -1
  7. {kinto-21.0.0 → kinto-21.1.0}/kinto/config/__init__.py +23 -0
  8. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/views/hello.py +4 -0
  9. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/prometheus.py +26 -3
  10. {kinto-21.0.0 → kinto-21.1.0}/kinto.egg-info/PKG-INFO +1 -1
  11. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_views_hello.py +18 -0
  12. {kinto-21.0.0 → kinto-21.1.0}/tests/plugins/test_prometheus.py +46 -0
  13. {kinto-21.0.0 → kinto-21.1.0}/.dockerignore +0 -0
  14. {kinto-21.0.0 → kinto-21.1.0}/.github/CODE_OF_CONDUCT.md +0 -0
  15. {kinto-21.0.0 → kinto-21.1.0}/.github/CONTRIBUTING.md +0 -0
  16. {kinto-21.0.0 → kinto-21.1.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  17. {kinto-21.0.0 → kinto-21.1.0}/.github/dependabot.yml +0 -0
  18. {kinto-21.0.0 → kinto-21.1.0}/.github/release.yml +0 -0
  19. {kinto-21.0.0 → kinto-21.1.0}/.github/workflows/labels.yaml +0 -0
  20. {kinto-21.0.0 → kinto-21.1.0}/.github/workflows/publish.yml +0 -0
  21. {kinto-21.0.0 → kinto-21.1.0}/.github/workflows/scheduled.yml +0 -0
  22. {kinto-21.0.0 → kinto-21.1.0}/.github/workflows/test.yml +0 -0
  23. {kinto-21.0.0 → kinto-21.1.0}/.gitignore +0 -0
  24. {kinto-21.0.0 → kinto-21.1.0}/.readthedocs.yaml +0 -0
  25. {kinto-21.0.0 → kinto-21.1.0}/CHANGELOG.rst +0 -0
  26. {kinto-21.0.0 → kinto-21.1.0}/CONTRIBUTORS.rst +0 -0
  27. {kinto-21.0.0 → kinto-21.1.0}/Dockerfile +0 -0
  28. {kinto-21.0.0 → kinto-21.1.0}/LICENSE +0 -0
  29. {kinto-21.0.0 → kinto-21.1.0}/Makefile +0 -0
  30. {kinto-21.0.0 → kinto-21.1.0}/README.rst +0 -0
  31. {kinto-21.0.0 → kinto-21.1.0}/SECURITY.md +0 -0
  32. {kinto-21.0.0 → kinto-21.1.0}/SUPPORT.md +0 -0
  33. {kinto-21.0.0 → kinto-21.1.0}/constraints.in +0 -0
  34. {kinto-21.0.0 → kinto-21.1.0}/constraints.txt +0 -0
  35. {kinto-21.0.0 → kinto-21.1.0}/docker-compose.yml +0 -0
  36. {kinto-21.0.0 → kinto-21.1.0}/docs/_static/piwik.js +0 -0
  37. {kinto-21.0.0 → kinto-21.1.0}/docs/_static/theme_overrides.css +0 -0
  38. {kinto-21.0.0 → kinto-21.1.0}/docs/_templates/footer.html +0 -0
  39. {kinto-21.0.0 → kinto-21.1.0}/docs/_templates/indexcontent.html +0 -0
  40. {kinto-21.0.0 → kinto-21.1.0}/docs/_templates/layout.html +0 -0
  41. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_details-delete-list.rst +0 -0
  42. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_details-delete-object.rst +0 -0
  43. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_details-get-list.rst +0 -0
  44. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_details-get-object.rst +0 -0
  45. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_details-head-list.rst +0 -0
  46. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_details-patch-object.rst +0 -0
  47. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_details-post-list.rst +0 -0
  48. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_details-put-object.rst +0 -0
  49. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_status-delete-list.rst +0 -0
  50. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_status-delete-object.rst +0 -0
  51. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_status-get-list.rst +0 -0
  52. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_status-get-object.rst +0 -0
  53. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_status-patch-object.rst +0 -0
  54. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_status-post-list.rst +0 -0
  55. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/_status-put-object.rst +0 -0
  56. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/accounts.rst +0 -0
  57. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/admin.rst +0 -0
  58. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/authentication.rst +0 -0
  59. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/backoff.rst +0 -0
  60. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/batch.rst +0 -0
  61. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/buckets.rst +0 -0
  62. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/collections.rst +0 -0
  63. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/deprecation.rst +0 -0
  64. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/errors.rst +0 -0
  65. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/filtering.rst +0 -0
  66. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/flush.rst +0 -0
  67. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/groups.rst +0 -0
  68. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/history.rst +0 -0
  69. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/index.rst +0 -0
  70. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/openapi.rst +0 -0
  71. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/openid.rst +0 -0
  72. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/pagination.rst +0 -0
  73. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/permissions.rst +0 -0
  74. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/records.rst +0 -0
  75. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/selecting_fields.rst +0 -0
  76. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/sorting.rst +0 -0
  77. {kinto-21.0.0 → kinto-21.1.0}/docs/api/1.x/timestamps.rst +0 -0
  78. {kinto-21.0.0 → kinto-21.1.0}/docs/api/versioning.rst +0 -0
  79. {kinto-21.0.0 → kinto-21.1.0}/docs/changelog.rst +0 -0
  80. {kinto-21.0.0 → kinto-21.1.0}/docs/commandline.rst +0 -0
  81. {kinto-21.0.0 → kinto-21.1.0}/docs/community.rst +0 -0
  82. {kinto-21.0.0 → kinto-21.1.0}/docs/concepts.rst +0 -0
  83. {kinto-21.0.0 → kinto-21.1.0}/docs/conf.py +0 -0
  84. {kinto-21.0.0 → kinto-21.1.0}/docs/configuration/good-practices.rst +0 -0
  85. {kinto-21.0.0 → kinto-21.1.0}/docs/configuration/index.rst +0 -0
  86. {kinto-21.0.0 → kinto-21.1.0}/docs/configuration/production.rst +0 -0
  87. {kinto-21.0.0 → kinto-21.1.0}/docs/core/_static/theme_overrides.css +0 -0
  88. {kinto-21.0.0 → kinto-21.1.0}/docs/core/api.rst +0 -0
  89. {kinto-21.0.0 → kinto-21.1.0}/docs/core/cache.rst +0 -0
  90. {kinto-21.0.0 → kinto-21.1.0}/docs/core/decorators.rst +0 -0
  91. {kinto-21.0.0 → kinto-21.1.0}/docs/core/errors.rst +0 -0
  92. {kinto-21.0.0 → kinto-21.1.0}/docs/core/glossary.rst +0 -0
  93. {kinto-21.0.0 → kinto-21.1.0}/docs/core/images/cliquet-base.png +0 -0
  94. {kinto-21.0.0 → kinto-21.1.0}/docs/core/images/cliquet-mozilla.png +0 -0
  95. {kinto-21.0.0 → kinto-21.1.0}/docs/core/index.rst +0 -0
  96. {kinto-21.0.0 → kinto-21.1.0}/docs/core/notifications.rst +0 -0
  97. {kinto-21.0.0 → kinto-21.1.0}/docs/core/permission.rst +0 -0
  98. {kinto-21.0.0 → kinto-21.1.0}/docs/core/quickstart.rst +0 -0
  99. {kinto-21.0.0 → kinto-21.1.0}/docs/core/rationale.rst +0 -0
  100. {kinto-21.0.0 → kinto-21.1.0}/docs/core/resource.rst +0 -0
  101. {kinto-21.0.0 → kinto-21.1.0}/docs/core/storage.rst +0 -0
  102. {kinto-21.0.0 → kinto-21.1.0}/docs/core/testing.rst +0 -0
  103. {kinto-21.0.0 → kinto-21.1.0}/docs/core/utils.rst +0 -0
  104. {kinto-21.0.0 → kinto-21.1.0}/docs/core/viewsets.rst +0 -0
  105. {kinto-21.0.0 → kinto-21.1.0}/docs/faq.rst +0 -0
  106. {kinto-21.0.0 → kinto-21.1.0}/docs/images/alwaysdata-button.svg +0 -0
  107. {kinto-21.0.0 → kinto-21.1.0}/docs/images/architecture.svg +0 -0
  108. {kinto-21.0.0 → kinto-21.1.0}/docs/images/color-formatter.png +0 -0
  109. {kinto-21.0.0 → kinto-21.1.0}/docs/images/concepts-general.png +0 -0
  110. {kinto-21.0.0 → kinto-21.1.0}/docs/images/concepts-permissions.png +0 -0
  111. {kinto-21.0.0 → kinto-21.1.0}/docs/images/heroku-button.png +0 -0
  112. {kinto-21.0.0 → kinto-21.1.0}/docs/images/kinto-logo.png +0 -0
  113. {kinto-21.0.0 → kinto-21.1.0}/docs/images/kinto-logo.svg +0 -0
  114. {kinto-21.0.0 → kinto-21.1.0}/docs/images/logo-admin.svg +0 -0
  115. {kinto-21.0.0 → kinto-21.1.0}/docs/images/logo-attachment.svg +0 -0
  116. {kinto-21.0.0 → kinto-21.1.0}/docs/images/logo-community.svg +0 -0
  117. {kinto-21.0.0 → kinto-21.1.0}/docs/images/logo-history.svg +0 -0
  118. {kinto-21.0.0 → kinto-21.1.0}/docs/images/logo-javascript.svg +0 -0
  119. {kinto-21.0.0 → kinto-21.1.0}/docs/images/logo-jsonschema.svg +0 -0
  120. {kinto-21.0.0 → kinto-21.1.0}/docs/images/logo-multiapps.svg +0 -0
  121. {kinto-21.0.0 → kinto-21.1.0}/docs/images/logo-permissions.svg +0 -0
  122. {kinto-21.0.0 → kinto-21.1.0}/docs/images/logo-python.svg +0 -0
  123. {kinto-21.0.0 → kinto-21.1.0}/docs/images/logo-selfhostable.svg +0 -0
  124. {kinto-21.0.0 → kinto-21.1.0}/docs/images/logo-synchronisation.svg +0 -0
  125. {kinto-21.0.0 → kinto-21.1.0}/docs/images/overview-deployonce-selfhost.png +0 -0
  126. {kinto-21.0.0 → kinto-21.1.0}/docs/images/overview-features.png +0 -0
  127. {kinto-21.0.0 → kinto-21.1.0}/docs/images/overview-synchronisation.png +0 -0
  128. {kinto-21.0.0 → kinto-21.1.0}/docs/images/overview-use-cases.png +0 -0
  129. {kinto-21.0.0 → kinto-21.1.0}/docs/images/scalingo-button.svg +0 -0
  130. {kinto-21.0.0 → kinto-21.1.0}/docs/images/screenshot-kinto-admin-1.png +0 -0
  131. {kinto-21.0.0 → kinto-21.1.0}/docs/images/screenshot-kinto-admin-2.png +0 -0
  132. {kinto-21.0.0 → kinto-21.1.0}/docs/images/screenshot-kinto-admin-3.png +0 -0
  133. {kinto-21.0.0 → kinto-21.1.0}/docs/images/screenshot-kinto-admin-4.png +0 -0
  134. {kinto-21.0.0 → kinto-21.1.0}/docs/images/sequence-storage.png +0 -0
  135. {kinto-21.0.0 → kinto-21.1.0}/docs/images/sync-both.svg +0 -0
  136. {kinto-21.0.0 → kinto-21.1.0}/docs/images/sync-newest.svg +0 -0
  137. {kinto-21.0.0 → kinto-21.1.0}/docs/images/sync-oldest.svg +0 -0
  138. {kinto-21.0.0 → kinto-21.1.0}/docs/index.rst +0 -0
  139. {kinto-21.0.0 → kinto-21.1.0}/docs/kinto-admin.rst +0 -0
  140. {kinto-21.0.0 → kinto-21.1.0}/docs/overview.rst +0 -0
  141. {kinto-21.0.0 → kinto-21.1.0}/docs/requirements.txt +0 -0
  142. {kinto-21.0.0 → kinto-21.1.0}/docs/troubleshooting.rst +0 -0
  143. {kinto-21.0.0 → kinto-21.1.0}/docs/tutorials/custom-id-generator.rst +0 -0
  144. {kinto-21.0.0 → kinto-21.1.0}/docs/tutorials/first-steps.rst +0 -0
  145. {kinto-21.0.0 → kinto-21.1.0}/docs/tutorials/index.rst +0 -0
  146. {kinto-21.0.0 → kinto-21.1.0}/docs/tutorials/install.rst +0 -0
  147. {kinto-21.0.0 → kinto-21.1.0}/docs/tutorials/notifications-custom.rst +0 -0
  148. {kinto-21.0.0 → kinto-21.1.0}/docs/tutorials/permission-setups.rst +0 -0
  149. {kinto-21.0.0 → kinto-21.1.0}/docs/tutorials/permissions.rst +0 -0
  150. {kinto-21.0.0 → kinto-21.1.0}/docs/tutorials/synchronisation.rst +0 -0
  151. {kinto-21.0.0 → kinto-21.1.0}/docs/tutorials/write-plugin.rst +0 -0
  152. {kinto-21.0.0 → kinto-21.1.0}/kinto/__main__.py +0 -0
  153. {kinto-21.0.0 → kinto-21.1.0}/kinto/authorization.py +0 -0
  154. {kinto-21.0.0 → kinto-21.1.0}/kinto/config/kinto.tpl +0 -0
  155. {kinto-21.0.0 → kinto-21.1.0}/kinto/contribute.json +0 -0
  156. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/__init__.py +0 -0
  157. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/authentication.py +0 -0
  158. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/authorization.py +0 -0
  159. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cache/__init__.py +0 -0
  160. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cache/memcached.py +0 -0
  161. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cache/memory.py +0 -0
  162. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cache/postgresql/__init__.py +0 -0
  163. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cache/postgresql/schema.sql +0 -0
  164. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cache/testing.py +0 -0
  165. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice/__init__.py +0 -0
  166. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice/cors.py +0 -0
  167. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice/errors.py +0 -0
  168. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice/pyramidhook.py +0 -0
  169. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice/renderer.py +0 -0
  170. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice/resource.py +0 -0
  171. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice/service.py +0 -0
  172. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice/util.py +0 -0
  173. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice/validators/__init__.py +0 -0
  174. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice/validators/_colander.py +0 -0
  175. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice/validators/_marshmallow.py +0 -0
  176. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice_swagger/__init__.py +0 -0
  177. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice_swagger/converters/__init__.py +0 -0
  178. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice_swagger/converters/exceptions.py +0 -0
  179. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice_swagger/converters/parameters.py +0 -0
  180. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice_swagger/converters/schema.py +0 -0
  181. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice_swagger/swagger.py +0 -0
  182. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice_swagger/templates/index.html +0 -0
  183. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice_swagger/templates/index_script_template.html +0 -0
  184. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice_swagger/util.py +0 -0
  185. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/cornice_swagger/views.py +0 -0
  186. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/decorators.py +0 -0
  187. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/errors.py +0 -0
  188. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/events.py +0 -0
  189. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/initialization.py +0 -0
  190. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/listeners/__init__.py +0 -0
  191. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/metrics.py +0 -0
  192. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/openapi.py +0 -0
  193. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/permission/__init__.py +0 -0
  194. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/permission/memory.py +0 -0
  195. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/permission/postgresql/__init__.py +0 -0
  196. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/permission/postgresql/migrations/migration_001_002.sql +0 -0
  197. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/permission/postgresql/schema.sql +0 -0
  198. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/permission/testing.py +0 -0
  199. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/resource/__init__.py +0 -0
  200. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/resource/model.py +0 -0
  201. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/resource/schema.py +0 -0
  202. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/resource/viewset.py +0 -0
  203. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/schema.py +0 -0
  204. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/scripts.py +0 -0
  205. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/statsd.py +0 -0
  206. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/__init__.py +0 -0
  207. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/exceptions.py +0 -0
  208. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/generators.py +0 -0
  209. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/memory.py +0 -0
  210. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/__init__.py +0 -0
  211. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/client.py +0 -0
  212. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_001_002.sql +0 -0
  213. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_002_003.sql +0 -0
  214. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_003_004.sql +0 -0
  215. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_004_005.sql +0 -0
  216. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_005_006.sql +0 -0
  217. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_006_007.sql +0 -0
  218. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_007_008.sql +0 -0
  219. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_008_009.sql +0 -0
  220. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_009_010.sql +0 -0
  221. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_010_011.sql +0 -0
  222. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_011_012.sql +0 -0
  223. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_012_013.sql +0 -0
  224. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_013_014.sql +0 -0
  225. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_014_015.sql +0 -0
  226. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_015_016.sql +0 -0
  227. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_016_017.sql +0 -0
  228. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_017_018.sql +0 -0
  229. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_018_019.sql +0 -0
  230. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_019_020.sql +0 -0
  231. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_020_021.sql +0 -0
  232. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_021_022.sql +0 -0
  233. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrations/migration_022_023.sql +0 -0
  234. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/migrator.py +0 -0
  235. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/pool.py +0 -0
  236. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/postgresql/schema.sql +0 -0
  237. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/testing.py +0 -0
  238. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/storage/utils.py +0 -0
  239. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/testing.py +0 -0
  240. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/utils.py +0 -0
  241. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/views/__init__.py +0 -0
  242. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/views/batch.py +0 -0
  243. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/views/errors.py +0 -0
  244. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/views/heartbeat.py +0 -0
  245. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/views/openapi.py +0 -0
  246. {kinto-21.0.0 → kinto-21.1.0}/kinto/core/views/version.py +0 -0
  247. {kinto-21.0.0 → kinto-21.1.0}/kinto/events.py +0 -0
  248. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/__init__.py +0 -0
  249. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/accounts/__init__.py +0 -0
  250. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/accounts/authentication.py +0 -0
  251. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/accounts/scripts.py +0 -0
  252. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/accounts/utils.py +0 -0
  253. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/accounts/views.py +0 -0
  254. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/README.md +0 -0
  255. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/VERSION +0 -0
  256. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/__init__.py +0 -0
  257. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/build/VERSION +0 -0
  258. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/build/assets/asn1-EdZsLKOL.js +0 -0
  259. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/build/assets/clojure-BMjYHr_A.js +0 -0
  260. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/build/assets/css-BnMrqG3P.js +0 -0
  261. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/build/assets/index-Cs7JVwIg.css +0 -0
  262. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/build/assets/index-CylsivYB.js +0 -0
  263. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/build/assets/javascript-qCveANmP.js +0 -0
  264. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/build/assets/logo-VBRiKSPX.png +0 -0
  265. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/build/assets/mllike-CXdrOF99.js +0 -0
  266. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/build/assets/python-BuPzkPfP.js +0 -0
  267. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/build/assets/rpm-CTu-6PCP.js +0 -0
  268. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/build/assets/sql-D0XecflT.js +0 -0
  269. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/build/assets/ttcn-cfg-B9xdYoR4.js +0 -0
  270. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/build/index.html +0 -0
  271. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/public/help.html +0 -0
  272. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/admin/views.py +0 -0
  273. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/default_bucket/__init__.py +0 -0
  274. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/flush.py +0 -0
  275. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/history/__init__.py +0 -0
  276. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/history/listener.py +0 -0
  277. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/history/views.py +0 -0
  278. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/openid/__init__.py +0 -0
  279. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/openid/utils.py +0 -0
  280. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/openid/views.py +0 -0
  281. {kinto-21.0.0 → kinto-21.1.0}/kinto/plugins/statsd.py +0 -0
  282. {kinto-21.0.0 → kinto-21.1.0}/kinto/schema_validation.py +0 -0
  283. {kinto-21.0.0 → kinto-21.1.0}/kinto/views/__init__.py +0 -0
  284. {kinto-21.0.0 → kinto-21.1.0}/kinto/views/admin.py +0 -0
  285. {kinto-21.0.0 → kinto-21.1.0}/kinto/views/buckets.py +0 -0
  286. {kinto-21.0.0 → kinto-21.1.0}/kinto/views/collections.py +0 -0
  287. {kinto-21.0.0 → kinto-21.1.0}/kinto/views/contribute.py +0 -0
  288. {kinto-21.0.0 → kinto-21.1.0}/kinto/views/groups.py +0 -0
  289. {kinto-21.0.0 → kinto-21.1.0}/kinto/views/permissions.py +0 -0
  290. {kinto-21.0.0 → kinto-21.1.0}/kinto/views/records.py +0 -0
  291. {kinto-21.0.0 → kinto-21.1.0}/kinto.egg-info/SOURCES.txt +0 -0
  292. {kinto-21.0.0 → kinto-21.1.0}/kinto.egg-info/dependency_links.txt +0 -0
  293. {kinto-21.0.0 → kinto-21.1.0}/kinto.egg-info/entry_points.txt +0 -0
  294. {kinto-21.0.0 → kinto-21.1.0}/kinto.egg-info/requires.txt +0 -0
  295. {kinto-21.0.0 → kinto-21.1.0}/kinto.egg-info/top_level.txt +0 -0
  296. {kinto-21.0.0 → kinto-21.1.0}/pyproject.toml +0 -0
  297. {kinto-21.0.0 → kinto-21.1.0}/scripts/pull-kinto-admin.sh +0 -0
  298. {kinto-21.0.0 → kinto-21.1.0}/setup.cfg +0 -0
  299. {kinto-21.0.0 → kinto-21.1.0}/tests/__init__.py +0 -0
  300. {kinto-21.0.0 → kinto-21.1.0}/tests/browser.ini +0 -0
  301. {kinto-21.0.0 → kinto-21.1.0}/tests/browser.py +0 -0
  302. {kinto-21.0.0 → kinto-21.1.0}/tests/core/__init__.py +0 -0
  303. {kinto-21.0.0 → kinto-21.1.0}/tests/core/listeners.py +0 -0
  304. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/__init__.py +0 -0
  305. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_base.py +0 -0
  306. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_cache_expires.py +0 -0
  307. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_events.py +0 -0
  308. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_filter.py +0 -0
  309. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_model.py +0 -0
  310. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_object.py +0 -0
  311. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_object_permissions.py +0 -0
  312. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_pagination.py +0 -0
  313. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_partial_response.py +0 -0
  314. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_preconditions.py +0 -0
  315. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_schema.py +0 -0
  316. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_sort.py +0 -0
  317. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_sync.py +0 -0
  318. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_views.py +0 -0
  319. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_views_cors.py +0 -0
  320. {kinto-21.0.0 → kinto-21.1.0}/tests/core/resource/test_viewset.py +0 -0
  321. {kinto-21.0.0 → kinto-21.1.0}/tests/core/schema/postgresql-permission-1.sql +0 -0
  322. {kinto-21.0.0 → kinto-21.1.0}/tests/core/schema/postgresql-storage-1.6.sql +0 -0
  323. {kinto-21.0.0 → kinto-21.1.0}/tests/core/schema/postgresql-storage-11.sql +0 -0
  324. {kinto-21.0.0 → kinto-21.1.0}/tests/core/support.py +0 -0
  325. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_authentication.py +0 -0
  326. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_authorization.py +0 -0
  327. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_cache.py +0 -0
  328. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_decorators.py +0 -0
  329. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_deprecation.py +0 -0
  330. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_errors.py +0 -0
  331. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_initialization.py +0 -0
  332. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_listeners.py +0 -0
  333. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_logging.py +0 -0
  334. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_metrics.py +0 -0
  335. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_openapi.py +0 -0
  336. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_permission.py +0 -0
  337. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_schema.py +0 -0
  338. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_scripts.py +0 -0
  339. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_storage.py +0 -0
  340. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_storage_migrations.py +0 -0
  341. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_storage_pool.py +0 -0
  342. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_utils.py +0 -0
  343. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_views_batch.py +0 -0
  344. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_views_errors.py +0 -0
  345. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_views_heartbeat.py +0 -0
  346. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_views_openapi.py +0 -0
  347. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_views_postgresql.py +0 -0
  348. {kinto-21.0.0 → kinto-21.1.0}/tests/core/test_views_transaction.py +0 -0
  349. {kinto-21.0.0 → kinto-21.1.0}/tests/core/testapp/__init__.py +0 -0
  350. {kinto-21.0.0 → kinto-21.1.0}/tests/core/testapp/static/index.html +0 -0
  351. {kinto-21.0.0 → kinto-21.1.0}/tests/core/testapp/views.py +0 -0
  352. {kinto-21.0.0 → kinto-21.1.0}/tests/core/testplugin/__init__.py +0 -0
  353. {kinto-21.0.0 → kinto-21.1.0}/tests/functional.ini +0 -0
  354. {kinto-21.0.0 → kinto-21.1.0}/tests/functional.py +0 -0
  355. {kinto-21.0.0 → kinto-21.1.0}/tests/openapi/__init__.py +0 -0
  356. {kinto-21.0.0 → kinto-21.1.0}/tests/openapi/support.py +0 -0
  357. {kinto-21.0.0 → kinto-21.1.0}/tests/openapi/test_plugins.py +0 -0
  358. {kinto-21.0.0 → kinto-21.1.0}/tests/openapi/test_resources.py +0 -0
  359. {kinto-21.0.0 → kinto-21.1.0}/tests/openapi/test_responses_buckets.py +0 -0
  360. {kinto-21.0.0 → kinto-21.1.0}/tests/openapi/test_responses_collections.py +0 -0
  361. {kinto-21.0.0 → kinto-21.1.0}/tests/openapi/test_responses_errors.py +0 -0
  362. {kinto-21.0.0 → kinto-21.1.0}/tests/openapi/test_responses_groups.py +0 -0
  363. {kinto-21.0.0 → kinto-21.1.0}/tests/openapi/test_responses_records.py +0 -0
  364. {kinto-21.0.0 → kinto-21.1.0}/tests/openapi/test_validation.py +0 -0
  365. {kinto-21.0.0 → kinto-21.1.0}/tests/plugins/__init__.py +0 -0
  366. {kinto-21.0.0 → kinto-21.1.0}/tests/plugins/test_accounts.py +0 -0
  367. {kinto-21.0.0 → kinto-21.1.0}/tests/plugins/test_admin.py +0 -0
  368. {kinto-21.0.0 → kinto-21.1.0}/tests/plugins/test_default_bucket.py +0 -0
  369. {kinto-21.0.0 → kinto-21.1.0}/tests/plugins/test_flush.py +0 -0
  370. {kinto-21.0.0 → kinto-21.1.0}/tests/plugins/test_history.py +0 -0
  371. {kinto-21.0.0 → kinto-21.1.0}/tests/plugins/test_openid.py +0 -0
  372. {kinto-21.0.0 → kinto-21.1.0}/tests/plugins/test_statsd.py +0 -0
  373. {kinto-21.0.0 → kinto-21.1.0}/tests/support.py +0 -0
  374. {kinto-21.0.0 → kinto-21.1.0}/tests/test_authorization.py +0 -0
  375. {kinto-21.0.0 → kinto-21.1.0}/tests/test_config.py +0 -0
  376. {kinto-21.0.0 → kinto-21.1.0}/tests/test_configuration/test.ini +0 -0
  377. {kinto-21.0.0 → kinto-21.1.0}/tests/test_init.py +0 -0
  378. {kinto-21.0.0 → kinto-21.1.0}/tests/test_main.py +0 -0
  379. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_admin.py +0 -0
  380. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_buckets.py +0 -0
  381. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_collections.py +0 -0
  382. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_collections_cache.py +0 -0
  383. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_contribute.py +0 -0
  384. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_disable_default.py +0 -0
  385. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_groups.py +0 -0
  386. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_hello.py +0 -0
  387. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_metrics.py +0 -0
  388. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_objects_permissions.py +0 -0
  389. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_permissions.py +0 -0
  390. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_records.py +0 -0
  391. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_schema_collection.py +0 -0
  392. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_schema_group.py +0 -0
  393. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_schema_record.py +0 -0
  394. {kinto-21.0.0 → kinto-21.1.0}/tests/test_views_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kinto
3
- Version: 21.0.0
3
+ Version: 21.1.0
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
@@ -8,6 +8,8 @@ here = os.path.dirname(__file__)
8
8
 
9
9
  ini_path = os.environ.get('KINTO_INI')
10
10
  if ini_path is None:
11
+ # WARNING: if you modify this default value, you should
12
+ # also change the default in `kinto.config.config_attributes()`
11
13
  ini_path = os.path.join(here, 'config', 'kinto.ini')
12
14
 
13
15
  # Set up logging
@@ -25,6 +25,11 @@ The returned value is a JSON mapping containing:
25
25
  - ``readonly``: Only requests with read operations are allowed.
26
26
 
27
27
  - ``capabilities``: a mapping used by clients to detect optional features of the API.
28
+ - ``config``: attributes of the configuration file used by the server.
29
+
30
+ - ``path``: path on the server
31
+ - ``hash``: SHA256 hash of the file
32
+ - ``modified``: datetime of the file
28
33
 
29
34
  - Example:
30
35
 
@@ -11,6 +11,12 @@ API
11
11
  Changelog
12
12
  ---------
13
13
 
14
+ 1.23 (2025-04-16)
15
+ '''''''''''''''''
16
+
17
+ - Added ``config`` field to the root URL endpoint
18
+
19
+
14
20
  1.22 (2019-03-20)
15
21
  '''''''''''''''''
16
22
 
@@ -513,6 +513,12 @@ Prometheus metrics can be enabled with (disabled by default):
513
513
 
514
514
  # kinto.prometheus_prefix = kinto-prod
515
515
 
516
+ # Expose metrics created time (default: true)
517
+ # kinto.prometheus_created_metrics_enabled = false
518
+
519
+ # Exclude certain labels to reduce cardinality (default: none)
520
+ # kinto.prometheus_exclude_labels = record_id group_id
521
+
516
522
  Metrics can then be crawled from the ``/__metrics__`` endpoint.
517
523
 
518
524
 
@@ -14,7 +14,7 @@ from kinto.core import utils
14
14
  __version__ = pkg_resources.get_distribution(__package__).version
15
15
 
16
16
  # Implemented HTTP API Version
17
- HTTP_API_VERSION = "1.22"
17
+ HTTP_API_VERSION = "1.23"
18
18
 
19
19
  # Main kinto logger
20
20
  logger = logging.getLogger(__name__)
@@ -1,6 +1,9 @@
1
1
  import codecs
2
2
  import logging
3
3
  import os
4
+ from datetime import datetime
5
+ from functools import lru_cache
6
+ from hashlib import sha256
4
7
  from time import strftime
5
8
 
6
9
  from kinto import __version__
@@ -69,3 +72,23 @@ def init(config_file, backend, cache_backend, host="127.0.0.1"):
69
72
  values.update(cache_backend_to_values[cache_backend])
70
73
 
71
74
  render_template("kinto.tpl", config_file, **values)
75
+
76
+
77
+ @lru_cache(maxsize=1)
78
+ def config_attributes():
79
+ """
80
+ Returns a hash of the config `.ini` file content.
81
+ The path is only known from `app.wsgi`, so we have to read
82
+ the environment variable again. Since tests are not run through
83
+ WSGI, then the variable is not set.
84
+ """
85
+ # WARNING: this default value should be the same as `app.wsgi`
86
+ ini_path = os.environ.get("KINTO_INI", os.path.join(".", "config", "kinto.ini"))
87
+ if not os.path.exists(ini_path):
88
+ logger.error(f"Could not find config file at {ini_path}")
89
+ return None
90
+ return {
91
+ "path": ini_path,
92
+ "hash": sha256(open(ini_path, "rb").read()).hexdigest(),
93
+ "modified": datetime.fromtimestamp(os.path.getmtime(ini_path)).isoformat(),
94
+ }
@@ -2,6 +2,7 @@ import colander
2
2
  from pyramid.authorization import Authenticated
3
3
  from pyramid.security import NO_PERMISSION_REQUIRED
4
4
 
5
+ from kinto.config import config_attributes
5
6
  from kinto.core import Service
6
7
 
7
8
 
@@ -26,14 +27,17 @@ hello_response_schemas = {
26
27
  def get_hello(request):
27
28
  """Return information regarding the current instance."""
28
29
  settings = request.registry.settings
30
+
29
31
  project_name = settings["project_name"]
30
32
  project_version = settings["project_version"]
33
+
31
34
  data = dict(
32
35
  project_name=project_name,
33
36
  project_version=project_version,
34
37
  http_api_version=settings["http_api_version"],
35
38
  project_docs=settings["project_docs"],
36
39
  url=request.route_url(hello.name),
40
+ config=config_attributes(),
37
41
  )
38
42
 
39
43
  eos = get_eos(request)
@@ -6,6 +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, aslist
9
10
  from zope.interface import implementer
10
11
 
11
12
  from kinto.core import metrics
@@ -102,7 +103,7 @@ class Timer:
102
103
 
103
104
  @implementer(metrics.IMetricsService)
104
105
  class PrometheusService:
105
- def __init__(self, prefix=""):
106
+ def __init__(self, prefix="", exclude_labels=None):
106
107
  prefix_clean = ""
107
108
  if prefix:
108
109
  # In GCP Console, the metrics are grouped by the first
@@ -111,10 +112,19 @@ class PrometheusService:
111
112
  # (eg. `remote-settings` -> `remotesettings_`, `kinto_` -> `kinto_`)
112
113
  prefix_clean = _fix_metric_name(prefix).replace("_", "") + "_"
113
114
  self.prefix = prefix_clean.lower()
115
+ self.exclude_labels = exclude_labels or []
116
+
117
+ def _exclude_labels(self, labels):
118
+ return [
119
+ (label_name, label_value)
120
+ for label_name, label_value in labels
121
+ if label_name not in self.exclude_labels
122
+ ]
114
123
 
115
124
  def timer(self, key, value=None, labels=[]):
116
125
  global _METRICS
117
126
  key = self.prefix + key
127
+ labels = self._exclude_labels(labels)
118
128
 
119
129
  if key not in _METRICS:
120
130
  _METRICS[key] = prometheus_module.Histogram(
@@ -144,6 +154,7 @@ class PrometheusService:
144
154
  def observe(self, key, value, labels=[]):
145
155
  global _METRICS
146
156
  key = self.prefix + key
157
+ labels = self._exclude_labels(labels)
147
158
 
148
159
  if key not in _METRICS:
149
160
  _METRICS[key] = prometheus_module.Summary(
@@ -184,6 +195,7 @@ class PrometheusService:
184
195
  label_name, label_value = unique.rsplit(".", 1)
185
196
  unique = [(label_name, label_value)]
186
197
 
198
+ unique = self._exclude_labels(unique)
187
199
  labels = [
188
200
  (_fix_metric_name(label_name), label_value) for label_name, label_value in unique
189
201
  ]
@@ -229,6 +241,11 @@ def includeme(config):
229
241
  )
230
242
  raise ConfigurationError(error_msg)
231
243
 
244
+ settings = config.get_settings()
245
+
246
+ if not asbool(settings.get("prometheus_created_metrics_enabled", True)):
247
+ prometheus_module.disable_created_metrics()
248
+
232
249
  config.add_api_capability(
233
250
  "prometheus",
234
251
  description="Prometheus metrics.",
@@ -250,7 +267,13 @@ def includeme(config):
250
267
  pass
251
268
  _METRICS.clear()
252
269
 
253
- settings = config.get_settings()
254
270
  prefix = settings.get("prometheus_prefix", settings["project_name"])
255
271
 
256
- config.registry.registerUtility(PrometheusService(prefix=prefix), metrics.IMetricsService)
272
+ # If we want to reduce the metrics cardinality, we can exclude certain
273
+ # labels (eg. records_id). This way all metrics will be grouped by the
274
+ # remaining labels.
275
+ exclude_labels = aslist(settings.get("prometheus_exclude_labels", ""))
276
+
277
+ config.registry.registerUtility(
278
+ PrometheusService(prefix=prefix, exclude_labels=exclude_labels), metrics.IMetricsService
279
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kinto
3
- Version: 21.0.0
3
+ Version: 21.1.0
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
@@ -1,7 +1,9 @@
1
+ import os
1
2
  from unittest import mock
2
3
 
3
4
  from pyramid import testing
4
5
 
6
+ from kinto.config import config_attributes
5
7
  from kinto.core.testing import unittest
6
8
 
7
9
  from .support import BaseWebTest
@@ -75,6 +77,22 @@ class HelloViewTest(BaseWebTest, unittest.TestCase):
75
77
 
76
78
  self.assertTrue(response.json["http_api_version"])
77
79
 
80
+ def test_return_config_file_info(self):
81
+ config_attributes.cache_clear()
82
+ before = os.getenv("KINTO_INI", None)
83
+ os.environ["KINTO_INI"] = "tests/test_configuration/test.ini"
84
+
85
+ response = self.app.get("/")
86
+
87
+ self.assertEqual(response.json["config"]["hash"], mock.ANY)
88
+ self.assertEqual(response.json["config"]["modified"], mock.ANY)
89
+ self.assertEqual(response.json["config"]["path"], mock.ANY)
90
+
91
+ if before is None:
92
+ del os.environ["KINTO_INI"]
93
+ else:
94
+ os.environ["KINTO_INI"] = before
95
+
78
96
 
79
97
  class APICapabilitiesTest(BaseWebTest, unittest.TestCase):
80
98
  def test_list_of_capabilities_contains_basicauth_by_default(self):
@@ -157,3 +157,49 @@ class PrometheusNoPrefixTest(PrometheusWebTest):
157
157
 
158
158
  resp = self.app.get("/__metrics__")
159
159
  self.assertIn("TYPE price summary", resp.text)
160
+
161
+
162
+ @skip_if_no_prometheus
163
+ class PrometheusNoCreatedTest(PrometheusWebTest):
164
+ @classmethod
165
+ def get_app_settings(cls, extras=None):
166
+ settings = super().get_app_settings(extras)
167
+ settings["prometheus_created_metrics_enabled"] = "false"
168
+ return settings
169
+
170
+ def test_metrics_created_not_in_response(self):
171
+ self.app.app.registry.metrics.observe("price", 111)
172
+
173
+ resp = self.app.get("/__metrics__")
174
+
175
+ self.assertIn("TYPE kintoprod_price summary", resp.text)
176
+ self.assertNotIn("TYPE kintoprod_price_created summary", resp.text)
177
+
178
+
179
+ @skip_if_no_prometheus
180
+ class PrometheusExcludedLabelsTest(PrometheusWebTest):
181
+ @classmethod
182
+ def get_app_settings(cls, extras=None):
183
+ settings = super().get_app_settings(extras)
184
+ settings["prometheus_exclude_labels"] = "record_id group_id"
185
+ return settings
186
+
187
+ def test_metrics_excluded_labels(self):
188
+ headers = get_user_headers("aaa")
189
+ self.app.put("/buckets/bid", headers=headers)
190
+ self.app.put("/buckets/bid/collections/cid", headers=headers)
191
+ self.app.put("/buckets/bid/groups/gid", headers=headers)
192
+ self.app.put("/buckets/bid/collections/cid/records/rid", headers=headers)
193
+
194
+ resp = self.app.get("/__metrics__")
195
+
196
+ self.assertNotIn("group_id=", resp.text)
197
+ self.assertNotIn("record_id=", resp.text)
198
+ self.assertIn(
199
+ 'kintoprod_request_size_count{bucket_id="bid",collection_id="",endpoint="group-object"}',
200
+ resp.text,
201
+ )
202
+ self.assertIn(
203
+ 'kintoprod_request_size_count{bucket_id="bid",collection_id="cid",endpoint="record-object"}',
204
+ resp.text,
205
+ )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes