Skip to content

Rate limit AutoStackUpdate task#6874

Merged
knolleary merged 8 commits intomainfrom
rate-limit-autostack-update-task
Mar 18, 2026
Merged

Rate limit AutoStackUpdate task#6874
knolleary merged 8 commits intomainfrom
rate-limit-autostack-update-task

Conversation

@hardillb
Copy link
Copy Markdown
Contributor

@hardillb hardillb commented Mar 16, 2026

fixes #6872

Description

This adds a 1 second delay between suspend and restart and another 1 second after each instance in the list.

It also no longer tries to upgrade suspended instances.

Related Issue(s)

#6872

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

fixes #6872

This adds a 1 second delay between suspend and restart and another
1 second after each instance in the list.

It also no longer tries to upgrade suspended instnaces
@hardillb hardillb self-assigned this Mar 16, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 3.57143% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.62%. Comparing base (334e644) to head (d012aac).
⚠️ Report is 65 commits behind head on main.

Files with missing lines Patch % Lines
...rge/ee/lib/autoUpdateStacks/tasks/upgrade-stack.js 3.57% 27 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6874   +/-   ##
=======================================
  Coverage   76.62%   76.62%           
=======================================
  Files         399      399           
  Lines       20160    20165    +5     
  Branches     4852     4856    +4     
=======================================
+ Hits        15448    15452    +4     
- Misses       4712     4713    +1     
Flag Coverage Δ
backend 76.62% <3.57%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hardillb hardillb requested a review from knolleary March 16, 2026 13:37
@hardillb hardillb marked this pull request as ready for review March 16, 2026 13:37
@knolleary
Copy link
Copy Markdown
Member

Do we have insight on what the api rate limits are? Adding these delays will slow down the calls we make, but not deal with the overall volume. Is the retry handling going into the driver separately? It feels like this code should leave a previously running instance in suspended state - but is it this code's responsibility or the drivers?

Copy link
Copy Markdown
Contributor Author

@hardillb hardillb left a comment

Choose a reason for hiding this comment

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

Doubling the pauses to just really be sure

Co-authored-by: Ben Hardill <b.hardill@gmail.com>
@hardillb
Copy link
Copy Markdown
Contributor Author

@knolleary doubles the waits

@knolleary knolleary enabled auto-merge March 18, 2026 11:11
@knolleary knolleary merged commit 2f51062 into main Mar 18, 2026
29 of 30 checks passed
@knolleary knolleary deleted the rate-limit-autostack-update-task branch March 18, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need to rate limit instance restart as part of Scheduled maintenance

2 participants