Repository navigation
Conversation
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
@rain-marvin review |
|
⏳ Queued behind 12 other jobs, @JuaniRios. I'll post here when I start. |
|
🔎 Reviewing |
There was a problem hiding this comment.
This PR adds a Source dropdown to the five generated liquidity boards. Every liq_* selector now reads job=~"$source", where exporter (the default) is the sidecar job and bot is t0-liquidity|t0-liquidity-staging. The Bot light reads liq_up on the exporter source and the scrape's own up on the bot source. The generator still fails closed on any liq_ selector without exactly that matcher, and --check passes for all five boards.
Overall read: correct and safe to ship ahead of the bot release. With the default on exporter, every query resolves to the same series as before. The Grafana Cloud Monitoring datasource passes a single-value custom variable into PromQL unescaped, so the | alternation works. PromQL anchors the regex, so bot never matches the exporter job. The tab links set includeVars, so the source carries between tabs. Two lanes rated the scrape job names and the exporter path a public-repo exposure. Both verifiers rejected that: the base commit already publishes every one of those names and paths. What remains is small: one hand-built data link drops the new variable, one CI doc still describes the old pin, and a docs claim about the Stage 4 flip is not accurate. Not checked here: the board on live Grafana with Source = bot, which needs the bot release on staging, as the PR says.
claude-opus-5-5 · high · 1 h 26 min
|
@coderabbitai approve |
✅ Action performedComments resolved and changes approved. |
af7ab30 to
88fad70
Compare
82c3844 to
4030f3b
Compare
88fad70 to
78bbf85
Compare
4030f3b to
1aa64e8
Compare

Part of RAI-3095.
Adds a
Sourcevariable to the five liquidity boards, so they can readliq_*from the exporter sidecar or from the bot's own/metrics. Item 6a of the RAI-2998 stack, part 1 of 6.Live effect: the board gets a
Sourcedropdown. It opens onexporter, so it shows what it shows today · Risk: low (read-only queries, a revert undoes it) · Ships: on merge, through theobservabilityworkflowWhy
The bot now serves the same
liq_*names as the exporter. Stage 3 compares them side by side, and Stage 4 moves the board to the bot. One dropdown does both.Decisions
exporterstays the default until Stage 4. Stage 4 flips it inSOURCE_VAR, one line.botis the regext0-liquidity|t0-liquidity-staging, since prod and staging scrape the bot under different job names.$envalready picks the project, and PromQL anchors the regex, so it never matchest0-liquidity-exporter.pin_liqnow writesjob=~"$source", and the generator still fails closed: anyliq_selector without exactly that matcher stops the build.liq_up, so the bot source reads the scrape's ownup. The exporter source never falls back toup, because the exporter'supsays nothing about the bot (a stopped exporter shows no data, not a red bot).Δdeviation columns still readliq_*_ratio_deviation, which the bot does not emit, so they are empty onbot. observability: show the liquidity inventory as per-chain Grafana tables [RAI-3098] #1690 removes them.Proof
gen-t0-liquidity.py --checkpasses. Everyliq_selector on the five boards readsjob=~"$source".upfallback on the exporter source (fixed) and a ticket key in a comment (fixed).Source = bot. Needs the bot release on staging.Merge conditions
Same as the stack below. The board deploys on merge to master through the
observabilityworkflow, not with a bot release. That is safe before the bot releases:Sourcedefaults toexporter, so the published board reads the same series as today.