Skip to content

Commit

Permalink
Add SDLC noops to history and exec aggregator
Browse files Browse the repository at this point in the history
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@stacklok.com>
  • Loading branch information
puerco committed Jul 11, 2024
1 parent f603806 commit 6186169
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions internal/eea/eea.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,11 @@ func (e *EEA) buildEntityWrapper(
return e.buildArtifactInfoWrapper(ctx, repoID, projID, artID)
case db.EntitiesPullRequest:
return e.buildPullRequestInfoWrapper(ctx, repoID, projID, prID)
case db.EntitiesBuildEnvironment:
return nil, fmt.Errorf("build environment entity not supported")
case db.EntitiesBuildEnvironment, db.EntitiesRelease,
db.EntitiesPipelineRun, db.EntitiesTaskRun, db.EntitiesBuild:
return nil, fmt.Errorf("entity type %q not yet supported", entity)
default:
return nil, fmt.Errorf("unknown entity type: %s", entity)
return nil, fmt.Errorf("unknown entity type: %q", entity)
}
}

Expand Down
5 changes: 3 additions & 2 deletions internal/history/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,10 @@ func paramsFromEntity(
params.PullRequestID = nullableEntityID
case db.EntitiesArtifact:
params.ArtifactID = nullableEntityID
case db.EntitiesBuildEnvironment:
case db.EntitiesBuildEnvironment, db.EntitiesRelease,
db.EntitiesPipelineRun, db.EntitiesTaskRun, db.EntitiesBuild:
default:
return nil, fmt.Errorf("unknown entity %s", entityType)
return nil, fmt.Errorf("unknown entity %q", entityType)
}
return &params, nil
}
Expand Down

0 comments on commit 6186169

Please sign in to comment.