revertculprit

package
v0.0.0-...-128afb8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package revertculprit contains the logic to revert culprits

Package revertculprit contains the logic to revert culprits

Index

Constants

View Source
const (
	// LUCI Bisection created a revert for this culprit
	ActionTypeCreateRevert ActionType = "create_revert"
	// LUCI Bisection submitted a revert for this culprit
	ActionTypeSubmitRevert = "submit_revert"
	// LUCI Bisection commented on the culprit
	ActionTypeCommentCulprit = "comment_culprit"
	// LUCI Bisection commented on a revert for this culprit
	ActionTypeCommentRevert = "comment_revert"
)

Variables

View Source
var CompileFailureTasks = tq.RegisterTaskClass(tq.TaskClass{
	ID:        "revert-culprit-action",
	Prototype: (*taskpb.RevertCulpritTask)(nil),
	Queue:     "revert-culprit-action",
	Kind:      tq.NonTransactional,
})
View Source
var TestFailureTasks = tq.RegisterTaskClass(tq.TaskClass{
	ID:        "test-failure-culprit-action",
	Prototype: (*taskpb.TestFailureCulpritActionTask)(nil),
	Queue:     "test-failure-culprit-action",
	Kind:      tq.NonTransactional,
})

Functions

func HasIrrevertibleAuthor

func HasIrrevertibleAuthor(ctx context.Context, change *gerritpb.ChangeInfo) (bool, error)

HasIrrevertibleAuthor returns whether the change's commit author is one that should not have any of their changes reverted, e.g. DEPS rollers that auto-commit code.

func RegisterTaskClass

func RegisterTaskClass(srv *server.Server, luciAnalysisProjectFunc func(luciProject string) string) error

RegisterTaskClass registers the task class for tq dispatcher

func ScheduleTestFailureTask

func ScheduleTestFailureTask(ctx context.Context, analysisID int64) error

func TakeCulpritAction

func TakeCulpritAction(ctx context.Context, culpritModel *model.Suspect) error

TakeCulpritAction attempts to comment culprit, comment revert, create revert and commit revert for a culprit when the culprit satisfies the critieria of the action. A culprit is identified as a result of a heuristic analysis or an nthsection analysis.

Types

type ActionType

type ActionType string

type AnalysisClient

type AnalysisClient interface {
	TestIsUnexpectedConsistently(ctx context.Context, project string, key lucianalysis.TestVerdictKey, sinceCommitPosition int64) (bool, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL