delivery-kid: log once when PICKIPEDIA_BOT_PASSWORD is missing#92
Merged
jMyles merged 1 commit intoJun 1, 2026
Merged
Conversation
The pickipedia_client snapshot path silently no-op'd from cryptograss#87 deploy until today — _get_site() returned None when PICKIPEDIA_BOT_PASSWORD was empty, with no log line to surface the gap. We only found it by deductive reasoning ("the page doesn't exist, the hook should have fired, where would the snapshot have logged about that") rather than by reading a single explicit log entry. Add a logger.warning the first time we hit that branch, gated on a module-level _warned_missing_creds flag so we warn once per process rather than on every snapshot attempt. Future deployments where someone forgets to wire the env var (or the vault key gets renamed, as in cryptograss#91) will surface in `docker logs pinning-service` immediately. No behavior change for the cred-present path — exactly the same fast-return when _site is cached.
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.
What
When `pickipedia_client._get_site()` is called with no bot password set, it returned `None` silently — no log line, no signal, no diagnostic. This is how the silent no-op since #87 went undetected for weeks.
Add a single `logger.warning` the first time we hit that branch, gated on a module-level `_warned_missing_creds` flag so we warn once per process rather than spamming logs on every snapshot attempt.
Why now
The snapshot path went silent for weeks. We found the gap by deductive reasoning ("the page doesn't exist, the hook should have fired, where would the snapshot have logged about that") rather than by reading a single explicit log entry. Future deployments where someone forgets to wire the env var (or the vault key gets renamed like #91 just did) will now surface in `docker logs pinning-service` immediately.
Behavior
Follow-up that came out of this debugging session
The decision in #87 to reuse the `Magent@magent` BotPassword from blue-railroad-import was a tactical shortcut. Different subsystem, different runtime, different code path — should ideally be a different bot identity (`DeliveryKid@delivery-kid` or similar) for clear attribution in wiki edit history. Filing as a separate issue rather than bundling.