Documentation ¶
Overview ¶
Package rerun handles rerun for a build.
Index ¶
- Constants
- func CapPriority(priority int32) int32
- func CreateRerunBuildModel(c context.Context, build *buildbucketpb.Build, rerunType model.RerunBuildType, ...) (*model.CompileRerunBuild, error)
- func OffsetPriorityBasedOnRunDuration(c context.Context, priority int32, cfa *model.CompileFailureAnalysis) (int32, error)
- func TriggerRerun(c context.Context, options *TriggerOptions) (*buildbucketpb.Build, error)
- func UpdateCompileRerunStatus(c context.Context, bbid int64) error
- func UpdateTestRerunStatus(ctx context.Context, build *buildbucketpb.Build) error
- type TriggerOptions
Constants ¶
const ( // Baseline priority PriorityCulpritVerificationHighConfidence = 100 PriorityCulpritVerificationMediumConfidence = 120 PriorityCulpritVerificationLowConfidence = 140 PriorityNthSection = 130 PriorityTestFailure = 160 // Offset priority PriorityTreeClosureOffset = -70 PriorityShortBuildOffset = -20 PriorityMediumBuildOffset = -10 PriorityLongBuildOffset = 0 PriorityVeryLongBuildOffset = 40 PriorityAnalysisTriggeredByNonSheriffsOffset = -5 PriorityAnalysisTriggeredBySheriffsOffset = -10 PriorityFlakyBuilderOffset = 50 PriorityAnotherVerificationBuildExistOffset = 20 PrioritySuspectInMultipleFailedBuildOffset = -20 PrioritySuspectIsRevertedOffset = 25 PriorityNthSectionNoSuspectOffset = -10 PriorityScheduleOnSameBotOffset = -15 )
These constants are used for offsetting the buildbucket run priortity The priority ranges from 20 - 255. Lower number means higher priority. See go/luci-bisection-run-prioritization for more details.
Variables ¶
This section is empty.
Functions ¶
func CapPriority ¶
CapPriority caps priority into the range [20..255]
func CreateRerunBuildModel ¶
func CreateRerunBuildModel(c context.Context, build *buildbucketpb.Build, rerunType model.RerunBuildType, suspect *model.Suspect, nsa *model.CompileNthSectionAnalysis, priority int32) (*model.CompileRerunBuild, error)
CreateRerunBuildModel creates a CompileRerunBuild (and SingleRerun) in datastore
func OffsetPriorityBasedOnRunDuration ¶
func OffsetPriorityBasedOnRunDuration(c context.Context, priority int32, cfa *model.CompileFailureAnalysis) (int32, error)
OffsetPriorityBasedOnRunDuration offsets the priority based on run duration. See go/luci-bisection-run-prioritization We based on the duration of the failed build to adjust the priority We favor faster builds than longer builds
func TriggerRerun ¶
func TriggerRerun(c context.Context, options *TriggerOptions) (*buildbucketpb.Build, error)
TriggerRerun triggers a rerun build given the options.
func UpdateCompileRerunStatus ¶
UpdateCompileRerunStatus updates the start/end time and status of rerun builds and single rerun (when we received buildbucket pubsub messages)
func UpdateTestRerunStatus ¶
func UpdateTestRerunStatus(ctx context.Context, build *buildbucketpb.Build) error
UpdateTestRerunStatus is called when we receive updates from buildbucket for test rerun build.
Types ¶
type TriggerOptions ¶
type TriggerOptions struct { // The builder we should trigger the rerun on. Required. Builder *buildbucketpb.BuilderID // The gitiles commit for the revision that we want to run the rerun build. Required. GitilesCommit *buildbucketpb.GitilesCommit // The buildbucket ID that the rerun build should copy the properties // and dimension from. Required. SampleBuildID int64 // Extra properties we want the rerun build to have. ExtraProperties map[string]any // Extra dimensions we want the rerun build to have. ExtraDimensions map[string]string // Priority of the rerun build. Priority int32 }
TriggerOptions contains information how the rerun should be triggered.