Files
tasks/chasm/lib/scheduler/gen/schedulerpb/v1/message.go-helpers.pb.go
Lina JodoinandGitHub a646b2d5ef [Scheduler] Introduce EventLog for internal history (#10258)
I'm sending the review for the mechanism (and an example callsite), and
I'll send out a review that makes use of it throughout the scheduler
code afterwards.

## What changed?
- CHASM scheduler components each parent a new EventLog component, which
we'll use to record decision logic details that are normally too spammy
for logs.
- No plan to expose this through any APIs just yet; it isn't meant to be
customer-facing (though, I am thinking about how we can make it easy for
dev success to get at)

## Why?
- V1 debugging was often done through use of the workflow's event
history; without an analogue for V2, it's difficult to get a clear
picture of how the logic arrived at a certain output state.
- Info logging in the same capacity would likely be too spammy for our
observability system.
- It's difficult to trace a complete picture for an individual schedule
*over time* using just Loki. Schedules are often long-lived, with state
transitions taking place in short blips over periods of days or weeks.
Being able to get a complete list on demand for a relevant scheduler
will greatly improve debugging time.

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

## Potential risks
- This could increase scheduler state size, however:
- V2 already measures notably lighter on storage than V1 (not to
mention, no event history data whatsoever)
- Log is bounded to max 30 messages per component (usually scheduler,
generator, invoker) of max 1000 characters each (e.g., ~100KB), as a
safety mechanism
- Most messages logged will be small and informational, not large state
dumps (e.g., "scheduler unpaused", "generator scheduled for ...").
- Backfillers each get their own log, which shares a Backfiller's
lifecycle.
2026-05-27 15:21:52 -07:00

340 lines
8.8 KiB
Go

// Code generated by protoc-gen-go-helpers. DO NOT EDIT.
package schedulerpb
import (
"google.golang.org/protobuf/proto"
)
// Marshal an object of type SchedulerState to the protobuf v3 wire format
func (val *SchedulerState) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type SchedulerState from the protobuf v3 wire format
func (val *SchedulerState) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *SchedulerState) Size() int {
return proto.Size(val)
}
// Equal returns whether two SchedulerState values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *SchedulerState) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *SchedulerState
switch t := that.(type) {
case *SchedulerState:
that1 = t
case SchedulerState:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type WorkflowMigrationState to the protobuf v3 wire format
func (val *WorkflowMigrationState) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type WorkflowMigrationState from the protobuf v3 wire format
func (val *WorkflowMigrationState) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *WorkflowMigrationState) Size() int {
return proto.Size(val)
}
// Equal returns whether two WorkflowMigrationState values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *WorkflowMigrationState) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *WorkflowMigrationState
switch t := that.(type) {
case *WorkflowMigrationState:
that1 = t
case WorkflowMigrationState:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type GeneratorState to the protobuf v3 wire format
func (val *GeneratorState) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type GeneratorState from the protobuf v3 wire format
func (val *GeneratorState) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *GeneratorState) Size() int {
return proto.Size(val)
}
// Equal returns whether two GeneratorState values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *GeneratorState) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *GeneratorState
switch t := that.(type) {
case *GeneratorState:
that1 = t
case GeneratorState:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type InvokerState to the protobuf v3 wire format
func (val *InvokerState) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type InvokerState from the protobuf v3 wire format
func (val *InvokerState) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *InvokerState) Size() int {
return proto.Size(val)
}
// Equal returns whether two InvokerState values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *InvokerState) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *InvokerState
switch t := that.(type) {
case *InvokerState:
that1 = t
case InvokerState:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type BackfillerState to the protobuf v3 wire format
func (val *BackfillerState) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type BackfillerState from the protobuf v3 wire format
func (val *BackfillerState) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *BackfillerState) Size() int {
return proto.Size(val)
}
// Equal returns whether two BackfillerState values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *BackfillerState) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *BackfillerState
switch t := that.(type) {
case *BackfillerState:
that1 = t
case BackfillerState:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type LastCompletionResult to the protobuf v3 wire format
func (val *LastCompletionResult) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type LastCompletionResult from the protobuf v3 wire format
func (val *LastCompletionResult) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *LastCompletionResult) Size() int {
return proto.Size(val)
}
// Equal returns whether two LastCompletionResult values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *LastCompletionResult) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *LastCompletionResult
switch t := that.(type) {
case *LastCompletionResult:
that1 = t
case LastCompletionResult:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type SchedulerMigrationState to the protobuf v3 wire format
func (val *SchedulerMigrationState) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type SchedulerMigrationState from the protobuf v3 wire format
func (val *SchedulerMigrationState) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *SchedulerMigrationState) Size() int {
return proto.Size(val)
}
// Equal returns whether two SchedulerMigrationState values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *SchedulerMigrationState) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *SchedulerMigrationState
switch t := that.(type) {
case *SchedulerMigrationState:
that1 = t
case SchedulerMigrationState:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type EventLog to the protobuf v3 wire format
func (val *EventLog) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type EventLog from the protobuf v3 wire format
func (val *EventLog) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *EventLog) Size() int {
return proto.Size(val)
}
// Equal returns whether two EventLog values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *EventLog) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *EventLog
switch t := that.(type) {
case *EventLog:
that1 = t
case EventLog:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type Event to the protobuf v3 wire format
func (val *Event) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type Event from the protobuf v3 wire format
func (val *Event) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *Event) Size() int {
return proto.Size(val)
}
// Equal returns whether two Event values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *Event) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *Event
switch t := that.(type) {
case *Event:
that1 = t
case Event:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}