v0.0.0-...-e560ebb Latest Latest

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type BoardModel

type BoardModel struct {
	BuildTarget string `json:"build_target"`
	Model       string `json:"model"`

BoardModel is a combined build target and model. It is used for models that aren't present in any metadata.json file that we read.

type FindFirmwarePathResult

type FindFirmwarePathResult struct {
	Image    string
	FullPath gs.Path

FindFirmwarePathResult is the result of a search in Google Storage.

type Reader

type Reader struct {
	// contains filtered or unexported fields

Reader reads metadata.json files from google storage and caches the result.

func (*Reader) FindFirmwarePath

func (r *Reader) FindFirmwarePath(board string, milestone int, tip int, branch int, branchBranch string) (*FindFirmwarePathResult, error)

FindFirmwarePath finds the latest milestone associated with a given firmware image.

func (*Reader) Init

func (r *Reader) Init(ctx context.Context, t http.RoundTripper, unmarshaler jsonpb.Unmarshaler, tempPrefix string) error

Init creates a new Google Storage Client. TODO(gregorynisbet): make it possible to initialize a test gsClient as well

func (*Reader) RemoteFileExists

func (r *Reader) RemoteFileExists(remotePath gs.Path) error

RemoteFileExists checks for the existence and nonzero size of a given path in Google Storage.

func (*Reader) ValidateConfig

func (r *Reader) ValidateConfig(ctx context.Context, sv *labPlatform.StableVersions) (*ValidationResult, error)

ValidateConfig takes a stable version protobuf and attempts to validate every entry.

type ValidationResult

type ValidationResult struct {
	// Non-Lowercase entries
	NonLowercaseEntries []string `json:"non_lowercase_entries"`
	// MissingBoards are the boards that don't have a metadata file in Google Storage.
	MissingBoards []string `json:"missing_boards"`
	// FailedToLookup are board/model pairs that aren't present in the descriptions fetched from Google Storage.
	FailedToLookup []*BoardModel `json:"failed_to_lookup"`
	// InvalidVersions is the list of entries where the version in the config file does not match Google Storage.
	InvalidVersions []*VersionMismatch `json:"invalid_versions"`

ValidationResult is a summary of the result of validating a stable version config file.

func (*ValidationResult) AnomalyCount

func (r *ValidationResult) AnomalyCount() int

AnomalyCount counts the total number of issues found in the results summary.

func (*ValidationResult) RemoveAllowedDUTs

func (r *ValidationResult) RemoveAllowedDUTs()

RemoveAllowedDUTs removes DUTs that are exempted from the validation error summary. examples include labstations

type VersionMismatch

type VersionMismatch struct {
	BuildTarget string `json:"build_target"`
	Model       string `json:"model"`
	Wanted      string `json:"wanted"`
	Got         string `json:"got"`

VersionMismatch is a manifestation of a mismatched firmware version. For the purposes of analyzing the stable version file, we always assume that the CrOS version is correct and that the firmware version is potentially out of sync with it, rather than the other way around.

Jump to

Keyboard shortcuts

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