Skip to content

Commit

Permalink
Merge pull request #2086 from opengovern/fix-add-linode
Browse files Browse the repository at this point in the history
fix: fix delete old resource findings
  • Loading branch information
artaasadi authored Dec 1, 2024
2 parents 0c28ec4 + bab1239 commit ee36b65
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions services/describe/scheduler_describe_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ func (s *Scheduler) cleanupDescribeResourcesNotInIntegrations(ctx context.Contex
err = s.es.Delete(key, idx)
if err != nil {
s.logger.Error("failed to delete resource from open-search", zap.Error(err))
return
}

lookupResource := es2.LookupResource{
Expand All @@ -304,7 +303,6 @@ func (s *Scheduler) cleanupDescribeResourcesNotInIntegrations(ctx context.Contex
err = s.es.Delete(key, idx)
if err != nil {
s.logger.Error("failed to delete lookup from open-search", zap.Error(err))
return
}

resourceFinding := types.ResourceFinding{
Expand All @@ -319,7 +317,6 @@ func (s *Scheduler) cleanupDescribeResourcesNotInIntegrations(ctx context.Contex
err = s.es.Delete(key, idx)
if err != nil {
s.logger.Error("failed to delete resource finding from open-search", zap.Error(err))
return
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion services/describe/schedulers/compliance/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func getComplianceResultsNotInIntegrationsFromES(ctx context.Context, client ope
}
root["size"] = size
root["sort"] = []map[string]any{
{"described_at": "asc"},
{"evaluatedAt": "asc"},
{"_id": "desc"},
}

Expand Down

0 comments on commit ee36b65

Please sign in to comment.