damccorm opened a new pull request, #41143:
URL: https://github.com/apache/beam/pull/41143

   ### Summary
   Fixes recurring `ProberTests.CheckGrafanaDataFreshness` failures in 
`Community Metrics Prober` ([run 
42371371851](https://github.com/apache/beam/actions/runs/42371371851), [run 
42453858744](https://github.com/apache/beam/actions/runs/42453858744), [run 
42216008171](https://github.com/apache/beam/actions/runs/42216008171)).
   
   ### Root Cause
   `.test-infra/metrics/sync/github/sync.py` synchronizes both GitHub Pull 
Requests (`gh_pr_sync`) and GitHub Issues (`gh_issue_sync`) in the same loop, 
storing the `updatedAt` timestamp of the most recently updated PR or Issue in 
`gh_sync_metadata.timestamp` rather than the sync execution timestamp. During 
quiet overnight or weekend periods when no GitHub Issue is updated for more 
than 8 hours (`480` minutes)—even though PRs are actively being 
synced—`MAX(EXTRACT(EPOCH FROM age(current_timestamp, last_sync)) / 60)` 
exceeds `480` minutes and fails `CheckGrafanaDataFreshness`.
   
   ### Fix
   - Assert `min_staleness_minutes <= 480` (8 hours) across `gh_pr_sync` and 
`gh_issue_sync` to verify the GitHub sync job is actively synchronizing recent 
GitHub activity.
   - Assert `max_staleness_minutes <= 2880` (48 hours) to allow for quiet 
overnight/weekend issue windows while still catching stuck issue 
synchronization.
   
   ### Verification
   - Triggered `beam_Prober_CommunityMetrics.yml` workflow run on branch: 
[`42734621825`](https://github.com/apache/beam/actions/runs/42734621825)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to