Skip to content

Commit

Permalink
don't write anything for projects without URL
Browse files Browse the repository at this point in the history
We still run into the 429 GCS responses due to the lower limits on the same file.
All of the projects without a repo_url are being mapped to the same
object and leading to rate limiting.

"Maximum rate of writes to the same object name: One write per second"
https://cloud.google.com/storage/quotas#objects

Signed-off-by: Spencer Schrock <sschrock@google.com>
  • Loading branch information
spencerschrock committed May 8, 2024
1 parent cc7132d commit c8c0c7d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cron/internal/cii/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ func writeToCIIDataBucket(ctx context.Context, pageResp []ciiPageResp, bucketURL
for _, project := range pageResp {
projectURL := strings.TrimPrefix(project.RepoURL, "https://")
projectURL = strings.TrimPrefix(projectURL, "http://")
if projectURL == "" {
continue
}
jsonData, err := clients.BadgeResponse{
BadgeLevel: project.BadgeLevel,
}.AsJSON()
Expand Down

0 comments on commit c8c0c7d

Please sign in to comment.