AbstractOptionalattributes: AttributesExecute the Action as defined.
A helper function for failing on error only if strict mode is enabled. This is intended only for CI environments testing Actions themselves.
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.
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.
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.
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.
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.
AbstractmainThe main execution phase.
AbstractpostThe post execution phase.
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.
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.
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}.
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.