feat: add /admin/config/check route to compare env vs Redis config values#1042
Merged
nledez merged 3 commits intocgwire:mainfrom Mar 26, 2026
Merged
feat: add /admin/config/check route to compare env vs Redis config values#1042nledez merged 3 commits intocgwire:mainfrom
nledez merged 3 commits intocgwire:mainfrom
Conversation
…lues - New admin blueprint with token-based auth (ADMIN_TOKEN env var) - Route only registered when ADMIN_TOKEN is set - Compares env and Redis values for all config_store managed keys (user_limit, default_timezone, default_locale, nomad_*) - Includes active (non-bot) user count - Add _get_redis_raw() and get_config_comparison() to config_store - Add 8 tests covering auth (403 cases) and response validation
Compare env-cli, redis, and env-api values side by side. The check verifies env-cli == redis and exits with code 1 on mismatch, making it usable in monitoring scripts. - Add ENV_VAR_MAP to read env vars on the CLI side - Show ✗ and "out of sync" message when env-cli diverges from redis - Command only registered when ADMIN_TOKEN is set - Tests use unittest.TestCase with mocked requests (no DB needed)
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.
Problem
There was no way to diagnose discrepancies between config values set in environment variables and those stored in Redis (e.g. USER_LIMIT showing different values depending on
which source was read). This made it difficult to troubleshoot configuration sync issues across app, worker, and CLI processes.
Solution