runnerworkflows

package
v1.338.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package runnerworkflows decides which workflows of a runner namespace an organization may see: the device work of its own pipeline runs.

Credimi starts that device work with the memo key mobiledevice.PipelineRunMemoKey naming the pipeline run. The memo is a claim: anyone holding the runner's token can write it. OwnedBy therefore also requires the pipeline run to have used a device of that runner, so only the runner that ran a pipeline's devices could forge it, and that runner already controls those results.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OwnedBy

func OwnedBy(
	ctx context.Context,
	app core.App,
	organizationID, namespace, workflowID, runID string,
) (bool, error)

OwnedBy reports whether the run runID of workflowID (its latest run when runID is empty) in the runner namespace namespace is device work of a pipeline run of organizationID:

  • the namespace's runner exists and is not disabled;
  • its type is mobiledevice.PrepareWorkflowName, mobiledevice.CleanUpWorkflowName or mobiledevice.StepWorkflowName;
  • its memo names a pipeline_results row owned by organizationID;
  • one of that row's devices is hosted by the runner namespace belongs to.

Temporal is asked only for the namespaces of existing runners, so callers cannot make Credimi open clients for arbitrary namespaces. A workflow or pipeline result that does not exist is not owned.

func UsesRunner

func UsesRunner(app core.App, organizationID, runnerID string) (bool, error)

UsesRunner reports whether a pipeline run of organizationID used a device hosted by the runner with record ID runnerID: a pipeline_results row owned by the organization lists such a device.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL