Files
tasks/api/enums/v1/fairness_state.go-helpers.pb.go
Jacob MoodyandGitHub 7d1a144404 auto enabling priority and fairness (#8650)
## What changed?
Add a new dynamic config for Auto Enabling fairness and priority if we
see the relevant tasks coming in.

## Why?
Seamlessly start to transition users who start using the fields over to
the new code path.

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

## Potential risks
Due to storing this in the userdata we are using that interface a bit
more, we also need to change the initialization such that we start it
before being able to substantiate the defaultQ, this change in
initialization might have unintended side effects that I'm not currently
seeing.
2026-01-06 14:40:23 -06:00

27 lines
716 B
Go

// Code generated by protoc-gen-go-helpers. DO NOT EDIT.
package enums
import (
"fmt"
)
var (
FairnessState_shorthandValue = map[string]int32{
"Unspecified": 0,
"V0": 1,
"V1": 2,
"V2": 3,
}
)
// FairnessStateFromString parses a FairnessState value from either the protojson
// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to FairnessState
func FairnessStateFromString(s string) (FairnessState, error) {
if v, ok := FairnessState_value[s]; ok {
return FairnessState(v), nil
} else if v, ok := FairnessState_shorthandValue[s]; ok {
return FairnessState(v), nil
}
return FairnessState(0), fmt.Errorf("%s is not a valid FairnessState", s)
}