Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Block scheduler scaffolding #15198

Merged
merged 10 commits into from
Dec 2, 2024
Merged

feat: Block scheduler scaffolding #15198

merged 10 commits into from
Dec 2, 2024

Conversation

owen-d
Copy link
Member

@owen-d owen-d commented Dec 2, 2024

Block Builder Package Refactoring

This PR restructures the Block Builder package to improve modularity and testability. The changes establish a clear separation of concerns and lay the groundwork for future enhancements.

Please see the new Architecture.md for diagrams & in depth changes.

Key Changes

Package Restructuring

  • Split pkg/blockbuilder into three focused subpackages:
    • types/: Core interfaces and shared data structures
    • scheduler/: Job queue and scheduling logic
    • builder/: Worker implementation and transport layer

Interface Improvements

  • Introduced clear interface boundaries between components:
    • Worker: Job processing and status reporting
    • Scheduler: Job distribution and worker management
    • Transport: Communication layer abstraction

Types

  • Centralized type definitions in types package

Documentation

  • Updated architecture.md with comprehensive package structure
  • Added detailed component diagrams
  • Documented design principles and interactions

Testing

  • Added support for in-memory transport for testing

Followups

  • Integrating the existing builder into the worker interface
  • Introducing grpc as a transport
  • Metrics/o11y for some of the new constructs
  • a scheduler implementation using these
  • service.Service support for said scheduler

@owen-d owen-d requested a review from a team as a code owner December 2, 2024 04:50
@owen-d owen-d changed the title Block scheduler feature: Block scheduler scaffolding Dec 2, 2024
Copy link
Contributor

@ashwanthgoli ashwanthgoli left a comment

Choose a reason for hiding this comment

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

lgtm

@ashwanthgoli ashwanthgoli changed the title feature: Block scheduler scaffolding feat: Block scheduler scaffolding Dec 2, 2024
@owen-d owen-d merged commit a10140d into grafana:main Dec 2, 2024
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants