Skip to content

Conversation

@ashwanthgoli
Copy link
Contributor

@ashwanthgoli ashwanthgoli commented Dec 2, 2024

What this PR does / why we need it:

  • Adds scheduler service with a basic run loop that reports lag metrics and plans jobs.
  • Adds a job planner using time range based strategy

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR
Copy link
Member

@owen-d owen-d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks like a good start. Left a couple small nits but happy to get this merged & iterate on top of it.

return err
}

if err := s.publishLagMetrics(lag); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiny nit: this looks coupled to the GroupLag call -- let's instead implement a scheduler.grouplag() method which defers to the offset reader and afterwards updates metrics -- or just put the metrics in the OffsetReader itself. It's cleaner that way and more likely to be resilient to refactoring changes.

@ashwanthgoli ashwanthgoli marked this pull request as ready for review December 2, 2024 13:11
@ashwanthgoli ashwanthgoli requested a review from a team as a code owner December 2, 2024 13:11
@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Dec 2, 2024
@owen-d owen-d merged commit ad322c0 into main Dec 3, 2024
59 checks passed
@owen-d owen-d deleted the block-scheduler branch December 3, 2024 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories

2 participants