Skip to content

use TIMENOW placeholder in job runs matview#3653

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
mstaeble:fix-job-runs-matview-timenow
Jun 23, 2026
Merged

use TIMENOW placeholder in job runs matview#3653
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
mstaeble:fix-job-runs-matview-timenow

Conversation

@mstaeble

@mstaeble mstaeble commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace CURRENT_TIMESTAMP with |||TIMENOW||| in prow_job_runs_report_matview
  • This was the only matview still using CURRENT_TIMESTAMP directly

Problem

The |||TIMENOW||| placeholder is replaced with NOW() in production, but with a fixed TO_TIMESTAMP(...) when --pinned-time is set (used by the seed data workflow). Because this matview used CURRENT_TIMESTAMP instead, it always evaluated against wall-clock time and returned zero rows against seed data whose timestamps are at fixed dates in the past.

Introduced in PR #3616, which added the 90-day time bound using CURRENT_TIMESTAMP rather than the existing |||TIMENOW||| convention.

Test plan

  • go build ./...
  • go vet ./...
  • Verified no remaining CURRENT_TIMESTAMP in matview definitions
  • Verify job runs table populates correctly with seed data after sippy migrate

🤖 Generated with Claude Code

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@mstaeble, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 55 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: b479ffdf-3958-421c-8e57-de9e76b64950

📥 Commits

Reviewing files that changed from the base of the PR and between dd64c4f and e0dc60a.

📒 Files selected for processing (1)
  • pkg/db/views.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 18, 2026
@openshift-ci

openshift-ci Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@mstaeble mstaeble changed the title Use TIMENOW placeholder in job runs matview [WIP] Use TIMENOW placeholder in job runs matview Jun 18, 2026
prow_job_runs_report_matview was the only matview using
CURRENT_TIMESTAMP instead of the |||TIMENOW||| placeholder. This meant
it always evaluated against wall-clock time, ignoring the --pinned-time
flag that other matviews respect. As a result, the matview returned zero
rows when run against seed data (whose timestamps are at fixed dates in
the past).

Replace all three CURRENT_TIMESTAMP occurrences with |||TIMENOW|||,
which resolves to NOW() in production and to the pinned timestamp when
--pinned-time is set.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mstaeble mstaeble force-pushed the fix-job-runs-matview-timenow branch from 953e636 to e0dc60a Compare June 18, 2026 18:50
@mstaeble mstaeble changed the title [WIP] Use TIMENOW placeholder in job runs matview use TIMENOW placeholder in job runs matview Jun 18, 2026
@mstaeble mstaeble marked this pull request as ready for review June 18, 2026 19:45
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 18, 2026
@openshift-ci openshift-ci Bot requested review from petr-muller and stbenjam June 18, 2026 19:45
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 23, 2026
@openshift-ci

openshift-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mstaeble, petr-muller

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 23, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 08d3742 into openshift:main Jun 23, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants