Documentation ¶
Overview ¶
Package dashapi defines data structures used in dashboard communication and provides client interface.
Index ¶
- Constants
- type AddBuildAssetsReq
- type Asset
- type AssetType
- type BisectResult
- type BugListItem
- type BugListReport
- type BugListReportStats
- type BugListResp
- type BugListUpdate
- type BugListUpdateCommand
- type BugNotif
- type BugNotification
- type BugReport
- type BugStatus
- type BugStatusReason
- type BugSubsystem
- type BugUpdate
- type BugUpdateReply
- type Build
- type BuildErrorReq
- type BuilderPollReq
- type BuilderPollResp
- type Commit
- type CommitPollResp
- type CommitPollResultReq
- type Crash
- type CrashFlags
- type CrashID
- type Dashboard
- func (dash *Dashboard) AddBuildAssets(req *AddBuildAssetsReq) error
- func (dash *Dashboard) BugList() (*BugListResp, error)
- func (dash *Dashboard) BuilderPoll(manager string) (*BuilderPollResp, error)
- func (dash *Dashboard) CommitPoll() (*CommitPollResp, error)
- func (dash *Dashboard) CreateUploadURL() (string, error)
- func (dash *Dashboard) JobDone(req *JobDoneReq) error
- func (dash *Dashboard) JobPoll(req *JobPollReq) (*JobPollResp, error)
- func (dash *Dashboard) JobReset(req *JobResetReq) error
- func (dash *Dashboard) LoadBug(id string) (*BugReport, error)
- func (dash *Dashboard) LoadFullBug(req *LoadFullBugReq) (*FullBugInfo, error)
- func (dash *Dashboard) LogError(name, msg string, args ...interface{})
- func (dash *Dashboard) LogToRepro(req *LogToReproReq) (*LogToReproResp, error)
- func (dash *Dashboard) NeedRepro(crash *CrashID) (bool, error)
- func (dash *Dashboard) NeededAssetsList() (*NeededAssetsResp, error)
- func (dash *Dashboard) NewTestJob(upd *TestPatchRequest) (*TestPatchReply, error)
- func (dash *Dashboard) Query(method string, req, reply interface{}) error
- func (dash *Dashboard) ReportBuildError(req *BuildErrorReq) error
- func (dash *Dashboard) ReportCrash(crash *Crash) (*ReportCrashResp, error)
- func (dash *Dashboard) ReportFailedRepro(crash *CrashID) error
- func (dash *Dashboard) ReportingPollBugs(typ string) (*PollBugsResponse, error)
- func (dash *Dashboard) ReportingPollClosed(ids []string) ([]string, error)
- func (dash *Dashboard) ReportingPollNotifications(typ string) (*PollNotificationsResponse, error)
- func (dash *Dashboard) ReportingUpdate(upd *BugUpdate) (*BugUpdateReply, error)
- func (dash *Dashboard) SaveCoverage(gcpURL string) (int, error)
- func (dash *Dashboard) SaveDiscussion(req *SaveDiscussionReq) error
- func (dash *Dashboard) UpdateReport(req *UpdateReportReq) error
- func (dash *Dashboard) UploadBuild(build *Build) error
- func (dash *Dashboard) UploadCommits(commits []Commit) error
- func (dash *Dashboard) UploadManagerStats(req *ManagerStatsReq) error
- type DashboardOpts
- type Discussion
- type DiscussionMessage
- type DiscussionSource
- type DiscussionType
- type FullBugInfo
- type JobDoneFlags
- type JobDoneReq
- type JobInfo
- type JobPollReq
- type JobPollResp
- type JobResetReq
- type JobType
- type LoadBugReq
- type LoadFullBugReq
- type LogEntry
- type LogToReproReq
- type LogToReproResp
- type LogToReproType
- type ManagerJobs
- type ManagerStatsReq
- type NeedReproResp
- type NeededAssetsResp
- type NewAsset
- type PollBugsRequest
- type PollBugsResponse
- type PollClosedRequest
- type PollClosedResponse
- type PollNotificationsRequest
- type PollNotificationsResponse
- type RecipientInfo
- type RecipientType
- type Recipients
- type Repo
- type ReportCrashResp
- type ReportElements
- type ReportType
- type ReproLevel
- type RequestCtor
- type RequestDoer
- type RequestLogger
- type SaveDiscussionReq
- type SimilarBugInfo
- type TestPatchReply
- type TestPatchRequest
- type UpdateReportReq
- type UserAgent
Constants ¶
const ( InvalidatedByRevokedRepro = BugStatusReason("invalid_no_repro") InvalidatedByNoActivity = BugStatusReason("invalid_no_activity") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddBuildAssetsReq ¶
type AssetType ¶
type AssetType string
const ( BootableDisk AssetType = "bootable_disk" NonBootableDisk AssetType = "non_bootable_disk" KernelObject AssetType = "kernel_object" KernelImage AssetType = "kernel_image" HTMLCoverageReport AssetType = "html_coverage_report" MountInRepro AssetType = "mount_in_repro" )
Asset types used throughout the system. DO NOT change them, this will break compatibility with DB content.
type BisectResult ¶
type BugListItem ¶
type BugListItem struct { ID string Title string Link string ReproLevel ReproLevel Hits int64 }
BugListItem represents a single bug from the BugListReport entity.
type BugListReport ¶
type BugListReport struct { ID string Created time.Time Config []byte Bugs []BugListItem TotalStats BugListReportStats PeriodStats BugListReportStats PeriodDays int Link string Subsystem string Maintainers []string Moderation bool }
type BugListReportStats ¶
type BugListResp ¶
type BugListResp struct {
List []string
}
type BugListUpdate ¶
type BugListUpdate struct { ID string // copied from BugListReport ExtID string Link string Command BugListUpdateCommand }
type BugListUpdateCommand ¶
type BugListUpdateCommand string
const ( BugListSentCmd BugListUpdateCommand = "sent" BugListUpdateCmd BugListUpdateCommand = "update" BugListUpstreamCmd BugListUpdateCommand = "upstream" BugListRegenerateCmd BugListUpdateCommand = "regenerate" )
type BugNotif ¶
type BugNotif int
const ( // Upstream bug into next reporting. // If the action succeeds, reporting sends BugStatusUpstream update. BugNotifUpstream BugNotif = iota // Bug needs to be closed as obsoleted. // If the action succeeds, reporting sends BugStatusInvalid update. BugNotifObsoleted // Bug fixing commit can't be discovered (wrong commit title). BugNotifBadCommit // New bug label has been assigned (only if enabled). // Text contains the custome message that needs to be delivered to the user. BugNotifLabel )
type BugNotification ¶
type BugNotification struct { Type BugNotif Namespace string Config []byte ID string ExtID string // arbitrary reporting ID forwarded from BugUpdate.ExtID Title string Text string // meaning depends on Type Label string // for BugNotifLabel Type specifies the exact label CC []string // deprecated in favor of Recipients Maintainers []string // deprecated in favor of Recipients Link string Recipients Recipients TreeJobs []*JobInfo // set for some BugNotifLabel // Public is what we want all involved people to see (e.g. if we notify about a wrong commit title, // people need to see it and provide the right title). Not public is what we want to send only // to a minimal set of recipients (our mailing list) (e.g. notification about an obsoleted bug // is mostly "for the record"). Public bool }
type BugReport ¶
type BugReport struct { Type ReportType BugStatus BugStatus Namespace string Config []byte ID string JobID string ExtID string // arbitrary reporting ID forwarded from BugUpdate.ExtID First bool // Set for first report for this bug (Type == ReportNew). Moderation bool NoRepro bool // We don't expect repro (e.g. for build/boot errors). Title string Link string // link to the bug on dashboard CreditEmail string // email for the Reported-by tag Maintainers []string // deprecated in favor of Recipients CC []string // deprecated in favor of Recipients Recipients Recipients OS string Arch string VMArch string UserSpaceArch string // user-space arch as kernel developers know it (rather than Go names) BuildID string BuildTime time.Time CompilerID string KernelRepo string KernelRepoAlias string KernelBranch string KernelCommit string KernelCommitTitle string KernelCommitDate time.Time KernelConfig []byte KernelConfigLink string SyzkallerCommit string Log []byte LogLink string LogHasStrace bool Report []byte ReportLink string ReproC []byte ReproCLink string ReproSyz []byte ReproSyzLink string ReproOpts []byte MachineInfo []byte MachineInfoLink string Manager string CrashID int64 // returned back in BugUpdate CrashTime time.Time NumCrashes int64 HappenedOn []string // list of kernel repo aliases CrashTitle string // job execution crash title Error []byte // job execution error ErrorLink string ErrorTruncated bool // full Error text is too large and was truncated PatchLink string BisectCause *BisectResult BisectFix *BisectResult Assets []Asset Subsystems []BugSubsystem ReportElements *ReportElements LabelMessages map[string]string // notification messages for bug labels }
BugReport describes a single bug. Used by dashboard external reporting.
type BugStatusReason ¶
type BugStatusReason string
type BugSubsystem ¶
type BugUpdate ¶
type BugUpdate struct { ID string // copied from BugReport JobID string // copied from BugReport ExtID string Link string Status BugStatus StatusReason BugStatusReason Labels []string // the reported labels ReproLevel ReproLevel DupOf string OnHold bool // If set for open bugs, don't upstream this bug. Notification bool // Reply to a notification. ResetFixCommits bool // Remove all commits (empty FixCommits means leave intact). FixCommits []string // Titles of commits that fix this bug. CC []string // Additional emails to add to CC list in future emails. CrashID int64 // This is a deprecated field, left here for backward compatibility. // The new interface that allows to report and unreport several crashes at the same time. // This is not relevant for emails, but may be important for external reportings. ReportCrashIDs []int64 UnreportCrashIDs []int64 }
type BugUpdateReply ¶
type Build ¶
type Build struct { Manager string ID string OS string Arch string VMArch string SyzkallerCommit string SyzkallerCommitDate time.Time CompilerID string KernelRepo string KernelBranch string KernelCommit string KernelCommitTitle string KernelCommitDate time.Time KernelConfig []byte Commits []string // see BuilderPoll FixCommits []Commit Assets []NewAsset }
Build describes all aspects of a kernel build.
type BuildErrorReq ¶
type BuilderPollReq ¶
type BuilderPollReq struct {
Manager string
}
type BuilderPollResp ¶
type CommitPollResp ¶
type CommitPollResultReq ¶
type CommitPollResultReq struct {
Commits []Commit
}
type Crash ¶
type Crash struct { BuildID string // refers to Build.ID Title string AltTitles []string // alternative titles, used for better deduplication Corrupted bool // report is corrupted (corrupted title, no stacks, etc) Suppressed bool Maintainers []string // deprecated in favor of Recipients Recipients Recipients Log []byte Flags CrashFlags Report []byte MachineInfo []byte Assets []NewAsset GuiltyFiles []string // The following is optional and is filled only after repro. ReproOpts []byte ReproSyz []byte ReproC []byte ReproLog []byte OriginalTitle string // Title before we began bug reproduction. }
Crash describes a single kernel crash (potentially with repro).
type CrashID ¶
type CrashID struct { BuildID string Title string Corrupted bool Suppressed bool MayBeMissing bool ReproLog []byte }
CrashID is a short summary of a crash for repro queries.
type Dashboard ¶
type Dashboard struct { Client string Addr string Key string // contains filtered or unexported fields }
func NewCustom ¶
func NewCustom(client, addr, key string, ctor RequestCtor, doer RequestDoer, logger RequestLogger, errorHandler func(error)) (*Dashboard, error)
key == "" indicates that the ambient GCE service account authority should be used as a bearer token.
func (*Dashboard) AddBuildAssets ¶
func (dash *Dashboard) AddBuildAssets(req *AddBuildAssetsReq) error
func (*Dashboard) BugList ¶
func (dash *Dashboard) BugList() (*BugListResp, error)
func (*Dashboard) BuilderPoll ¶
func (dash *Dashboard) BuilderPoll(manager string) (*BuilderPollResp, error)
func (*Dashboard) CommitPoll ¶
func (dash *Dashboard) CommitPoll() (*CommitPollResp, error)
func (*Dashboard) CreateUploadURL ¶
func (*Dashboard) JobDone ¶
func (dash *Dashboard) JobDone(req *JobDoneReq) error
func (*Dashboard) JobPoll ¶
func (dash *Dashboard) JobPoll(req *JobPollReq) (*JobPollResp, error)
func (*Dashboard) JobReset ¶
func (dash *Dashboard) JobReset(req *JobResetReq) error
func (*Dashboard) LoadFullBug ¶
func (dash *Dashboard) LoadFullBug(req *LoadFullBugReq) (*FullBugInfo, error)
func (*Dashboard) LogToRepro ¶
func (dash *Dashboard) LogToRepro(req *LogToReproReq) (*LogToReproResp, error)
LogToRepro are crash logs for older bugs that need to be reproduced on the querying instance.
func (*Dashboard) NeededAssetsList ¶
func (dash *Dashboard) NeededAssetsList() (*NeededAssetsResp, error)
func (*Dashboard) NewTestJob ¶
func (dash *Dashboard) NewTestJob(upd *TestPatchRequest) (*TestPatchReply, error)
func (*Dashboard) ReportBuildError ¶
func (dash *Dashboard) ReportBuildError(req *BuildErrorReq) error
func (*Dashboard) ReportCrash ¶
func (dash *Dashboard) ReportCrash(crash *Crash) (*ReportCrashResp, error)
func (*Dashboard) ReportFailedRepro ¶
ReportFailedRepro notifies dashboard about a failed repro attempt for the crash.
func (*Dashboard) ReportingPollBugs ¶
func (dash *Dashboard) ReportingPollBugs(typ string) (*PollBugsResponse, error)
func (*Dashboard) ReportingPollClosed ¶
func (*Dashboard) ReportingPollNotifications ¶
func (dash *Dashboard) ReportingPollNotifications(typ string) (*PollNotificationsResponse, error)
func (*Dashboard) ReportingUpdate ¶
func (dash *Dashboard) ReportingUpdate(upd *BugUpdate) (*BugUpdateReply, error)
func (*Dashboard) SaveCoverage ¶
SaveCoverage returns amount of records created in db.
func (*Dashboard) SaveDiscussion ¶
func (dash *Dashboard) SaveDiscussion(req *SaveDiscussionReq) error
func (*Dashboard) UpdateReport ¶
func (dash *Dashboard) UpdateReport(req *UpdateReportReq) error
func (*Dashboard) UploadBuild ¶
func (*Dashboard) UploadCommits ¶
func (*Dashboard) UploadManagerStats ¶
func (dash *Dashboard) UploadManagerStats(req *ManagerStatsReq) error
type DashboardOpts ¶
type DashboardOpts any
type Discussion ¶
type Discussion struct { ID string Source DiscussionSource Type DiscussionType Subject string BugIDs []string Messages []DiscussionMessage }
type DiscussionMessage ¶
type DiscussionSource ¶
type DiscussionSource string
const ( NoDiscussion DiscussionSource = "" DiscussionLore DiscussionSource = "lore" )
type DiscussionType ¶
type DiscussionType string
const ( DiscussionReport DiscussionType = "report" DiscussionPatch DiscussionType = "patch" DiscussionReminder DiscussionType = "reminder" DiscussionMention DiscussionType = "mention" )
type FullBugInfo ¶
type JobDoneFlags ¶
type JobDoneFlags int64
const ( BisectResultMerge JobDoneFlags = 1 << iota // bisected to a merge commit BisectResultNoop // commit does not affect resulting kernel binary BisectResultRelease // commit is a kernel release BisectResultIgnore // this particular commit should be ignored, see syz-ci/jobs.go BisectResultInfraError // the bisect failed due to an infrastructure problem )
func (JobDoneFlags) String ¶
func (flags JobDoneFlags) String() string
type JobDoneReq ¶
type JobDoneReq struct { ID string Build Build Error []byte Log []byte // bisection log CrashTitle string CrashAltTitles []string CrashLog []byte CrashReport []byte // Bisection results: // If there is 0 commits: // - still happens on HEAD for fix bisection // - already happened on the oldest release // If there is 1 commits: bisection result (cause or fix). // If there are more than 1: suspected commits due to skips (broken build/boot). Commits []Commit Flags JobDoneFlags }
type JobInfo ¶
type JobInfo struct { JobKey string Type JobType Flags JobDoneFlags Created time.Time BugLink string ExternalLink string User string Reporting string Namespace string Manager string BugTitle string BugID string KernelRepo string KernelBranch string KernelAlias string KernelCommit string KernelCommitLink string KernelLink string PatchLink string Attempts int Started time.Time Finished time.Time Duration time.Duration CrashTitle string CrashLogLink string CrashReportLink string LogLink string ErrorLink string ReproCLink string ReproSyzLink string Commit *Commit // for conclusive bisection Commits []*Commit // for inconclusive bisection Reported bool InvalidatedBy string TreeOrigin bool OnMergeBase bool }
type JobPollReq ¶
type JobPollReq struct {
Managers map[string]ManagerJobs
}
type JobPollResp ¶
type JobPollResp struct { ID string Type JobType Manager string KernelRepo string // KernelBranch is used for patch testing and serves as the current HEAD // for bisections. KernelBranch string MergeBaseRepo string MergeBaseBranch string // Bisection starts from KernelCommit. KernelCommit string KernelCommitTitle string KernelConfig []byte SyzkallerCommit string Patch []byte ReproOpts []byte ReproSyz []byte ReproC []byte }
type JobResetReq ¶
type JobResetReq struct {
Managers []string
}
type LoadBugReq ¶
type LoadBugReq struct {
ID string
}
type LoadFullBugReq ¶
type LoadFullBugReq struct {
BugID string
}
type LogToReproReq ¶
type LogToReproReq struct {
BuildID string
}
type LogToReproResp ¶
type LogToReproResp struct { Title string CrashLog []byte Type LogToReproType }
type LogToReproType ¶
type LogToReproType string
const ( ManualLog LogToReproType = "manual" RetryReproLog LogToReproType = "retry" )
type ManagerJobs ¶
func (ManagerJobs) Any ¶
func (m ManagerJobs) Any() bool
type ManagerStatsReq ¶
type ManagerStatsReq struct { Name string Addr string // Current level: UpTime time.Duration Corpus uint64 PCs uint64 // coverage Cover uint64 // what we call feedback signal everywhere else CrashTypes uint64 // Delta since last sync: FuzzingTime time.Duration Crashes uint64 SuppressedCrashes uint64 Execs uint64 // Non-zero only when set. TriagedCoverage uint64 TriagedPCs uint64 }
type NeedReproResp ¶
type NeedReproResp struct {
NeedRepro bool
}
type NeededAssetsResp ¶
type NeededAssetsResp struct {
DownloadURLs []string
}
type NewAsset ¶
Asset lifetime: 1. syz-ci uploads it to GCS and reports to the dashboard via add_build_asset. 2. dashboard periodically checks if the asset is still needed. 3. syz-ci queries needed_assets to figure out which assets are still needed. 4. Once an asset is not needed, syz-ci removes the corresponding file.
type PollBugsRequest ¶
type PollBugsRequest struct {
Type string
}
type PollBugsResponse ¶
type PollBugsResponse struct {
Reports []*BugReport
}
type PollClosedRequest ¶
type PollClosedRequest struct {
IDs []string
}
type PollClosedResponse ¶
type PollClosedResponse struct {
IDs []string
}
type PollNotificationsRequest ¶
type PollNotificationsRequest struct {
Type string
}
type PollNotificationsResponse ¶
type PollNotificationsResponse struct {
Notifications []*BugNotification
}
type RecipientInfo ¶
type RecipientInfo struct { Address mail.Address Type RecipientType }
type RecipientType ¶
type RecipientType int
const ( To RecipientType = iota Cc )
func (RecipientType) String ¶
func (t RecipientType) String() string
type Recipients ¶
type Recipients []RecipientInfo
func (Recipients) Len ¶
func (r Recipients) Len() int
func (Recipients) Less ¶
func (r Recipients) Less(i, j int) bool
func (Recipients) Swap ¶
func (r Recipients) Swap(i, j int)
type ReportCrashResp ¶
type ReportCrashResp struct {
NeedRepro bool
}
type ReportElements ¶
type ReportElements struct {
GuiltyFiles []string
}
type ReportType ¶
type ReportType int
const ( ReportNew ReportType = iota // First report for this bug in the reporting stage. ReportRepro // Found repro for an already reported bug. ReportTestPatch // Patch testing result. ReportBisectCause // Cause bisection result for an already reported bug. ReportBisectFix // Fix bisection result for an already reported bug. )
type ReproLevel ¶
type ReproLevel int
const ( ReproLevelNone ReproLevel = iota ReproLevelSyz ReproLevelC )
type RequestLogger ¶
type RequestLogger func(msg string, args ...interface{})
type SaveDiscussionReq ¶
type SaveDiscussionReq struct { // If the discussion already exists, Messages and BugIDs will be appended to it. Discussion *Discussion }
type SimilarBugInfo ¶
type TestPatchReply ¶
type TestPatchReply struct {
ErrorText string
}