querygs

package
v0.0.0-...-3c039c4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 chromiumos_test_image.tar.xz 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 chromiumos_test_image.tar.xz 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"`
	// MissingBoardModels are the board+models that don't have a metadata file in Google Storage.
	MissingBoardModels []*BoardModel `json:"missing_board_models"`
	// InvalidFaftVersions is the list of FAFT entries.
	InvalidFaftVersions []*VersionMismatch `json:"invalid_faft_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.

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