bugupdater

package
v0.0.0-...-ecc8568 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package bugupdater defines a task for updating a project's LUCI Analysis bugs in response to the latest cluster metrics. Bugs are auto-opened, auto-verified and have their priorities adjusted according to the LUCI project's bug management policies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTaskHandler

func RegisterTaskHandler(srv *server.Server, uiBaseURL string) error

RegisterTaskHandler registers the handler for bug update tasks. uiBaseURL is the base URL for the UI, without trailing slash, e.g. "https://luci-milo.appspot.com".

func Schedule

func Schedule(ctx context.Context, task *taskspb.UpdateBugs) error

Schedule enqueues a task to update bugs for the given LUCI Project.

Types

type Handler

type Handler struct {
	// GCPProject is the GCP Cloud Project Name, e.g. luci-analysis.
	GCPProject string
	// UIBaseURL is the base URL for the UI, without trailing slash, e.g.
	// "https://luci-milo.appspot.com".
	UIBaseURL string
	// Whether bug updates should be simulated. Only used in local
	// development when UpdateBug(...) is called directly from the
	// cron handler.
	Simulate bool
}

Handler provide a method to handle bug update tasks.

func (Handler) UpdateBugs

func (h Handler) UpdateBugs(ctx context.Context, task *taskspb.UpdateBugs) (retErr error)

UpdateBugs handles the given bug update task.

Jump to

Keyboard shortcuts

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