Documentation
¶
Overview ¶
Package baseline holds the baseline report summary data and the functions to interact with the results service, backed by CloudFront and S3 storage bucket, serving summarized results from CI. "Baseline" results are valid/accepted CI executions. The results are processed and consumed by OPCT CLI 'report' command to compare the results of the validation tests. Those are CI results from reference installations which are used to compare the results from custom executions targeting to inference persistent failures, helping to isolate: - Flaky tests - Permanent failures - Test environment issues
Index ¶
- func ListObjects(svc *s3.S3, bucketRegion, bucketName, path string) ([]*s3.Object, error)
- type BaselineConfig
- func (brs *BaselineConfig) CreateBaselineIndex() error
- func (brs *BaselineConfig) GetBuffer() *BaselineData
- func (brs *BaselineConfig) GetLatestRawSummaryFromPlatformWithFallback(ocpRelease, platformType string) error
- func (brs *BaselineConfig) GetLatestSummaryByPlatform(ocpRelease, platformType string) error
- func (brs *BaselineConfig) GetSummaryByName(name string) ([]byte, error)
- func (brs *BaselineConfig) ReadReportSummaryFromAPI(path string) ([]byte, error)
- func (brs *BaselineConfig) ReadReportSummaryIndexFromAPI() (*baselineIndex, error)
- func (brs *BaselineConfig) UploadBaseline(filePath, resPath string, meta map[string]string, dryRun bool) error
- type BaselineData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaselineConfig ¶
type BaselineConfig struct {
// contains filtered or unexported fields
}
BaselineReport is the struct that holds the baseline report data pre-processed and saved in the bucket.
func NewBaselineReportSummary ¶
func NewBaselineReportSummary() *BaselineConfig
NewBaselineReportSummary creates a new BaselineConfig struct with the default configuration allowing customization to chage the S3 storage used in the management tasks. TODO deprecate the environment variables when backend is fully migrated to dedicated AWS account.
func (*BaselineConfig) CreateBaselineIndex ¶
func (brs *BaselineConfig) CreateBaselineIndex() error
CreateBaselineIndex list all object from S3 Bucket, extract metadata, and calculate the latest by release and platform type, creating a index.json object.
func (*BaselineConfig) GetBuffer ¶
func (brs *BaselineConfig) GetBuffer() *BaselineData
func (*BaselineConfig) GetLatestRawSummaryFromPlatformWithFallback ¶
func (brs *BaselineConfig) GetLatestRawSummaryFromPlatformWithFallback(ocpRelease, platformType string) error
GetLatestRawSummaryFromPlatformWithFallback reads the latest summary report from the OPCT report service, trying to get the latest summary from the specified platform, and fallback to "None", and "AWS", when available.
func (*BaselineConfig) GetLatestSummaryByPlatform ¶
func (brs *BaselineConfig) GetLatestSummaryByPlatform(ocpRelease, platformType string) error
GetLatestSummaryByPlatform reads the latest summary report from the OPCT report service, trying to retrieve from release and platform. ocpRelease is the OpenShift major version, like "4.7", "4.8", etc.
func (*BaselineConfig) GetSummaryByName ¶
func (brs *BaselineConfig) GetSummaryByName(name string) ([]byte, error)
func (*BaselineConfig) ReadReportSummaryFromAPI ¶
func (brs *BaselineConfig) ReadReportSummaryFromAPI(path string) ([]byte, error)
ReadReportSummaryFromAPI reads the summary report from the external URL.
func (*BaselineConfig) ReadReportSummaryIndexFromAPI ¶
func (brs *BaselineConfig) ReadReportSummaryIndexFromAPI() (*baselineIndex, error)
ReadReportSummaryIndexFromAPI reads the summary report index from the OPCT report URL.
func (*BaselineConfig) UploadBaseline ¶
type BaselineData ¶
type BaselineData struct {
// contains filtered or unexported fields
}
BaselineData is the struct that holds the baseline data. This struct exists to parse the ReportSummary retrieved from S3. The data is the same structure as the internal/report/data.go.ReportData, although it isn't possible to unmarshall while the cyclic dependencies isn't resolved between packages: - internal/report - internal/opct/summary
func (*BaselineData) GetPriorityFailuresFromPlugin ¶
func (bd *BaselineData) GetPriorityFailuresFromPlugin(pluginName string) ([]string, error)
GetPriorityFailuresFromPlugin returns the priority failures from a specific plugin. The priority failures are the failures that are marked as priority in the baseline report. It should be a temporary function while marshaling the data from the AP isn't possible.
func (*BaselineData) GetRawData ¶
func (bd *BaselineData) GetRawData() []byte
func (*BaselineData) GetSetupTags ¶
func (bd *BaselineData) GetSetupTags() (map[string]interface{}, error)
func (*BaselineData) SetRawData ¶
func (bd *BaselineData) SetRawData(data []byte)