docs(runbooks): note that credential changes require an API restart#365
Conversation
Resolves SoundMindsAI#360 The Settings accessor used for cluster_credentials.yaml uses @lru_cache + @cached_property, memoizing credential resolution at process start. If an operator edits the file on a running stack (edit to cluster_credentials.yaml or step 5a of scripts/install.sh), the api keeps using stale credentials until 'docker compose restart api worker' is run.
There was a problem hiding this comment.
Code Review
This pull request updates the Solr cluster registration runbook documentation to add a warning that credential edits require restarting the API and worker containers due to caching. The review feedback suggests capitalizing 'api' as 'API' in the text for consistency with the rest of the documentation.
| > `cluster_credentials.yaml` is read through a cached `Settings` | ||
| > accessor that memoizes its value at process start. If you edit the | ||
| > file on a running stack (or run step 5a of `scripts/install.sh` after | ||
| > `docker compose up -d`), the api keeps serving the *old* credentials |
There was a problem hiding this comment.
PR feedback: capitalize 'API' when referring to the application conceptually, matching 'RelyLoop API container' and 'API: POST'.
|
Fixed — thanks for catching that. Changed
|
|
Thanks for the review! Fixed — 'api' → 'API' in the restart command for consistency. |
There was a problem hiding this comment.
Pull request overview
Updates the Solr cluster registration runbook to warn operators that changes to ./secrets/cluster_credentials.yaml on a running stack won’t be picked up until the relevant services are restarted (due to process-level settings caching).
Changes:
- Adds a callout noting that credential edits require restarting services to take effect.
- Briefly explains that credentials are memoized at process start via cached settings access.
- Generalizes the warning to cover Elasticsearch and OpenSearch credentials as well.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| > `cluster_credentials.yaml` is read through a cached `Settings` | ||
| > accessor that memoizes its value at process start. If you edit the | ||
| > file on a running stack (or run step 5a of `scripts/install.sh` after | ||
| > `docker compose up -d`), the API keeps serving the *old* credentials | ||
| > until you restart: `docker compose restart API worker`. |
|
Thanks for this — the note itself is accurate and genuinely useful, and I verified every claim in it against the codebase: the One small thing to revert before merge, and I want to be clear that your original commit had it right: The restart command needs the service name in lowercase: Docker Compose service names are case-sensitive, and the service is defined as For the record, your first commit (30bde6f) had this exactly right — Could you flip |
…rt command Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com> Co-Authored-By: gemini-code-assist[bot] <136328045+gemini-code-assist[bot]@users.noreply.github.com>
|
Thanks for the reviews! ✅ Fixed: changed |
|
Thank you! I have approved and merged your PR. |
* docs(state): finalize 3 stale MVP2 folders + close #357 + dashboards Signed-off-by: SoundMindsAI <eric.starr@soundminds.ai> * docs(dashboards): regenerate after rebase on #385 (reflect both folder-move sets) Signed-off-by: SoundMindsAI <eric.starr@soundminds.ai> --------- Signed-off-by: SoundMindsAI <eric.starr@soundminds.ai>
Summary
Documents that editing
cluster_credentials.yamlon a running RelyLoop stack requires adocker compose restart api workerbefore the API picks up the new credentials. Resolves #360.Definition of done
docs/03_runbooks/solr-cluster-registration.mdSettings+@lru_cache) in one sentenceBackground
The
Settingsaccessor forcluster_credentials.yamluses@lru_cache+@cached_property, memoizing credential resolution at process start. Editing the file on a running stack (or running step 5a ofscripts/install.shafterdocker compose up -d) means the api serves stale credentials until restarted. The same caching applies to Elasticsearch and OpenSearch credentials, so the note is generalized to all engines.