mirror of
https://github.com/tiennm99/openai-status-bot.git
synced 2026-10-11 03:13:41 +00:00
Swap the Redis datastore for MongoDB via mongo-driver v2. New internal/mongostore mirrors the old redisstore type/constant names so consumers change only the import qualifier; document model collapses the multi-key subscriber/settings and per-event delivery sets into single-doc operations and a TTL-indexed delivery collection. Config now requires MONGODB_URI (Atlas) with MONGODB_DATABASE selecting dev vs prod on one cluster; REDIS_URL removed. Compose files run bot-only against Atlas. Default tests stay Docker-free (poller/bot use fakes, mongostore unit tests are pure-logic); a gated //go:build integration suite covers the real backend via testcontainers.
2.3 KiB
2.3 KiB
date, status
| date | status |
|---|---|
| 2026-06-23 | monitoring |
Component ID Monitoring Report
Summary
We saw a component notification like:
Component: Embeddings
Status: unknown -> Operational
Current decision: monitor next incidents/component updates before changing storage behavior.
Findings
- Component checkpoints are stored in MongoDB as
component_id -> last_status. - MongoDB collection:
component_statuses(document ID is component ID,statusfield holds the last seen status). - Component names are not stored in that checkpoint document.
- Component names come from live OpenAI
summary.jsonduring each poll. - The bot compares component status by
component.ID, then formats the alert withcomponent.Name. - Incident
page_idis not used to detect components. page_ididentifies the OpenAI status page, not a specific component.unknown -> Operationalmeans current component found, but no previous checkpoint existed for that component ID.
Possible Problem
OpenAI/Statuspage may have changed, recreated, or migrated the component ID.
If component ID changed:
- Bot treats the component as new.
- Previous status becomes
unknown. - Old MongoDB component ID remains unused.
- Component-filtered subscriptions using old ID may stop matching.
- Unfiltered component subscriptions still receive updates.
Other possible causes:
- MongoDB checkpoint was cleared or partially lost.
metacollection hasinitializeddocument whilecomponent_statusescollection is missing entries.- OpenAI added a new component.
Current State
- No code change now.
- Monitor upcoming incidents and component updates.
- Compare current OpenAI component IDs with stored MongoDB component IDs (in
component_statusescollection). - Decide later whether ID-only storage is enough.
Future Options
- Keep ID-based storage if OpenAI component IDs prove stable.
- Store component name alongside ID for easier debugging.
- Add name fallback/alias logic if component IDs change in practice.
- Make component-filtered subscriptions survive ID changes by matching name when ID missing.
Unresolved Questions
- Did OpenAI actually change the component ID?
- Are old component IDs present in MongoDB but absent from current
summary.json? - Should component subscriptions survive ID changes by matching component name?