Documentation
¶
Index ¶
- func CarryForwardCumulativeSummaries(ctx context.Context, dbc *db.DB, currentDate civil.Date, releases []string) error
- func Write(ctx context.Context, dbc *db.DB, currentDate civil.Date, batch []JobRunResult) error
- type AnnotationRow
- type JobRunResult
- type PullRequestAssocRow
- type PullRequestRow
- type RunRow
- type TestRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CarryForwardCumulativeSummaries ¶
func CarryForwardCumulativeSummaries(ctx context.Context, dbc *db.DB, currentDate civil.Date, releases []string) error
CarryForwardCumulativeSummaries fills any gap days between the latest existing cumulative summary data and currentDate+1 (tomorrow) for each release. If the loader was down for multiple days, this catches up all missed days. Subsequent calls for the same date range are no-ops. Releases are processed in parallel with up to 4 workers.
func Write ¶
Write persists a batch of job run results to the database within a single transaction. It creates temp tables, copies raw rows via the COPY protocol, then INSERTs/UPSERTs into permanent tables including tests, suites, prow_job_run_tests, test_daily_totals, and test_cumulative_summaries.
Types ¶
type AnnotationRow ¶
type AnnotationRow struct {
ProwJobRunID uint
Key string
Value string
ProwJobRunRelease string
ProwJobRunTimestamp time.Time
}
AnnotationRow holds a key-value annotation for a prow job run.
type JobRunResult ¶
type JobRunResult struct {
Run RunRow
Annotations []AnnotationRow
PullRequests []PullRequestRow
PullRequestAssoc []PullRequestAssocRow
Tests []TestRow
}
JobRunResult aggregates all rows produced by processing a single prow job run.
type PullRequestAssocRow ¶
type PullRequestAssocRow struct {
ProwJobRunID uint
Link string
SHA string
ProwJobRunRelease string
ProwJobRunTimestamp time.Time
}
PullRequestAssocRow links a prow job run to a pull request.
type PullRequestRow ¶
type PullRequestRow struct {
Org string
Repo string
Link string
SHA string
Author string
Title string
Number int
MergedAt *time.Time
}
PullRequestRow holds pull request metadata to be upserted.
type RunRow ¶
type RunRow struct {
ID uint
Cluster string
Duration time.Duration
ProwJobID uint
ProwJobRelease string
URL string
GCSBucket string
Timestamp time.Time
OverallResult sippyprocessingv1.JobOverallResult
TestFailures int
TestFlakes int
Succeeded bool
Labels []string
}
RunRow holds a single prow job run to be persisted.