Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add dynamic status check intervals with cooldown period and timeout handling #360

Merged
merged 16 commits into from
Feb 14, 2025

Conversation

StefanNemeth
Copy link
Contributor

Problem

Static 120-second checks were inefficient for environments needing immediate feedback (e.g., post-deployment). However, when we set this down to like 10 seconds, we would fetch the latest status from environments that rarely change, even for the whole night.

Overview

This PR introduces dynamic status check intervals for environments:

  • Frequent checks (10s) for environments with recent status changes or deployments.
  • Less frequent checks (60s) for stable environments after a cooldown period (5 minutes).
  • 10-second timeout for all checks to prevent long-running jobs.
  • Trigger frequent checks when deploying to environment
  • Update UI so it updates the "last check" regularly

Copy link

codacy-production bot commented Feb 11, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 61170851 2.68%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (6117085) Report Missing Report Missing Report Missing
Head commit (3152be6) 4856 326 6.71%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#360) 112 3 2.68%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@StefanNemeth StefanNemeth marked this pull request as ready for review February 11, 2025 17:00
@StefanNemeth StefanNemeth requested a review from a team as a code owner February 11, 2025 17:00
Copy link
Contributor

@thielpa thielpa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@StefanNemeth StefanNemeth merged commit 4d871f1 into staging Feb 14, 2025
12 checks passed
@StefanNemeth StefanNemeth deleted the fix/status-checks-delayed branch February 14, 2025 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants