detsys-ts
    Preparing search index...

    Class DetSysActionAbstract

    Index
    nixStoreTrust: NixStoreTrust
    strictMode: boolean
    • Record that something happened, as a span event.

      The event lands on whichever span is active, so that it sits on the operation that produced it, and on the phase's root span when there is no nested span in progress.

      Namespace your attribute keys, as OpenTelemetry expects.

      Parameters

      • name: string
      • Optionalattributes: Attributes

      Returns void

    • Execute the Action as defined.

      Returns void

    • A helper function for failing on error only if strict mode is enabled. This is intended only for CI environments testing Actions themselves.

      Parameters

      • msg: string

      Returns void

    • Fetches the executable at the URL determined by the source-* inputs and other facts, chmods it, and returns the path to the executable on disk.

      Returns Promise<string>

    • Returns Promise<Got>

    • Returns string

    • The diagnostics endpoint for the programs this Action runs, such as nix-installer and magic-nix-cache.

      This library reports nothing there. Its own telemetry is OpenTelemetry; see getTelemetryEnvironment for putting a child process's telemetry in this run's trace.

      Returns Promise<URL | undefined>

    • The variant of a feature flag this run resolved, if the check-in returned one.

      Every resolved variant is already a resource attribute, under detsys.feature., so the telemetry can be sliced by the flags that produced it.

      Parameters

      • name: string

      Returns Feature | undefined

    • The environment variables that let a child process add data to this Action's trace: the current $TRACEPARENT and the OTLP export settings.

      Add these variables to the environment of each child process to trace. A child that inherits this process's environment already has the OTLP settings; only $TRACEPARENT changes as the run proceeds.

      The result is empty if the OpenTelemetry export is off. Thus it is always safe to add them.

      Returns Promise<Record<string, string>>

    • Returns string

    • The W3C traceparent identifying the span currently in progress.

      Hand this to a child process -- as $TRACEPARENT -- so that its own OpenTelemetry data joins this Action's trace. Returns undefined when OpenTelemetry export is disabled for this run.

      Returns string | undefined

    • Returns string

    • The main execution phase.

      Returns Promise<void>

    Abstractpost

    • post(): Promise<void>

      The post execution phase.

      Returns Promise<void>

    • Describe this run with an attribute.

      The attribute lands on the phase's root span, not on whichever span happens to be active, because it describes the run as a whole. Set it whenever the value becomes known: attributes set before the span opens are replayed onto it.

      Namespace your keys, as OpenTelemetry expects: detsys.nix.version, not nix_version.

      Parameters

      • key: string
      • value: AttributeValue

      Returns void

    • Attach a file to the telemetry for this run, to be emitted if the Action fails.

      The file at location doesn't need to exist when stapleFile is called.

      Each attachment becomes one OpenTelemetry log record, correlated to the phase's span: the file's contents as the body if it can be read, the reason it could not be read otherwise.

      Parameters

      • name: string
      • location: string

      Returns void

    • Unpacks the closure returned by fetchArtifact(), imports the contents into the Nix store, and returns the path of the executable at /nix/store/STORE_PATH/bin/${bin}.

      Parameters

      • bin: string

      Returns Promise<string>