Documentation ¶
Overview ¶
Package revertculprit contains the logic to revert culprits
Package revertculprit contains the logic to revert culprits
Index ¶
- Constants
- Variables
- func HasIrrevertibleAuthor(ctx context.Context, change *gerritpb.ChangeInfo) (bool, error)
- func RegisterTaskClass(srv *server.Server, luciAnalysisProjectFunc func(luciProject string) string) error
- func ScheduleTestFailureTask(ctx context.Context, analysisID int64) error
- func TakeCulpritAction(ctx context.Context, culpritModel *model.Suspect) error
- type ActionType
- type AnalysisClient
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 ¶
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 TakeCulpritAction ¶
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)
}
Click to show internal directories.
Click to hide internal directories.