Repository navigation
Feat/cache store - #70
Merged
Merged
Conversation
…r and InMemoryCacheStore - Replaced MemoryConcurrencyLimiter with LeaseManager in stream thread naming tests. - Updated test_thread_lock.py to utilize LeaseManager for concurrency limits. - Refactored token revocation tests to use InMemoryCacheStore instead of InMemoryTokenRevocation and RedisTokenRevocation. - Adjusted websocket guard tests to implement LeaseManager for connection limits. - Enhanced websocket limits tests to share the bound cache store for rate limiting and connection management.
- Removed unused thread name generator path from service configuration in test_stream_thread_naming.py. - Updated thread name generator path handling in test_thread_lock.py. - Modified token revocation handling in test_token_revocation.py to use cache_store. - Adjusted rate limit configuration in test_websocket_guard.py to include a cap. - Added comprehensive tests for cache_store configuration in test_cache_store_config.py. - Introduced tests for id_generator configuration in test_id_generator_config.py. - Created tests for thread name generator choices in test_thread_name_choices.py.
- Updated the `init` command to streamline project initialization by reducing interactive prompts. - Simplified the configuration for quick-start and production templates, focusing on essential parameters. - Introduced new flags for cache store options (`--cache-store`), rate limiting (`--rate-limit`), and token revocation (`--token-revocation`). - Adjusted the generated `10xgraph.json` to reflect changes in cache store handling, removing unnecessary URL fields for Redis. - Enhanced documentation to clarify the new command behavior and options. - Updated tests to cover new configurations and ensure backward compatibility.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fourth 1.0 release candidate. Everything the API shares between workers now lives in
one
BaseCacheStore, configured by onecache_storeobject in 10xgraph.json. Fixes therc3 bug where a leftover REDIS_URL stopped an in-memory server from booting in
production. Requires
10xgraph>=1.0.0rc4.Breaking
ConcurrencyLimiter,TokenRevocationBackendand its variants,
BaseRateLimitBackend,MemoryRateLimitBackend,RedisRateLimitBackend.cache_storeobject:{"type": "memory"|"redis"|"custom", "url", "path", "rate_limit", "token_revocation"}. Nocache_storemeans the in-memory store.redis,rate_limitandtoken_revocationkeys are config errors that saywhere each setting goes.
REDIS_URLno longer selects the cache store;Settings.REDIS_URLis gone."type": "redis"with nourlreadsREDIS_URL.type: "redis"without theredispackage refuses to boot (no silent per-process fallback)./health/ready:checks.redisrenamedchecks.cache. Readiness and the startup checkonly call
aping()on the checkpointer, store and cache store.10xgraph:ratelimit2, so counters reset once at deploy.Lock key layout unchanged, so old and new pods share locks during a rolling deploy.
10xgraph initasks only name, template and provider. Production writes jwt auth,ownership authorization, uuid ids and a Redis cache store with rate limit and token
revocation. Flags override parts of it for scripts.
thread_name_generator:random(default, now saved),first_message,noneormodule:attr.GraphConfig.thread_name_generator_pathreplaced bythread_name_generator.Added
BaseCacheStore,RedisCacheStore(also Valkey, Dragonfly, KeyDB),InMemoryCacheStore,exported from
tenxgraph_api; optionaldescribe()names the endpoint in logs and errors.tenxgraph_api.testing.cache_store_contract.id_generatorkey: uuid, hex, short, int, bigint, timestamp, snowflake ormodule:attr.thread_name_generator: "first_message".10xgraph config: token revocation section and a Cache store page.Changed
auth, or rate limiting with
fail_open: false); otherwise one WARNING and the server starts.rate limiting follows
fail_open.10xgraph revokewrites to the selected cache store and refuses on the in-memory store.revoke_userrounds the cutoff up.Fixed
Before merge
10xgraph>=1.0.0rc4anduv lockrefreshed (after core rc4 is on PyPI).Tests
TEST_REDIS_URL).