Fix issues with CII client (#1309)

Co-authored-by: Azeem Shaikh <azeems@google.com>
This commit is contained in:
Azeem Shaikh 2021-11-19 13:24:43 -05:00 committed by GitHub
parent 08a78762da
commit 5025299eb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -39,6 +39,15 @@ func (client *blobClientCIIBestPractices) GetBadgeLevel(ctx context.Context, uri
defer bucket.Close()
objectName := fmt.Sprintf("%s/result.json", uri)
exists, err := bucket.Exists(ctx, objectName)
if err != nil {
return Unknown, fmt.Errorf("error during bucket.Exists: %w", err)
}
if !exists {
return NotFound, nil
}
jsonData, err := bucket.ReadAll(ctx, objectName)
if err != nil {
return Unknown, fmt.Errorf("error during bucket.ReadAll: %w", err)

View File

@ -18,7 +18,7 @@ metadata:
name: scorecard-cii-worker
spec:
# At 00:00UTC on 1st of every month.
schedule: "@monthly"
schedule: "0 20 * * 0"
concurrencyPolicy: "Forbid"
jobTemplate:
spec: