Documentation
¶
Overview ¶
Package jobrunaggregatorlib is a generated GoMock package.
Package jobrunaggregatorlib is a generated GoMock package.
Index ¶
- Constants
- Variables
- func AddUnavailability(runningTotals, toAdd map[string]AvailabilityResult)
- func GetMasterNodesUpdatedStatusFromClusterData(clusterData map[string]string) string
- func GetPayloadTagFromProwJob(prowJob *prowjobv1.ProwJob) string
- func GetProwJobClient() (*prowjobclientset.Clientset, error)
- func GetServerAvailabilityResultsFromDirectData(backendDisruptionData map[string]string) map[string]AvailabilityResult
- func GetUTCDay(in time.Time) time.Time
- func NoArgs(cmd *cobra.Command, args []string) error
- func OutputTestCaseFailures(parents []string, suite *junit.TestSuite)
- func RequiredDisruptionTests() sets.String
- func WaitAndGetAllFinishedJobRuns(ctx context.Context, jobRunGetter JobRunGetter, waiter JobRunWaiter, ...) ([]jobrunaggregatorapi.JobRunInfo, []jobrunaggregatorapi.JobRunInfo, []string, ...)
- func WaitUntilTime(ctx context.Context, readyAt time.Time) error
- type AggregationJobClient
- type AvailabilityResult
- type BackendDisruption
- type BackendDisruptionList
- type BigQueryDataCoordinates
- type BigQueryInserter
- type BigQueryJobRunWaiter
- type CIDataClient
- type CIGCSClient
- type ClusterData
- type ClusterJobRunWaiter
- type GoogleAuthenticationFlags
- func (f *GoogleAuthenticationFlags) BindFlags(fs *pflag.FlagSet)
- func (f *GoogleAuthenticationFlags) NewBigQueryClient(ctx context.Context, projectID string) (*bigquery.Client, error)
- func (f *GoogleAuthenticationFlags) NewCIGCSClient(ctx context.Context, gcsBucketName string) (CIGCSClient, error)
- func (f *GoogleAuthenticationFlags) NewGCSClient(ctx context.Context) (*storage.Client, error)
- func (f *GoogleAuthenticationFlags) Validate() error
- type HistoricalDataClient
- type JobLister
- type JobRunGetter
- type JobRunIdentifier
- type JobRunLocator
- func NewPayloadAnalysisJobLocator(jobName string, prowJobMatcher ProwJobMatcherFunc, startTime time.Time, ...) JobRunLocator
- func NewPayloadAnalysisJobLocatorForPR(jobName, matchID, matchLabel string, startTime time.Time, ...) JobRunLocator
- func NewPayloadAnalysisJobLocatorForReleaseController(jobName, payloadTag string, startTime time.Time, ...) JobRunLocator
- type JobRunWaiter
- type MockCIDataClient
- func (m *MockCIDataClient) EXPECT() *MockCIDataClientMockRecorder
- func (m *MockCIDataClient) GetBackendDisruptionRowCountByJob(ctx context.Context, jobName, masterNodesUpdated string) (uint64, error)
- func (m *MockCIDataClient) GetBackendDisruptionStatisticsByJob(ctx context.Context, jobName, masterNodesUpdated string) ([]jobrunaggregatorapi.BackendDisruptionStatisticsRow, error)
- func (m *MockCIDataClient) GetJobRunForJobNameAfterTime(ctx context.Context, jobName string, targetTime time.Time) (string, error)
- func (m *MockCIDataClient) GetJobRunForJobNameBeforeTime(ctx context.Context, jobName string, targetTime time.Time) (string, error)
- func (m *MockCIDataClient) GetJobVariants(ctx context.Context, jobName string) (*jobrunaggregatorapi.JobRowWithVariants, error)
- func (m *MockCIDataClient) GetLastJobRunEndTimeFromTable(ctx context.Context, table string) (*time.Time, error)
- func (m *MockCIDataClient) ListAggregatedTestRunsForJob(ctx context.Context, frequency, jobName string, startDay time.Time) ([]jobrunaggregatorapi.AggregatedTestRunRow, error)
- func (m *MockCIDataClient) ListAlertHistoricalData(ctx context.Context) ([]*jobrunaggregatorapi.AlertHistoricalDataRow, error)
- func (m *MockCIDataClient) ListAllJobs(ctx context.Context) ([]jobrunaggregatorapi.JobRow, error)
- func (m *MockCIDataClient) ListAllJobsWithVariants(ctx context.Context) ([]jobrunaggregatorapi.JobRowWithVariants, error)
- func (m *MockCIDataClient) ListAllKnownAlerts(ctx context.Context) ([]*jobrunaggregatorapi.KnownAlertRow, error)
- func (m *MockCIDataClient) ListDisruptionHistoricalData(ctx context.Context) ([]jobrunaggregatorapi.HistoricalData, error)
- func (m *MockCIDataClient) ListProwJobRunsSince(ctx context.Context, since *time.Time) ([]*jobrunaggregatorapi.TestPlatformProwJobRow, error)
- func (m *MockCIDataClient) ListReleaseTags(ctx context.Context) (map[string]bool, error)
- func (m *MockCIDataClient) ListReleases(ctx context.Context) ([]jobrunaggregatorapi.ReleaseRow, error)
- func (m *MockCIDataClient) ListUploadedJobRunIDsSinceFromTable(ctx context.Context, table string, since *time.Time) (map[string]bool, error)
- type MockCIDataClientMockRecorder
- func (mr *MockCIDataClientMockRecorder) GetBackendDisruptionRowCountByJob(ctx, jobName, masterNodesUpdated any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) GetBackendDisruptionStatisticsByJob(ctx, jobName, masterNodesUpdated any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) GetJobRunForJobNameAfterTime(ctx, jobName, targetTime any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) GetJobRunForJobNameBeforeTime(ctx, jobName, targetTime any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) GetJobVariants(ctx, jobName any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) GetLastJobRunEndTimeFromTable(ctx, table any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) ListAggregatedTestRunsForJob(ctx, frequency, jobName, startDay any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) ListAlertHistoricalData(ctx any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) ListAllJobs(ctx any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) ListAllJobsWithVariants(ctx any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) ListAllKnownAlerts(ctx any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) ListDisruptionHistoricalData(ctx any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) ListProwJobRunsSince(ctx, since any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) ListReleaseTags(ctx any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) ListReleases(ctx any) *gomock.Call
- func (mr *MockCIDataClientMockRecorder) ListUploadedJobRunIDsSinceFromTable(ctx, table, since any) *gomock.Call
- type MockCIGCSClient
- func (m *MockCIGCSClient) EXPECT() *MockCIGCSClientMockRecorder
- func (m *MockCIGCSClient) ReadJobRunFromGCS(ctx context.Context, jobGCSRootLocation, jobName, jobRunID string, ...) (jobrunaggregatorapi.JobRunInfo, error)
- func (m *MockCIGCSClient) ReadRelatedJobRuns(ctx context.Context, ...) ([]jobrunaggregatorapi.JobRunInfo, error)
- type MockCIGCSClientMockRecorder
- type ProwJobMatcherFunc
- type RowCount
- type TestCaseDetails
- type TestCaseFailure
- type TestCaseNeverExecuted
- type TestCasePass
- type TestCaseSkip
- type UnifiedTestRunRowIterator
Constants ¶
const ( BigQueryProjectID = "openshift-ci-data-analysis" CIDataSetID = "ci_data" ReleaseTableName = "ReleaseTags" ReleaseRepositoryTableName = "ReleaseRepositories" ReleaseJobRunTableName = "ReleaseJobRuns" ReleasePullRequestsTableName = "ReleasePullRequests" )
const ( // ProwJobAggregationIDLabel is the name of the label for the aggregation id in prow job ProwJobAggregationIDLabel = "release.openshift.io/aggregation-id" // ProwJobPayloadInvocationIDLabel is the name of the label for the payload invocation id in prow job ProwJobPayloadInvocationIDLabel = "release.openshift.io/aggregation-id" )
const ( JobStateQuerySourceBigQuery = "bigquery" JobStateQuerySourceCluster = "cluster" // ProwJobJobNameAnnotation is the annotation in prowJob for the Job Name. // It is used to match relevant job names for different aggregators ProwJobJobNameAnnotation = "prow.k8s.io/job" )
const (
// ProwJobPayloadTagAnnotation is the name of the annotation for the payload tag in prow job
ProwJobPayloadTagAnnotation = "release.openshift.io/tag"
)
Variables ¶
var ( // JobSearchWindowStartOffset defines the start offset of the job search window. JobSearchWindowStartOffset time.Duration = 1 * time.Hour // JobSearchWindowEndOffset defines the end offset of the job search window. JobSearchWindowEndOffset time.Duration = 4 * time.Hour )
var (
KnownQuerySources = sets.Set[string]{JobStateQuerySourceBigQuery: sets.Empty{}, JobStateQuerySourceCluster: sets.Empty{}}
)
var TestSuitesSeparator = "|||"
TestSuitesSeparator defines the separator to use when combine multiple level of suite names
Functions ¶
func AddUnavailability ¶
func AddUnavailability(runningTotals, toAdd map[string]AvailabilityResult)
func GetMasterNodesUpdatedStatusFromClusterData ¶
GetMasterNodesUpdatedStatusFromClusterData takes multiple file contents as a copy of the ClusterData file is created for multiple test phases (upgrade / conformance) in the same manor that multiple disruption files are created for the multiple phases
func GetPayloadTagFromProwJob ¶
GetPayloadTagFromProwJob gets the payload tag from prow jobs.
func GetProwJobClient ¶
func GetProwJobClient() (*prowjobclientset.Clientset, error)
func GetServerAvailabilityResultsFromDirectData ¶
func GetServerAvailabilityResultsFromDirectData(backendDisruptionData map[string]string) map[string]AvailabilityResult
func OutputTestCaseFailures ¶
OutputTestCaseFailures prints detailed test failures
func RequiredDisruptionTests ¶
func WaitAndGetAllFinishedJobRuns ¶
func WaitAndGetAllFinishedJobRuns(ctx context.Context, jobRunGetter JobRunGetter, waiter JobRunWaiter, outputDir string, variantInfo string) ([]jobrunaggregatorapi.JobRunInfo, []jobrunaggregatorapi.JobRunInfo, []string, []string, error)
WaitAndGetAllFinishedJobRuns waits for all job runs to finish until timeToStopWaiting. It returns all finished and unfinished job runs
Types ¶
type AggregationJobClient ¶
type AggregationJobClient interface {
// GetJobRunForJobNameBeforeTime returns the jobRun closest to, but BEFORE, the time provided.
// This is useful for bounding a query of GCS buckets in a window.
// nil means that no jobRun was found before the specified time.
GetJobRunForJobNameBeforeTime(ctx context.Context, jobName string, targetTime time.Time) (string, error)
// GetJobRunForJobNameAfterTime returns the jobRun closest to, but AFTER, the time provided.
// This is useful for bounding a query of GCS buckets in a window.
// nil means that no jobRun as found after the specified time.
GetJobRunForJobNameAfterTime(ctx context.Context, jobName string, targetTime time.Time) (string, error)
// GetBackendDisruptionRowCountByJob gets the row count for disruption data for one job
GetBackendDisruptionRowCountByJob(ctx context.Context, jobName, masterNodesUpdated string) (uint64, error)
// GetBackendDisruptionStatisticsByJob gets the mean and p95 disruption per backend from the week from 10 days ago.
GetBackendDisruptionStatisticsByJob(ctx context.Context, jobName, masterNodesUpdated string) ([]jobrunaggregatorapi.BackendDisruptionStatisticsRow, error)
ListAggregatedTestRunsForJob(ctx context.Context, frequency, jobName string, startDay time.Time) ([]jobrunaggregatorapi.AggregatedTestRunRow, error)
}
AggregationJobClient client view used by the aggregation job
type AvailabilityResult ¶
type AvailabilityResult struct {
ServerName string
}
type BackendDisruption ¶
type BackendDisruption struct {
// Name ensure self-identification
Name string
// ConnectionType is New or Reused
ConnectionType string
// LoadBalancerType is external/internal/service-network/localhost
// we're only interested in
LoadBalancerType string
DisruptedDuration v1.Duration
DisruptionMessages []string
}
type BackendDisruptionList ¶
type BackendDisruptionList struct {
// BackendDisruptions is keyed by name to make the consumption easier
BackendDisruptions map[string]*BackendDisruption
}
type BigQueryDataCoordinates ¶
func NewBigQueryDataCoordinates ¶
func NewBigQueryDataCoordinates() *BigQueryDataCoordinates
func (*BigQueryDataCoordinates) BindFlags ¶
func (f *BigQueryDataCoordinates) BindFlags(fs *pflag.FlagSet)
func (*BigQueryDataCoordinates) SubstituteDataSetLocation ¶
func (f *BigQueryDataCoordinates) SubstituteDataSetLocation(query string) string
func (*BigQueryDataCoordinates) Validate ¶
func (f *BigQueryDataCoordinates) Validate() error
type BigQueryInserter ¶
func NewDryRunInserter ¶
func NewDryRunInserter(out io.Writer, table string) BigQueryInserter
type BigQueryJobRunWaiter ¶
type BigQueryJobRunWaiter struct {
JobRunGetter JobRunGetter
TimeToStopWaiting time.Time
}
func (*BigQueryJobRunWaiter) Wait ¶
func (w *BigQueryJobRunWaiter) Wait(ctx context.Context) ([]JobRunIdentifier, error)
type CIDataClient ¶
type CIDataClient interface {
JobLister
AggregationJobClient
HistoricalDataClient
// these deal with release tags
ListReleaseTags(ctx context.Context) (map[string]bool, error)
// GetLastJobRunEndTimeFromTable returns the last uploaded job runs EndTime in the given table.
GetLastJobRunEndTimeFromTable(ctx context.Context, table string) (*time.Time, error)
ListUploadedJobRunIDsSinceFromTable(ctx context.Context, table string, since *time.Time) (map[string]bool, error)
ListAllKnownAlerts(ctx context.Context) ([]*jobrunaggregatorapi.KnownAlertRow, error)
// ListReleases lists all releases from the new release table
ListReleases(ctx context.Context) ([]jobrunaggregatorapi.ReleaseRow, error)
}
func NewCIDataClient ¶
func NewCIDataClient(dataCoordinates BigQueryDataCoordinates, client *bigquery.Client) CIDataClient
func NewRetryingCIDataClient ¶
func NewRetryingCIDataClient(delegate CIDataClient) CIDataClient
type CIGCSClient ¶
type CIGCSClient interface {
ReadJobRunFromGCS(ctx context.Context, jobGCSRootLocation, jobName, jobRunID string, logger logrus.FieldLogger) (jobrunaggregatorapi.JobRunInfo, error)
ReadRelatedJobRuns(ctx context.Context, jobName, gcsPrefix, startingJobRunID, endingJobRunID string,
matcherFunc ProwJobMatcherFunc) ([]jobrunaggregatorapi.JobRunInfo, error)
}
type ClusterData ¶
type ClusterData struct {
MasterNodesUpdated string
}
ClusterData is defined in origin/platformidentification/types.go it is duplicated in a minimized form here
type ClusterJobRunWaiter ¶
type ClusterJobRunWaiter struct {
ProwJobClient *prowjobclientset.Clientset
TimeToStopWaiting time.Time
ProwJobMatcherFunc ProwJobMatcherFunc
}
ClusterJobRunWaiter implements a waiter that will wait for job completion based on live stats for prow jobs in the CI cluster. 1. It uses kube informers/cache mechanism to list all prowJob CRs 2. Filter out irrelevant prowJobs 3. Check if CompletionTime for prowJob Status is set. 4. If all jobs have CompletionTime set, wait is over. Otherwise, repeat above steps by polling.
Polling only queries cache with no api-server interactions.
func (*ClusterJobRunWaiter) Wait ¶
func (w *ClusterJobRunWaiter) Wait(ctx context.Context) ([]JobRunIdentifier, error)
type GoogleAuthenticationFlags ¶
type GoogleAuthenticationFlags struct {
TokenFileLocation string
// location of a credential file described by https://cloud.google.com/docs/authentication/production
GoogleServiceAccountCredentialFile string
GoogleOAuthClientCredentialFile string
}
func NewGoogleAuthenticationFlags ¶
func NewGoogleAuthenticationFlags() *GoogleAuthenticationFlags
func (*GoogleAuthenticationFlags) BindFlags ¶
func (f *GoogleAuthenticationFlags) BindFlags(fs *pflag.FlagSet)
func (*GoogleAuthenticationFlags) NewBigQueryClient ¶
func (*GoogleAuthenticationFlags) NewCIGCSClient ¶
func (f *GoogleAuthenticationFlags) NewCIGCSClient(ctx context.Context, gcsBucketName string) (CIGCSClient, error)
func (*GoogleAuthenticationFlags) NewGCSClient ¶
func (*GoogleAuthenticationFlags) Validate ¶
func (f *GoogleAuthenticationFlags) Validate() error
type HistoricalDataClient ¶
type HistoricalDataClient interface {
ListDisruptionHistoricalData(ctx context.Context) ([]jobrunaggregatorapi.HistoricalData, error)
ListAlertHistoricalData(ctx context.Context) ([]*jobrunaggregatorapi.AlertHistoricalDataRow, error)
}
type JobLister ¶
type JobLister interface {
ListAllJobsWithVariants(ctx context.Context) ([]jobrunaggregatorapi.JobRowWithVariants, error)
GetJobVariants(ctx context.Context, jobName string) (*jobrunaggregatorapi.JobRowWithVariants, error)
ListAllJobs(ctx context.Context) ([]jobrunaggregatorapi.JobRow, error)
// ListProwJobRunsSince lists from the testplatform BigQuery dataset in a separate project from
// where we normally operate. Job runs are inserted here just after their GCS artifacts are uploaded.
// This function is used for importing runs we do not yet have into our tables.
ListProwJobRunsSince(ctx context.Context, since *time.Time) ([]*jobrunaggregatorapi.TestPlatformProwJobRow, error)
}
type JobRunGetter ¶
type JobRunGetter interface {
// GetRelatedJobRuns gets all related job runs for analysis
GetRelatedJobRuns(ctx context.Context) ([]jobrunaggregatorapi.JobRunInfo, error)
// GetRelatedJobRunsFromIdentifiers passes along minimal information known about the jobs already so that we can skip
// querying and go directly to fetching the full job details when GetRelatedJobRuns is called
GetRelatedJobRunsFromIdentifiers(ctx context.Context, jobRunIdentifiers []JobRunIdentifier) ([]jobrunaggregatorapi.JobRunInfo, error)
}
type JobRunIdentifier ¶
func GetStaticJobRunInfo ¶
func GetStaticJobRunInfo(staticRunInfoJSON, staticRunInfoPath string) ([]JobRunIdentifier, error)
type JobRunLocator ¶
type JobRunLocator interface {
FindRelatedJobs(ctx context.Context) ([]jobrunaggregatorapi.JobRunInfo, error)
FindJob(ctx context.Context, jobRunID string) (jobrunaggregatorapi.JobRunInfo, error)
}
func NewPayloadAnalysisJobLocator ¶
func NewPayloadAnalysisJobLocator( jobName string, prowJobMatcher ProwJobMatcherFunc, startTime time.Time, ciDataClient AggregationJobClient, ciGCSClient CIGCSClient, gcsBucketName string, gcsPrefix string) JobRunLocator
func NewPayloadAnalysisJobLocatorForPR ¶
func NewPayloadAnalysisJobLocatorForPR( jobName, matchID, matchLabel string, startTime time.Time, ciDataClient AggregationJobClient, ciGCSClient CIGCSClient, gcsBucketName string, gcsPrefix string) JobRunLocator
func NewPayloadAnalysisJobLocatorForReleaseController ¶
func NewPayloadAnalysisJobLocatorForReleaseController( jobName, payloadTag string, startTime time.Time, ciDataClient AggregationJobClient, ciGCSClient CIGCSClient, gcsBucketName string) JobRunLocator
type JobRunWaiter ¶
type JobRunWaiter interface {
// Wait waits until all job runs finish, or time out
Wait(ctx context.Context) ([]JobRunIdentifier, error)
}
type MockCIDataClient ¶
type MockCIDataClient struct {
// contains filtered or unexported fields
}
MockCIDataClient is a mock of CIDataClient interface.
func NewMockCIDataClient ¶
func NewMockCIDataClient(ctrl *gomock.Controller) *MockCIDataClient
NewMockCIDataClient creates a new mock instance.
func (*MockCIDataClient) EXPECT ¶
func (m *MockCIDataClient) EXPECT() *MockCIDataClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCIDataClient) GetBackendDisruptionRowCountByJob ¶
func (m *MockCIDataClient) GetBackendDisruptionRowCountByJob(ctx context.Context, jobName, masterNodesUpdated string) (uint64, error)
GetBackendDisruptionRowCountByJob mocks base method.
func (*MockCIDataClient) GetBackendDisruptionStatisticsByJob ¶
func (m *MockCIDataClient) GetBackendDisruptionStatisticsByJob(ctx context.Context, jobName, masterNodesUpdated string) ([]jobrunaggregatorapi.BackendDisruptionStatisticsRow, error)
GetBackendDisruptionStatisticsByJob mocks base method.
func (*MockCIDataClient) GetJobRunForJobNameAfterTime ¶
func (m *MockCIDataClient) GetJobRunForJobNameAfterTime(ctx context.Context, jobName string, targetTime time.Time) (string, error)
GetJobRunForJobNameAfterTime mocks base method.
func (*MockCIDataClient) GetJobRunForJobNameBeforeTime ¶
func (m *MockCIDataClient) GetJobRunForJobNameBeforeTime(ctx context.Context, jobName string, targetTime time.Time) (string, error)
GetJobRunForJobNameBeforeTime mocks base method.
func (*MockCIDataClient) GetJobVariants ¶
func (m *MockCIDataClient) GetJobVariants(ctx context.Context, jobName string) (*jobrunaggregatorapi.JobRowWithVariants, error)
GetJobVariants mocks base method.
func (*MockCIDataClient) GetLastJobRunEndTimeFromTable ¶
func (m *MockCIDataClient) GetLastJobRunEndTimeFromTable(ctx context.Context, table string) (*time.Time, error)
GetLastJobRunEndTimeFromTable mocks base method.
func (*MockCIDataClient) ListAggregatedTestRunsForJob ¶
func (m *MockCIDataClient) ListAggregatedTestRunsForJob(ctx context.Context, frequency, jobName string, startDay time.Time) ([]jobrunaggregatorapi.AggregatedTestRunRow, error)
ListAggregatedTestRunsForJob mocks base method.
func (*MockCIDataClient) ListAlertHistoricalData ¶
func (m *MockCIDataClient) ListAlertHistoricalData(ctx context.Context) ([]*jobrunaggregatorapi.AlertHistoricalDataRow, error)
ListAlertHistoricalData mocks base method.
func (*MockCIDataClient) ListAllJobs ¶
func (m *MockCIDataClient) ListAllJobs(ctx context.Context) ([]jobrunaggregatorapi.JobRow, error)
ListAllJobs mocks base method.
func (*MockCIDataClient) ListAllJobsWithVariants ¶
func (m *MockCIDataClient) ListAllJobsWithVariants(ctx context.Context) ([]jobrunaggregatorapi.JobRowWithVariants, error)
ListAllJobsWithVariants mocks base method.
func (*MockCIDataClient) ListAllKnownAlerts ¶
func (m *MockCIDataClient) ListAllKnownAlerts(ctx context.Context) ([]*jobrunaggregatorapi.KnownAlertRow, error)
ListAllKnownAlerts mocks base method.
func (*MockCIDataClient) ListDisruptionHistoricalData ¶
func (m *MockCIDataClient) ListDisruptionHistoricalData(ctx context.Context) ([]jobrunaggregatorapi.HistoricalData, error)
ListDisruptionHistoricalData mocks base method.
func (*MockCIDataClient) ListProwJobRunsSince ¶
func (m *MockCIDataClient) ListProwJobRunsSince(ctx context.Context, since *time.Time) ([]*jobrunaggregatorapi.TestPlatformProwJobRow, error)
ListProwJobRunsSince mocks base method.
func (*MockCIDataClient) ListReleaseTags ¶
ListReleaseTags mocks base method.
func (*MockCIDataClient) ListReleases ¶
func (m *MockCIDataClient) ListReleases(ctx context.Context) ([]jobrunaggregatorapi.ReleaseRow, error)
ListReleases mocks base method.
type MockCIDataClientMockRecorder ¶
type MockCIDataClientMockRecorder struct {
// contains filtered or unexported fields
}
MockCIDataClientMockRecorder is the mock recorder for MockCIDataClient.
func (*MockCIDataClientMockRecorder) GetBackendDisruptionRowCountByJob ¶
func (mr *MockCIDataClientMockRecorder) GetBackendDisruptionRowCountByJob(ctx, jobName, masterNodesUpdated any) *gomock.Call
GetBackendDisruptionRowCountByJob indicates an expected call of GetBackendDisruptionRowCountByJob.
func (*MockCIDataClientMockRecorder) GetBackendDisruptionStatisticsByJob ¶
func (mr *MockCIDataClientMockRecorder) GetBackendDisruptionStatisticsByJob(ctx, jobName, masterNodesUpdated any) *gomock.Call
GetBackendDisruptionStatisticsByJob indicates an expected call of GetBackendDisruptionStatisticsByJob.
func (*MockCIDataClientMockRecorder) GetJobRunForJobNameAfterTime ¶
func (mr *MockCIDataClientMockRecorder) GetJobRunForJobNameAfterTime(ctx, jobName, targetTime any) *gomock.Call
GetJobRunForJobNameAfterTime indicates an expected call of GetJobRunForJobNameAfterTime.
func (*MockCIDataClientMockRecorder) GetJobRunForJobNameBeforeTime ¶
func (mr *MockCIDataClientMockRecorder) GetJobRunForJobNameBeforeTime(ctx, jobName, targetTime any) *gomock.Call
GetJobRunForJobNameBeforeTime indicates an expected call of GetJobRunForJobNameBeforeTime.
func (*MockCIDataClientMockRecorder) GetJobVariants ¶
func (mr *MockCIDataClientMockRecorder) GetJobVariants(ctx, jobName any) *gomock.Call
GetJobVariants indicates an expected call of GetJobVariants.
func (*MockCIDataClientMockRecorder) GetLastJobRunEndTimeFromTable ¶
func (mr *MockCIDataClientMockRecorder) GetLastJobRunEndTimeFromTable(ctx, table any) *gomock.Call
GetLastJobRunEndTimeFromTable indicates an expected call of GetLastJobRunEndTimeFromTable.
func (*MockCIDataClientMockRecorder) ListAggregatedTestRunsForJob ¶
func (mr *MockCIDataClientMockRecorder) ListAggregatedTestRunsForJob(ctx, frequency, jobName, startDay any) *gomock.Call
ListAggregatedTestRunsForJob indicates an expected call of ListAggregatedTestRunsForJob.
func (*MockCIDataClientMockRecorder) ListAlertHistoricalData ¶
func (mr *MockCIDataClientMockRecorder) ListAlertHistoricalData(ctx any) *gomock.Call
ListAlertHistoricalData indicates an expected call of ListAlertHistoricalData.
func (*MockCIDataClientMockRecorder) ListAllJobs ¶
func (mr *MockCIDataClientMockRecorder) ListAllJobs(ctx any) *gomock.Call
ListAllJobs indicates an expected call of ListAllJobs.
func (*MockCIDataClientMockRecorder) ListAllJobsWithVariants ¶
func (mr *MockCIDataClientMockRecorder) ListAllJobsWithVariants(ctx any) *gomock.Call
ListAllJobsWithVariants indicates an expected call of ListAllJobsWithVariants.
func (*MockCIDataClientMockRecorder) ListAllKnownAlerts ¶
func (mr *MockCIDataClientMockRecorder) ListAllKnownAlerts(ctx any) *gomock.Call
ListAllKnownAlerts indicates an expected call of ListAllKnownAlerts.
func (*MockCIDataClientMockRecorder) ListDisruptionHistoricalData ¶
func (mr *MockCIDataClientMockRecorder) ListDisruptionHistoricalData(ctx any) *gomock.Call
ListDisruptionHistoricalData indicates an expected call of ListDisruptionHistoricalData.
func (*MockCIDataClientMockRecorder) ListProwJobRunsSince ¶
func (mr *MockCIDataClientMockRecorder) ListProwJobRunsSince(ctx, since any) *gomock.Call
ListProwJobRunsSince indicates an expected call of ListProwJobRunsSince.
func (*MockCIDataClientMockRecorder) ListReleaseTags ¶
func (mr *MockCIDataClientMockRecorder) ListReleaseTags(ctx any) *gomock.Call
ListReleaseTags indicates an expected call of ListReleaseTags.
func (*MockCIDataClientMockRecorder) ListReleases ¶
func (mr *MockCIDataClientMockRecorder) ListReleases(ctx any) *gomock.Call
ListReleases indicates an expected call of ListReleases.
func (*MockCIDataClientMockRecorder) ListUploadedJobRunIDsSinceFromTable ¶
func (mr *MockCIDataClientMockRecorder) ListUploadedJobRunIDsSinceFromTable(ctx, table, since any) *gomock.Call
ListUploadedJobRunIDsSinceFromTable indicates an expected call of ListUploadedJobRunIDsSinceFromTable.
type MockCIGCSClient ¶
type MockCIGCSClient struct {
// contains filtered or unexported fields
}
MockCIGCSClient is a mock of CIGCSClient interface.
func NewMockCIGCSClient ¶
func NewMockCIGCSClient(ctrl *gomock.Controller) *MockCIGCSClient
NewMockCIGCSClient creates a new mock instance.
func (*MockCIGCSClient) EXPECT ¶
func (m *MockCIGCSClient) EXPECT() *MockCIGCSClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCIGCSClient) ReadJobRunFromGCS ¶
func (m *MockCIGCSClient) ReadJobRunFromGCS(ctx context.Context, jobGCSRootLocation, jobName, jobRunID string, logger logrus.FieldLogger) (jobrunaggregatorapi.JobRunInfo, error)
ReadJobRunFromGCS mocks base method.
func (*MockCIGCSClient) ReadRelatedJobRuns ¶
func (m *MockCIGCSClient) ReadRelatedJobRuns(ctx context.Context, jobName, gcsPrefix, startingJobRunID, endingJobRunID string, matcherFunc ProwJobMatcherFunc) ([]jobrunaggregatorapi.JobRunInfo, error)
ReadRelatedJobRuns mocks base method.
type MockCIGCSClientMockRecorder ¶
type MockCIGCSClientMockRecorder struct {
// contains filtered or unexported fields
}
MockCIGCSClientMockRecorder is the mock recorder for MockCIGCSClient.
func (*MockCIGCSClientMockRecorder) ReadJobRunFromGCS ¶
func (mr *MockCIGCSClientMockRecorder) ReadJobRunFromGCS(ctx, jobGCSRootLocation, jobName, jobRunID, logger any) *gomock.Call
ReadJobRunFromGCS indicates an expected call of ReadJobRunFromGCS.
func (*MockCIGCSClientMockRecorder) ReadRelatedJobRuns ¶
func (mr *MockCIGCSClientMockRecorder) ReadRelatedJobRuns(ctx, jobName, gcsPrefix, startingJobRunID, endingJobRunID, matcherFunc any) *gomock.Call
ReadRelatedJobRuns indicates an expected call of ReadRelatedJobRuns.
type ProwJobMatcherFunc ¶
ProwJobMatcherFunc defines a function signature for matching prow jobs. The function is used by different analyzers and lower layers to match jobs for relevant tasks. - for payload based aggregator, it matches with payload tags - for PR based aggregator, it matches with aggregation id or payload invocation id. - for test case analyzer, there are two levels of matching: one for matching jobs (based on names etc) while the other for matching job runs. The mechanism for matching job runs uses the above payload or PR based aggregator matching functions
It is kept this way to keep changes to the minimum.
func NewProwJobMatcherFuncForPR ¶
func NewProwJobMatcherFuncForPR(matchJobName, matchID, matchLabel string) ProwJobMatcherFunc
func NewProwJobMatcherFuncForReleaseController ¶
func NewProwJobMatcherFuncForReleaseController(matchJobName, matchPayloadTag string) ProwJobMatcherFunc
type TestCaseDetails ¶
type TestCaseDetails struct {
Name string
TestSuiteName string
// Summary is filled in during the pass/fail calculation
Summary string
Passes []TestCasePass
Failures []TestCaseFailure
Skips []TestCaseSkip
}
type TestCaseFailure ¶
type TestCaseNeverExecuted ¶
type TestCasePass ¶
type TestCaseSkip ¶
type UnifiedTestRunRowIterator ¶
type UnifiedTestRunRowIterator struct {
// contains filtered or unexported fields
}
func (*UnifiedTestRunRowIterator) Next ¶
func (it *UnifiedTestRunRowIterator) Next() (*jobrunaggregatorapi.UnifiedTestRunRow, error)