Skip to content

feat(stovepipe): time-based build-slot delay - storage updates - #707

Open
mnoah1 wants to merge 2 commits into
mainfrom
mnoah1/stovepipe-admission-state
Open

mnoah1 wants to merge 2 commits into
mainfrom
mnoah1/stovepipe-admission-state

Conversation

@mnoah1

@mnoah1 mnoah1 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Intent:
Add a way to support time-based throttling of new builds on a queue. This can be used to support two main scenarios where we might not want to immediately start the next build as soon as the build slot is free:

  1. Throttling resource usage on a shared pipeline: Support spacing out builds in a time based manner, which can be used when there are CI resource constraints in running the job constantly. Tradeoff between overall agent usage time vs. getting a green result sooner.
  2. Cool off after failure - A job that is experiencing repeated fast failures can create significant resource thrash if it continues to start then fail, and could benefit from delay between retries. We can consider some sort of backoff workflow depending on failure type, to avoid unnecessarily workload and potentially give downstream issues time to resolve rather than constantly retrying/failing.

Changes:

  • Add the build admission deadline to the Queue entity and MySQL backend.

Summary:
Intent:
- Establish durable queue state shared by time-based logical admission policies.

Changes:
- Add the build admission deadline to the Queue entity and MySQL backend.
- Cover optimistic storage updates and deadline round-tripping.
@mnoah1 mnoah1 changed the title feat(stovepipe): persist build admission deadline feat(stovepipe): support time-based build-slot delay - storage updates Sep 15, 2026
@mnoah1
mnoah1 marked this pull request as ready for review September 15, 2026 17:21
@mnoah1
mnoah1 requested review from a team, behinddwalls and sbalabanov as code owners September 15, 2026 17:21
@mnoah1
mnoah1 added this pull request to stack #712 September 15, 2026 20:54
@mnoah1
mnoah1 removed this pull request from stack #712 September 15, 2026 21:02
@mnoah1
mnoah1 added this pull request to stack #715 September 15, 2026 21:03
@mnoah1 mnoah1 changed the title feat(stovepipe): support time-based build-slot delay - storage updates feat(stovepipe): time-based build-slot delay - storage updates Sep 15, 2026
latest_request_id VARCHAR(255) NOT NULL DEFAULT '',
version INT NOT NULL,
last_green_request_id VARCHAR(255) NOT NULL DEFAULT '',
build_admission_not_before_ms BIGINT NOT NULL DEFAULT 0,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Need a default during the initial migration (cannot have NOT NULL without a default value), but can remove later after existing tables are updated. New field must be last in the table.

@mnoah1
mnoah1 removed this pull request from stack #715 September 15, 2026 21:20
@mnoah1
mnoah1 added this pull request to stack #716 September 15, 2026 21: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.

1 participant