Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jt-dd committed Nov 13, 2024
1 parent a2d4237 commit 0a78c34
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pkg/ingestor/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (g *IngestorAPI) Ingest(ctx context.Context, path string) error {
}

if alreadyIngested {
events.PushEventIngestSkip(runCtx)
events.PushEventIngestSkip(runCtx) //nolint: contextcheck

return fmt.Errorf("%w [%s:%s]", ErrAlreadyIngested, clusterName, runID)
}
Expand All @@ -167,7 +167,7 @@ func (g *IngestorAPI) Ingest(ctx context.Context, path string) error {
spanJob.SetTag(ext.ManualKeep, true)
defer func() { spanJob.Finish(tracer.WithError(err)) }()

events.PushEventIngestStarted(runCtx)
events.PushEventIngestStarted(runCtx) //nolint: contextcheck

// We need to flush the cache to prevent warnings/errors when overwriting elements in cache from the previous ingestion
// This avoid conflicts from previous ingestion (there is no need to reuse the cache from a previous ingestion)
Expand Down Expand Up @@ -204,11 +204,17 @@ func (g *IngestorAPI) Ingest(ctx context.Context, path string) error {
}
}

err = g.providers.IngestBuildData(runCtx, runCfg)
// Keeping only the latest dump for each cluster in memory
err = g.providers.GraphProvider.Clean(runCtx, clusterName) //nolint: contextcheck

Check failure on line 208 in pkg/ingestor/api/api.go

View workflow job for this annotation

GitHub Actions / system-test

g.providers.GraphProvider.Clean undefined (type graphdb.Provider has no field or method Clean)

Check failure on line 208 in pkg/ingestor/api/api.go

View workflow job for this annotation

GitHub Actions / linter

g.providers.GraphProvider.Clean undefined (type graphdb.Provider has no field or method Clean)) (typecheck)

Check failure on line 208 in pkg/ingestor/api/api.go

View workflow job for this annotation

GitHub Actions / linter

g.providers.GraphProvider.Clean undefined (type graphdb.Provider has no field or method Clean)) (typecheck)

Check failure on line 208 in pkg/ingestor/api/api.go

View workflow job for this annotation

GitHub Actions / linter

g.providers.GraphProvider.Clean undefined (type graphdb.Provider has no field or method Clean) (typecheck)
if err != nil {
return err
}


err = g.providers.IngestBuildData(runCtx, runCfg) //nolint: contextcheck
if err != nil {
return err
}

err = g.notifier.Notify(runCtx, clusterName, runID) //nolint: contextcheck
if err != nil {
return fmt.Errorf("notifying: %w", err)
Expand Down
1 change: 1 addition & 0 deletions pkg/telemetry/events/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func geTitleTextMsg(ctx context.Context, actionMsg string) (string, string) {
runId := log.GetRunIDFromContext(ctx)
title := fmt.Sprintf("%s for %s", actionMsg, cluster)
text := fmt.Sprintf("%s for %s with run_id %s", actionMsg, cluster, runId)

return title, text
}

Expand Down

0 comments on commit 0a78c34

Please sign in to comment.