Skip to content

Commit

Permalink
Handle SDLC ents telemetry with noops
Browse files Browse the repository at this point in the history
This commit adds NOOP cases to functions where the SDLC entities
need to be implemented in the database or, where hardcoded entity
types in functions prevent us from wiring up the values.

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
  • Loading branch information
puerco committed Jul 11, 2024
1 parent 58d0147 commit b2501d3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/logger/telemetry_store_watermill.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ func newTelemetryStoreFromEntity(inf *entities.EntityInfoWrapper) (*TelemetrySto
ts.Artifact = ent
case minderv1.Entity_ENTITY_PULL_REQUESTS:
ts.PullRequest = ent
case minderv1.Entity_ENTITY_BUILD_ENVIRONMENTS:
case minderv1.Entity_ENTITY_BUILD_ENVIRONMENTS,
minderv1.Entity_ENTITY_RELEASE, minderv1.Entity_ENTITY_PIPELINE_RUN,
minderv1.Entity_ENTITY_TASK_RUN, minderv1.Entity_ENTITY_BUILD:
// Noop, see https://github.com/stacklok/minder/issues/3838
case minderv1.Entity_ENTITY_UNSPECIFIED:
// Do nothing
}
Expand All @@ -121,6 +124,9 @@ func getEntityID(inf *entities.EntityInfoWrapper) (uuid.UUID, error) {
ent = artID.UUID
case minderv1.Entity_ENTITY_PULL_REQUESTS:
ent = prID.UUID
case minderv1.Entity_ENTITY_RELEASE, minderv1.Entity_ENTITY_PIPELINE_RUN,
minderv1.Entity_ENTITY_TASK_RUN, minderv1.Entity_ENTITY_BUILD:
// Noop, see https://github.com/stacklok/minder/issues/3838
}

return ent, nil
Expand Down

0 comments on commit b2501d3

Please sign in to comment.