MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / GetBundle

Method GetBundle

app/controlplane/pkg/data/workflowrun.go:404–416  ·  view source on GitHub ↗
(ctx context.Context, wrID uuid.UUID)

Source from the content-addressed store, hash-verified

402}
403
404func (r *WorkflowRunRepo) GetBundle(ctx context.Context, wrID uuid.UUID) ([]byte, error) {
405 ctx, span := otelx.Start(ctx, workflowRunRepoTracer, "WorkflowRunRepo.GetBundle")
406 defer span.End()
407
408 att, err := r.data.DB.Attestation.Query().Where(attestation.WorkflowrunID(wrID)).First(ctx)
409 if err != nil {
410 if ent.IsNotFound(err) {
411 return nil, biz.NewErrNotFound(fmt.Sprintf("attestation for workflow run with id %s not found", wrID))
412 }
413 return nil, err
414 }
415 return att.Bundle, nil
416}
417
418func (r *WorkflowRunRepo) MarkAsFinished(ctx context.Context, id uuid.UUID, status biz.WorkflowRunStatus, reason string) error {
419 ctx, span := otelx.Start(ctx, workflowRunRepoTracer, "WorkflowRunRepo.MarkAsFinished")

Callers

nothing calls this directly

Implementers 3

WorkflowRunRepoapp/controlplane/pkg/biz/mocks/Workflo
WorkflowRunRepo_Expecterapp/controlplane/pkg/biz/mocks/Workflo
WorkflowRunRepoapp/controlplane/pkg/data/workflowrun.

Calls 7

StartFunction · 0.92
WorkflowrunIDFunction · 0.92
IsNotFoundFunction · 0.92
NewErrNotFoundFunction · 0.92
FirstMethod · 0.45
WhereMethod · 0.45
QueryMethod · 0.45

Tested by

no test coverage detected