Documentation
¶
Index ¶
- func CreateOrUpdateErrorPattern(ctx context.Context, ep *ErrorPattern) error
- func GetCompatibilityMatrix(ctx context.Context, projectType string) ([]map[string]any, error)
- func IncrementSuccessCount(ctx context.Context, id int64) error
- func RecordTelemetry(ctx context.Context, t *WorkflowTelemetry) error
- func SeedErrorPatternsIfEmpty(ctx context.Context) error
- type ErrorPattern
- type SeedData
- type WorkflowTelemetry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdateErrorPattern ¶
func CreateOrUpdateErrorPattern(ctx context.Context, ep *ErrorPattern) error
CreateOrUpdateErrorPattern creates or updates an error pattern
func GetCompatibilityMatrix ¶
GetCompatibilityMatrix returns what works on which runners
func IncrementSuccessCount ¶
IncrementSuccessCount marks a solution as successful
func RecordTelemetry ¶
func RecordTelemetry(ctx context.Context, t *WorkflowTelemetry) error
RecordTelemetry records a workflow run result
Types ¶
type ErrorPattern ¶
type ErrorPattern struct {
ID int64 `xorm:"pk autoincr"`
Pattern string `xorm:"VARCHAR(255) NOT NULL INDEX"`
PatternRegex string `xorm:"TEXT"`
RunnerType string `xorm:"VARCHAR(50) INDEX"`
ProjectType string `xorm:"VARCHAR(100) INDEX"`
Framework string `xorm:"VARCHAR(100)"`
ErrorMessage string `xorm:"TEXT"`
Diagnosis string `xorm:"TEXT"`
Solution string `xorm:"TEXT"`
SolutionDiff string `xorm:"TEXT"`
OccurrenceCount int `xorm:"DEFAULT 1"`
SuccessCount int `xorm:"DEFAULT 0"`
CreatedUnix timeutil.TimeStamp `xorm:"created"`
UpdatedUnix timeutil.TimeStamp `xorm:"updated"`
}
ErrorPattern represents a known CI/CD error pattern with its solution
func GetErrorPatternByID ¶
func GetErrorPatternByID(ctx context.Context, id int64) (*ErrorPattern, error)
GetErrorPatternByID returns an error pattern by ID
func GetErrorPatterns ¶
func GetErrorPatterns(ctx context.Context, pattern, runnerType, projectType string) ([]*ErrorPattern, error)
GetErrorPatterns returns matching error patterns
func (ErrorPattern) TableName ¶
func (ErrorPattern) TableName() string
TableName returns the table name for ErrorPattern
type SeedData ¶
type SeedData struct {
Patterns []struct {
Pattern string `json:"pattern"`
RunnerType string `json:"runner_type"`
ProjectType string `json:"project_type"`
Framework string `json:"framework"`
ErrorMessage string `json:"error_message"`
Diagnosis string `json:"diagnosis"`
Solution string `json:"solution"`
} `json:"patterns"`
}
SeedData represents the structure of the seed JSON file
type WorkflowTelemetry ¶
type WorkflowTelemetry struct {
ID int64 `xorm:"pk autoincr"`
RunnerID int64 `xorm:"INDEX"`
RunnerName string `xorm:"VARCHAR(255) INDEX"`
JobID int64 `xorm:"INDEX"`
WorkflowName string `xorm:"VARCHAR(255)"`
ProjectType string `xorm:"VARCHAR(100) INDEX"`
Framework string `xorm:"VARCHAR(100)"`
Target string `xorm:"VARCHAR(100)"`
Status string `xorm:"VARCHAR(20) INDEX"`
ErrorPatternID int64 `xorm:"INDEX"`
DurationSeconds int
CreatedUnix timeutil.TimeStamp `xorm:"created INDEX"`
}
WorkflowTelemetry records workflow run results for compatibility tracking
func (WorkflowTelemetry) TableName ¶
func (WorkflowTelemetry) TableName() string
TableName returns the table name for WorkflowTelemetry
Source Files
¶
- error_pattern.go
- seed.go
Click to show internal directories.
Click to hide internal directories.