Repository navigation
Update end_time_prometheus on every Prometheus fetch - #686
Merged
Merged
Conversation
The field lost its writer in the SQL migration of the prometheus scraper when the interval-based fetch was dropped; only init_insert() still synced it, and that does not run in the fetch/parse pipeline. Set it with set_auto_end_time() at the end of every prometheus poll, including polls with no job left to fetch.
Avoids re-indenting the fetch loop, trims the end-time comment, and documents that the fetch commands advance the cluster watermarks.
nurbal
approved these changes
Oct 1, 2026
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.
clusters.end_time_prometheusstops advancing even though Prometheus scraping keeps running: the SQL rewrite of the prometheus scraper dropped theset_auto_end_time()call, leavinginit_insert()(python -m sarc.db) as the only writer — a command outside the fetch/parse pipeline.end_time_sacctwas unaffected because the sacct scraper still updates it.The fetch now updates the field on every poll, including polls with no job left to fetch. It records the last successful poll, not a data coverage horizon. The cache-based resync stays as a repair path, and the field recovers on the first poll after deployment.