internal/vulndbreqs: limit ComputeAndStore to 29-day retention window

With a 30-day retention lifecycle rule on the GCS logs bucket,
historical dates older than 30 days will no longer have log files in
GCS. Update ComputeAndStore to look back only 29 days (today-29) rather
than starting at 2023-01-01.

Starting at today-29 instead of today-30 avoids reading a boundary day
whose early-hour log files have already expired while late-hour files
remain, while still returning an error if a recent day within the
window has no log files.

Change-Id: I3510fcd34f3c2949abb1248c8d5456c9a72798f3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite-metrics/+/855161
Auto-Submit: Hongxiang Jiang <hxjiang@golang.org>
Reviewed-by: Ethan Lee <ethanalee@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 file changed
tree: 98e56cfec62321b281e796ca94c6177f507a17ec
  1. cmd/
  2. deploy/
  3. devtools/
  4. internal/
  5. terraform/
  6. .dockerignore
  7. .gitignore
  8. all_test.go
  9. checks.bash
  10. codereview.cfg
  11. config.json.commented
  12. CONTRIBUTING.md
  13. go.mod
  14. go.sum
  15. LICENSE
  16. Makefile
  17. PATENTS
  18. README.md
  19. tools.go
README.md

pkgsite-metrics

This repository contains code that enables collecting and evaluating metrics for the Go ecosystem.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the time repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/pkgsite-metrics:” in the subject line, so it is easy to find.