Documentation
¶
Overview ¶
Task Output Directory
The task output directory establishes an API, via the file system, for the handling of output generated by an Evergreen task. It sits on the top level of the task's working directory and contains subdirectories that map to specific types of task output. Any data written to these subdirectories is automatically ingested, processed, and persisted in a well defined manner established with with users. A subdirectory may require a specification file written by the task workload detailing versions, formats, etc. In general, a task output subdirectory is free to establish its own requirements, conventions, and behavior.
This package implements the task output directory API for the Evergreen agent.
Index ¶
- func AppendTestLog(ctx context.Context, tsk *task.Task, redactionOpts redactor.RedactionOptions, ...) error
- func AppendTestLogForOutput(ctx context.Context, tsk task.Task, output task.TestLogOutput, ...) error
- func UploadTestLogFilesForOutput(ctx context.Context, opts TestLogFilesOptions) error
- type Directory
- type DirectoryOpts
- type TestLogFilesOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendTestLog ¶
func AppendTestLog(ctx context.Context, tsk *task.Task, redactionOpts redactor.RedactionOptions, testLog *testlog.TestLog, s3Usage *s3usage.S3Usage) error
AppendTestLog appends log lines to the specified test log for the given task run. Safe for concurrent use with a shared, Init'd s3Usage.
func AppendTestLogForOutput ¶
func AppendTestLogForOutput(ctx context.Context, tsk task.Task, output task.TestLogOutput, redactionOpts redactor.RedactionOptions, testLog *testlog.TestLog, s3Usage *s3usage.S3Usage) error
AppendTestLogForOutput appends log lines to the specified test log using the provided test log output rather than resolving it from the task. This is analogous to AppendTestLog but is meant to append logs on behalf of a task that has not run (e.g. a virtual task). Safe for concurrent use with a shared, Init'd s3Usage.
func UploadTestLogFilesForOutput ¶
func UploadTestLogFilesForOutput(ctx context.Context, opts TestLogFilesOptions) error
UploadTestLogFilesForOutput uploads the given test log files using the provided test log output.
Types ¶
type Directory ¶
type Directory struct {
// contains filtered or unexported fields
}
Directory is the application representation of a task's reserved output directory. It coordinates the automated handling of task output written to the reserved directory while a task runs.
func NewDirectory ¶
func NewDirectory(opts DirectoryOpts) *Directory
NewDirectory returns a new task output directory with the specified root for the given task.
type DirectoryOpts ¶
type DirectoryOpts struct {
Root string
Tsk *task.Task
RedactorOpts redactor.RedactionOptions
Logger client.LoggerProducer
TraceClient otlptrace.Client
S3Usage *s3usage.S3Usage
}
DirectoryOpts is an options struct passed into directory initialization.
type TestLogFilesOptions ¶
type TestLogFilesOptions struct {
Dir string
LogPaths []string
Task task.Task
Output task.TestLogOutput
RedactorOpts redactor.RedactionOptions
Logger client.LoggerProducer
S3Usage *s3usage.S3Usage
}
TestLogFilesOptions are options for uploading test log files on behalf of a task.