Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PostgresFunctions = []PostgresFunction{
{
Name: "job_results",
Definition: jobResultFunction,
},
{
Name: "test_results",
Definition: testResultFunction,
},
}
View Source
var PostgresMatViews = []PostgresView{ { Name: "prow_test_report_7d_matview", Definition: testReportMatView, IndexColumns: []string{"id", "name", "release", "variants", "suite_name"}, ReplaceStrings: map[string]string{ "|||START|||": "|||TIMENOW||| - INTERVAL '14 DAY'", "|||BOUNDARY|||": "|||TIMENOW||| - INTERVAL '7 DAY'", "|||END|||": "|||TIMENOW|||", }, }, { Name: "prow_test_report_2d_matview", Definition: testReportMatView, IndexColumns: []string{"id", "name", "release", "variants", "suite_name"}, ReplaceStrings: map[string]string{ "|||START|||": "|||TIMENOW||| - INTERVAL '9 DAY'", "|||BOUNDARY|||": "|||TIMENOW||| - INTERVAL '2 DAY'", "|||END|||": "|||TIMENOW|||", }, }, { Name: "prow_job_runs_report_matview", Definition: jobRunsReportMatView, IndexColumns: []string{"id"}, }, { Name: "prow_job_failed_tests_by_day_matview", Definition: prowJobFailedTestsMatView, IndexColumns: []string{"period", "prow_job_id", "test_name"}, ReplaceStrings: map[string]string{ "|||BY|||": "day", }, }, { Name: "prow_job_failed_tests_by_hour_matview", Definition: prowJobFailedTestsMatView, IndexColumns: []string{"period", "prow_job_id", "test_name"}, ReplaceStrings: map[string]string{ "|||BY|||": "hour", }, }, { Name: "payload_test_failures_14d_matview", Definition: payloadTestFailuresMatView, IndexColumns: []string{"release", "architecture", "stream", "prow_job_run_id", "test_id", "suite_id"}, ReplaceStrings: map[string]string{}, }, }
TODO: for historical sippy we need to specify the pinnedDate and not use NOW
View Source
var PostgresPartitionedTables = []PostgresView{
{
Name: "test_analysis_by_job_by_dates",
Definition: testAnalysisByJobByDatesTable,
},
}
PostgresPartitionedTables are special tables we do not let gorm manage due to very specific requirements (partitioning). Schema for these cannot be updated without a significant migration due to the partitioning.
View Source
var PostgresViews = []PostgresView{
{
Name: "prow_test_analysis_by_variant_14d_view",
Definition: testAnalysisByVariantView,
},
}
PostgresViews are regular, non-materialized views:
Functions ¶
func ParseGormLogLevel ¶
func ParseGormLogLevel(logLevel string) (gormlogger.LogLevel, error)
Types ¶
type DB ¶
type PostgresFunction ¶
type PostgresView ¶
type PostgresView struct {
// Name is the name of the materialized view in postgres.
Name string
// Definition is the material view definition.
Definition string
// ReplaceStrings is a map of strings we want to replace in the create view statement, allowing for re-use.
ReplaceStrings map[string]string
// IndexColumns are the columns to create a unique index for. Will be named idx_[Name] and automatically
// replaced if changes are made to these values. IndexColumns are required as we need them defined to be able to
// refresh materialized views concurrently. (avoiding locking reads for several minutes while we update)
IndexColumns []string
}
type SchemaHashType ¶
type SchemaHashType string
Directories
¶
| Path | Synopsis |
|---|---|
|
These types are used to decode information from ci-search, but we don't want to expose these for anyone else.
|
These types are used to decode information from ci-search, but we don't want to expose these for anyone else. |
Click to show internal directories.
Click to hide internal directories.