Package

agora.exec

model

Permalink

package model

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. model
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class FileResult(exitCode: Int, workspaceId: WorkspaceId, stdOutFile: Option[String] = None, stdErrFile: Option[String] = None, matchDetails: Option[MatchDetails] = None) extends RunProcessResult with Product with Serializable

    Permalink
  2. case class OperationResult(messages: List[String]) extends Product with Serializable

    Permalink

    Represents a container for messages produced while executing some operation

  3. case class OutputSettings(streaming: Option[StreamingSettings] = Option(StreamingSettings()), stdOutFileName: Option[String] = None, stdErrFileName: Option[String] = None, canCache: Boolean = false, useCachedValueWhenAvailable: Boolean = true) extends Product with Serializable

    Permalink

    Represents a configuration for what to do w/ a process output

    Represents a configuration for what to do w/ a process output

    If 'canCache' is true, then the output of the standard out and err will be returned if already found.

    This is intended to work as follows:

    # In the case where no '<workspace>/.cache/<MD5 of the command>' entry exists If there is no cached value, then the command is run as normal. A '.cache' directory will be created in the job's workspace in which we store cache metadata to contain:

    <workspace>/.cache/<MD5 of the command>/.stdOutFileName # contains the name of the stdout file name
    <workspace>/.cache/<MD5 of the command>/.stdErrFileName # contains the name of the stderr file name
    <workspace>/.cache/<MD5 of the command>/.exitCode # set to the exit code
    <workspace>/.cache/<MD5 of the command>/.job # a serialized version of the job

    If the 'stdOutFileName' or 'stdErrFileName' are left empty when 'canCache' is set, then a unique filename will be used.

    This is intended to mitigate the scenario where the same command is run concurrently, both set to allow caching.

    This way both jobs will run, writing to different files, and just happily clobber the contents of the cache directory.

    another approach would be to detect unfinished jobs (e.g. no .exitCode exists) and tail the existing job.

    # In the case where a '<workspace>/.cache/<MD5 of the command>' entry exists

    If that directory exists and an .exitCode file exists, then:

    ## When streaming is set if the exit code is listed in the a 'successExitCodes', then the contents .stdOutFileName is returned. Otherwise the contents of the .stdErrFileName are returned.

    ## When streaming is not set Then the FileResult is simply returned w/ the cached values (output file names, exit code, etc)

    streaming

    settings for streaming back the output of the job

    stdOutFileName

    an option filename to save the output file to. If 'canCache' is set and the 'stdOutFileName' isn't, then a unique output file name is chosen.

    stdErrFileName

    an option filename to save the output file to. If 'canCache' is set and the 'stdErrFileName' isn't, then a unique output file name is chosen.

    canCache

    toggle ability to cache as detailed above

    useCachedValueWhenAvailable

    use the cached value when available

  4. case class ProcessError(process: RunProcess, exitCode: Option[Int], matchDetails: Option[MatchDetails], stdErr: List[String]) extends Product with Serializable

    Permalink
  5. case class ProcessException(error: ProcessError) extends Exception with Product with Serializable

    Permalink
  6. case class RunProcess(command: List[String], env: Map[String, String] = Map.empty, dependencies: UploadDependencies = ..., output: OutputSettings = OutputSettings()) extends Product with Serializable

    Permalink

    A job intended to produce a lot of output, and such streams the output when run.

    A job intended to produce a lot of output, and such streams the output when run.

    command

    the command string to execute

    env

    the system environment

    dependencies

    if specified, the any file dependencies this request has

  7. sealed trait RunProcessResult extends AnyRef

    Permalink

    Depending on the output setting specified on the RunProcess, the runner may return either a StreamingResult or a FileResult

  8. case class StreamingResult(output: Iterator[String]) extends RunProcessResult with Product with Serializable

    Permalink
  9. case class StreamingSettings(successExitCodes: Set[Int] = Set(0), frameLength: Option[Int] = None, allowTruncation: Boolean = true, errorLimit: Option[Int] = None, errorMarker: String = ...) extends Product with Serializable

    Permalink

    successExitCodes

    the set of exit codes which are attribute to success

    frameLength

    the frame length to use (if set) for delimiting output lines

    errorMarker

    the marker which, if it appears in the standard output stream, will be followed by ProcessError in json form

  10. case class Upload(name: String, source: Source[ByteString, Any], size: Option[Long] = None) extends Product with Serializable

    Permalink

Value Members

  1. object FileResult extends FailFastCirceSupport with Serializable

    Permalink
  2. object OperationResult extends Serializable

    Permalink
  3. object ProcessError extends Serializable

    Permalink
  4. object ProcessException extends StrictLogging with Serializable

    Permalink
  5. object RunProcess extends Serializable

    Permalink
  6. object RunProcessResult

    Permalink
  7. object StreamingSettings extends Serializable

    Permalink
  8. object Upload extends Serializable

    Permalink
  9. def newWorkspace(): WorkspaceId

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped