jsonio

package
v0.0.0-...-ba30bcd Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: BSD-3-Clause Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoldResults

type GoldResults struct {
	// GitHash, if provided, can be used to derive the CommitID.
	GitHash string `json:"gitHash"`
	// CommitID will be used as the CommitID when storing this data (GitHash may be ignored).
	CommitID string `json:"commit_id"`
	// CommitMetadata, if provided, will be used to help link a CommitID to the information about
	// the codebase at the time the test that produced this data was run. E.g. What version of
	// the code and/or dependencies was compiled to run the tests. This may be something like a
	// URL to either link directly or fetch additional information from.
	CommitMetadata string `json:"commit_metadata"`

	Key     map[string]string `json:"key"`
	Results []Result          `json:"results"`

	// These indicate the results were ingested from a TryJob.
	// ChangelistID and PatchsetID correspond to code_review.Changelist.SystemID and
	// code_review.Patchset.Order, respectively
	ChangelistID     string `json:"change_list_id"`
	PatchsetOrder    int    `json:"patch_set_order"`
	PatchsetID       string `json:"patch_set_id"`
	CodeReviewSystem string `json:"crs"`

	// TryJobID corresponds to continuous_integration.TryJob.SystemID
	TryJobID                    string `json:"try_job_id"`
	ContinuousIntegrationSystem string `json:"cis"`

	// Legacy fields for tryjob support - keep these around until a few months after Skia's dm
	// is updated to produce the new format in case we want to re-ingest old results
	// (after that, TryJob results that old probably won't matter)
	// If ChangelistID is set, these will be ignored.
	BuildBucketID      string `json:"buildbucket_build_id"`
	GerritChangelistID string `json:"issue"`
	GerritPatchset     string `json:"patchset"`
}

GoldResults is the top level structure to capture the the results of a rendered test to be processed by Gold.

func (*GoldResults) UpdateLegacyFields

func (g *GoldResults) UpdateLegacyFields() error

UpdateLegacyFields takes data from old, legacy fields and copies it into the newer equivalents. This lets us import older data.

func (*GoldResults) Validate

func (g *GoldResults) Validate() error

Validate validates the instance of GoldResult to make sure it is self consistent.

type Result

type Result struct {
	// In the event of a conflict, the key/values in Result.Key will override Options, which
	// override the GoldResults.Key.
	Key     map[string]string `json:"key"      validate:"required"`
	Options map[string]string `json:"options"  validate:"required"`
	Digest  types.Digest      `json:"md5"      validate:"required"`
}

Result holds the individual result of one test.

Jump to

Keyboard shortcuts

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