🤖 sippy load: add --prow-load-since and --skip-matview-refresh options#3347
Conversation
These are helpful for retroactively loading job runs for new releases. 🤖 Assisted by Claude Code
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
WalkthroughImplements time-bounded Prow data loading by adding a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.11.3)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cmd/sippy/load.go (1)
476-487: Consider validating that duration results in a past time.If a user accidentally passes a negative duration like
"-72h", the result would be a timestamp in the future, which could cause unexpected behavior. This is an edge case but worth noting.🔧 Optional validation
func parseProwLoadSince(val string) (time.Time, error) { if t, err := time.Parse(time.RFC3339, val); err == nil { return t, nil } d, err := time.ParseDuration(val) if err != nil { return time.Time{}, fmt.Errorf("must be an RFC3339 timestamp (e.g. 2024-01-15T00:00:00Z) or a duration (e.g. 72h)") } + if d < 0 { + return time.Time{}, fmt.Errorf("duration must be positive (e.g. 72h for 72 hours ago)") + } return time.Now().Add(-d), nil }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cmd/sippy/load.go` around lines 476 - 487, The parseProwLoadSince function currently accepts negative durations which produce future timestamps; after parsing the duration in parseProwLoadSince, validate that d is positive (or that the computed time t := time.Now().Add(-d) is strictly before time.Now()) and return a clear error if not (e.g., "duration must be positive and produce a time in the past"); reference the function parseProwLoadSince and the parsed duration variable d when adding this validation and error return.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@cmd/sippy/load.go`:
- Around line 476-487: The parseProwLoadSince function currently accepts
negative durations which produce future timestamps; after parsing the duration
in parseProwLoadSince, validate that d is positive (or that the computed time t
:= time.Now().Add(-d) is strictly before time.Now()) and return a clear error if
not (e.g., "duration must be positive and produce a time in the past");
reference the function parseProwLoadSince and the parsed duration variable d
when adding this validation and error return.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 3084b989-7123-485c-a087-1adf87dc7341
📒 Files selected for processing (3)
cmd/sippy/load.gopkg/dataloader/prowloader/bigqueryjobs.gopkg/dataloader/prowloader/prow.go
|
Scheduling required tests: |
|
E2E failure: The Root cause: The first load pod was OOMKilled (3G limit). The job retried and the second pod completed, but matviews remained empty: This PR is not responsible. The new flags ( Prow job | Analysis by Claude |
|
/test e2e |
1 similar comment
|
/test e2e |
|
Sorry for AI slop above, was seeing if openshift/release#76493 is useful |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sosiouxme, stbenjam The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Something weird is going on, does this PR make us load more data somehow? We're OOMing a lot. |
|
This PR makes absolutely no difference to any code path currently in use. I just added the flags to enable backfilling new releases. e2e job seems to have periods where it does this, e.g. over the weekend it was solid red |
|
/test e2e |
|
/hold cancel |
|
@sosiouxme: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
These are helpful for retroactively loading job runs for new releases.
🤖 Assisted by Claude Code
Summary by CodeRabbit
New Features
--prow-load-sinceflag to specify a custom start time for loading Prow data--skip-matview-refreshflag to optionally skip materialized view refresh operations