Merge pull request #1327 from dwertent/hot-fix-submit-timestamp

Fix submit time
This commit is contained in:
David Wertenteil
2023-08-04 19:24:27 +03:00
committed by GitHub
@@ -57,13 +57,13 @@ func NewReportEventReceiver(tenantConfig *cautils.ConfigObj, reportID string, su
customerAdminEMail: tenantConfig.CustomerAdminEMail,
reportID: reportID,
submitContext: submitContext,
reportTime: time.Now().UTC(),
}
}
func (report *ReportEventReceiver) Submit(ctx context.Context, opaSessionObj *cautils.OPASessionObj) error {
ctx, span := otel.Tracer("").Start(ctx, "reportEventReceiver.Submit")
defer span.End()
report.reportTime = time.Now().UTC()
if report.customerGUID == "" {
logger.L().Ctx(ctx).Error("failed to publish results. Reason: Unknown account ID. Run kubescape with the '--account <account ID>' flag. Contact ARMO team for more details")
return nil