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.
Types ¶
This section is empty.