1
0
mirror of https://github.com/quay/quay.git synced 2026-01-27 18:42:52 +03:00

14 Commits

Author SHA1 Message Date
Ryan Wallace
225f28f507 chore(deps): upgrade redis version, remove redis-py-cluster (PROJQUAY-9314) (#4703)
* chore(deps): upgrade redis version, remove redis-py-cluster

* chore: adjust deps

* test: adjust tests

* docs: add comments about backwards compatible conversions
2026-01-05 21:02:43 +00:00
Daniel Messer
a5ab170773 cache: handle cache value size limit in memcached (PROJQUAY-7239) (#2914)
* handle cache value size limit in memcached
* only print cache value for redis in debug logs on redis errors

---------

Signed-off-by: dmesser <dmesser@redhat.com>
2024-06-24 10:26:53 +02:00
Kenny Lee Sin Cheong
5f63b3a7bb chore: drop deprecated tables and remove unused code (PROJQUAY-522) (#2089)
* chore: drop deprecated tables and remove unused code

* isort imports

* migration: check for table existence before drop
2023-08-25 12:17:24 -04:00
mosen
fca67e7729 feat: mypy type annotations (PROJQUAY-740) (#455)
* Add dev dependencies mypy and typing

* Add makefile target `types-test`, not yet included in `test` target.

* Generate stubs for imported modules to avoid mypy complaining about missing types.

* Remove generated stubs as there are way too many and they cause tons of mess in the repo. Switched to ignoring untyped modules for now, to concentrate on Quay-only type checking.

* mypy config changed to ignore missing imports

* ignore property decorator as it is not supported by mypy

* mypy annotations for many configuration variables

* re-generate mypy_stubs directory as its necessary in some classes for base classes to prevent mypy errors

* util/registry/queuefile referred to non existent definition of Empty class in multiprocessing.queues

* ignore type checking for things like monkey patching and exported/re-imported objects that 
mypy does not allow.

* Adjust mypy config to warn us about unreachable return paths and useless expressions.

* Add the __annotations__ property to INTERNAL_ONLY_PROPERTIES so that it is not part of the config schema testing

* Remove redundant dependencies `typing` and `typing-extensions` which are NOOP after Python 3.5

* Remove mypy-extensions which only provides a TypedDict implementation but has not been updated since 2019.

* updated mypy to 0.910 which requires all types packages to be installed manually.

* exclude local-dev from type checking until core team can suggest an outcome for __init__.py duplicate packages

* re-add typing dependency which will be needed until Python 3.9

* ignore .mypy_cache

* add mypy stub for features module to replace inline definitions

* import annotations eager evaluation in billing.py as it was required to reference a class declared later in the module.

* remove the type definition of V1ProtocolSteps/V2ProtocolSteps to make tox happy
2021-10-25 09:56:26 +02:00
Kenny Lee Sin Cheong
cd6871c14f cache: add support for redis cluster mode (PROJQUAY-2101) (#810)
Adds support to use redis in cluster mode when using redis instead of
memcached for caching.
2021-07-22 12:25:46 -04:00
Syed Mushtaq Ahmed
b33f125c58 modelcache: Add read and write endpoints to Redis (PROJQUAY-1939) (#795)
Adds `read_client` and `write_client` to Redis ModelCache to separate out read
and write calls to different endpoints
2021-05-20 16:04:36 -04:00
Syed Mushtaq Ahmed
df4ad94527 modelcache: Make ModelCache TTL configurable (PROJQUAY-1878) (#765)
Adds a configuration option to modify the cache expiry timeout
for ModelCache objects

Co-authored-by: Syed <syed@apache.org>
2021-04-28 10:46:32 -04:00
Alec Merdler
1180ea99fa cache: remove GlobalLock from redis model cache (PROJQUAY-1902) (#755)
Remove GlobalLock from Redis model cache implementation in
favor of 'nx=True' when setting the key.

Signed-off-by: Alec Merdler <alecmerdler@gmail.com>
2021-04-19 19:06:18 -07:00
Alec Merdler
780685c490 cache: add Redis model cache implementation (PROJQUAY-788) (#444)
Adds implementation of DataModelCache interface backed by Redis.
All containers in a Quay cluster deployment will share a single
model cache, rather than each container using its own cache.

Signed-off-by: Alec Merdler <alecmerdler@gmail.com>
2021-04-15 10:31:42 -07:00
Kurtis Mullins
bd7252c536 [PROJQUAY-1021] task: Update "Black" to version 20.8b1 2020-11-30 18:48:19 -05:00
Joseph Schorr
a25ed4cb9e Change memcache implementation to use a connection pool (#457) 2020-06-25 11:46:53 -04:00
Joseph Schorr
8ff86175b8 Fix handling of client connections in pymemcache cache (#433)
pymemcache is apparently not thread safe, so our reuse of the client
was causing the occasional hang on read. This change has us open a new
connection per request, and then close it once complete. We also make
sure to close the DB connection before making the memcache connection,
in case the memcache connection takes a bit of time

We should investigate switching to the PooledClient library for reusing
connections (safely) once we verify this change works
2020-06-10 13:19:23 -04:00
Tom McKay
e6ae94db8b 'make black' results 2019-12-02 12:23:08 -05:00
Jimmy Zelinskie
9c0dd3b722 initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00