taskname

package
v0.0.0-...-d850389 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: BSD-3-Clause Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SCHEMA_FROM_GIT = map[string]*Schema{
	"BazelBuild":  {Keys: []string{"label", "config", "host"}, OptionalKeys: []string(nil), RecurseRoles: []string(nil)},
	"BazelTest":   {Keys: []string{"task_driver", "label", "build_config", "host"}, OptionalKeys: []string{"test_config"}, RecurseRoles: []string(nil)},
	"Build":       {Keys: []string{"os", "compiler", "target_arch", "configuration"}, OptionalKeys: []string{"extra_config"}, RecurseRoles: []string(nil)},
	"BuildStats":  {Keys: []string{"os", "compiler", "target_arch", "configuration"}, OptionalKeys: []string{"extra_config"}, RecurseRoles: []string(nil)},
	"Canary":      {Keys: []string{"project"}, OptionalKeys: []string(nil), RecurseRoles: []string(nil)},
	"CodeSize":    {Keys: []string{"binary_name", "os", "compiler", "target_arch", "configuration"}, OptionalKeys: []string{"extra_config"}, RecurseRoles: []string(nil)},
	"Housekeeper": {Keys: []string{"frequency"}, OptionalKeys: []string{"extra_config"}, RecurseRoles: []string(nil)},
	"Infra":       {Keys: []string{"frequency"}, OptionalKeys: []string{"extra_config"}, RecurseRoles: []string(nil)},
	"Perf":        {Keys: []string{"os", "compiler", "model", "cpu_or_gpu", "cpu_or_gpu_value", "arch", "configuration", "test_filter"}, OptionalKeys: []string{"extra_config"}, RecurseRoles: []string(nil)},
	"Test":        {Keys: []string{"os", "compiler", "model", "cpu_or_gpu", "cpu_or_gpu_value", "arch", "configuration", "test_filter"}, OptionalKeys: []string{"extra_config"}, RecurseRoles: []string(nil)},
	"Upload":      {Keys: []string(nil), OptionalKeys: []string(nil), RecurseRoles: []string{"Build", "BuildStats", "Perf", "Test"}},
}
View Source
var SEPARATOR_FROM_GIT = "-"

Functions

This section is empty.

Types

type MockTaskNameParser

type MockTaskNameParser struct {
	mock.Mock
}

func NewMockTaskNameParser

func NewMockTaskNameParser() *MockTaskNameParser

NewMockTaskNameParser returns a pointer to a newly created struct. We return the pointer because we want to make sure the methods on mock.Mock stay accessible, e.g. m.On()

func (*MockTaskNameParser) ParseTaskName

func (m *MockTaskNameParser) ParseTaskName(name string) (map[string]string, error)

type Schema

type Schema struct {
	// Key names, in order, for this role.
	Keys []string `json:"keys"`

	// Optional key names, in order, for this role. These come after Keys
	// and RecurseRoles in task names.
	OptionalKeys []string `json:"optional_keys"`

	// Recursively apply one of these roll names to the schema (eg.
	// "Upload-Test-*").  The keys from the sub-role are applied to this
	// role.
	RecurseRoles []string `json:"recurse_roles"`
}

Schema is a sub-struct of taskNameParser.

type TaskNameParser

type TaskNameParser interface {
	ParseTaskName(name string) (map[string]string, error)
}

TaskNameParser parses a builder/task name into its constituent parts See https://skia.googlesource.com/skia/+show/master/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.json

func DefaultTaskNameParser

func DefaultTaskNameParser() TaskNameParser

DefaultTaskNameParser creates a TaskNameParser using the schema created by gen_schema.go.

Jump to

Keyboard shortcuts

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