shreds: flag lagging publishers on the shred publishers page#666
Open
SinaVafadar wants to merge 4 commits into
Open
shreds: flag lagging publishers on the shred publishers page#666SinaVafadar wants to merge 4 commits into
SinaVafadar wants to merge 4 commits into
Conversation
Pulls validators reported as not Healthy from dzf_data.lagged_validators and annotates matching shred publishers with a new Lagging column. Adds dzf_data database plumbing (config, env var, API wiring) and a non-fatal lookup in FetchPublisherCheckData so the page still renders if the table is unavailable.
|
🔗 Preview: https://pr-666.data.malbeclabs.com |
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.
Summary
/dz/shreds/publishers) that flags validators reported as notHealthyindzf_data.lagged_validators.Healthyvalue from the table) is shown in the cell and on hover, and the column is sortable.dzf_dataClickHouse database (config default,CLICKHOUSE_DZF_DATA_DBenv override, and API plumbing) so the handler can read the table.Details
FetchPublisherCheckDatanow joins publishers againstdzf_data.lagged_validatorsbyvalidator_vote_public_key, selecting rows wherestatus != 'Healthy'. Matching publishers are annotated withlaggingandlagging_status. The lookup is non-fatal — if the table is unavailable the page still renders without lagging annotations. Because the logic lives inFetchPublisherCheckData, the background page cache picks up the new fields automatically.Testing Verification
PublisherCheckhandler tests pass; the lagged-validators lookup degrades gracefully when the table is absent in the test DB (logged warning, publishers returned unannotated).