minor model updates and configuration change since timeout was added#6
Open
swelborn wants to merge 6 commits into
Open
minor model updates and configuration change since timeout was added#6swelborn wants to merge 6 commits into
swelborn wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the fastcache API’s data model and configuration serialization to align with upstream changes (timeout support) and naming used in related lclstream APIs.
Changes:
- Renames cache lifecycle enum/fields from
CacheStatus/statustoCacheState/stateacross DB model, API schemas, and routes. - Simplifies cache-process config writing by removing
FastcacheConfigand emitting the on-disk JSON viaCacheConfig.to_fastcache_json(). - Removes
num_workersfrom the persisted/requested cache config and adds a defaulttimeout.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/fastcache_api/tables.py | Renames the cache lifecycle column/attribute to state and updates enum usage. |
| src/fastcache_api/routes/cache.py | Updates create/shutdown flows to use CacheState/state and adjusts active-cache filtering. |
| src/fastcache_api/reconcile.py | Updates liveness reconciliation logic to use CacheState/state. |
| src/fastcache_api/process.py | Switches config file generation to CacheConfig.to_fastcache_json() and uses URL parsing for port extraction. |
| src/fastcache_api/models.py | Introduces CacheState, updates public schema field name to state, and changes config model/serialization (AnyUrl + timeout + JSON rendering). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+49
to
52
| state: Mapped[str] = mapped_column( | ||
| default=CacheState.new, | ||
| doc="Lifecycle state; stored as the CacheState string value", | ||
| ) |
Comment on lines
24
to
+27
| Mirrors the cacheserver config (see config/default.json) plus the | ||
| resolved ZMQ bind URIs. | ||
| resolved ZMQ bind URIs. ``to_fastcache_json`` renders the on-disk config | ||
| the fastcache binary consumes (see src/config.cpp): the ZMQ URIs are | ||
| renamed to ``inurl``/``outurl`` and ``hostname`` is dropped. |
This was referenced Jun 30, 2026
This was referenced Jul 12, 2026
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.
lclstream/fastcache#10 added timeout
we also change name of cachestatus to cachestate to match lclstream_api versions
we remove num_workers from config as was done elsewhere
This is part 2 of 10 in a stack made with GitButler: