fix(budget): pass the watchdog thresholds as numbers, not expressions - #44
Merged
Conversation
The first dispatched run failed with zero jobs allocated. The callee declares
allowance-minutes, warn-percent and critical-percent as 'type: number', and
the caller forwarded them as "${{ inputs.x || N }}" -- an interpolated
expression, which is a string. The caller is rejected before any job is
created.
That failure mode is worth naming: a zero-job run failing in seconds looks
exactly like an exhausted Actions quota, which is the very condition this
workflow exists to detect. A watchdog that dies in the shape of the outage it
watches for is worse than no watchdog.
The thresholds are now literal YAML numbers, and the dispatch inputs are gone
-- their only purpose was to be forwarded. The values are easier to find where
they are now anyway.
Refs JorisJonkers-dev/github-workflows#126
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first dispatched run of #43 failed with zero jobs allocated.
Cause: the callee declares
allowance-minutes,warn-percentandcritical-percentastype: number, and the caller forwarded them as"${{ inputs.x || N }}"— an interpolated expression, which is a string. The caller is rejected before any job is created.Why this one is worth calling out
A zero-job run failing in seconds looks exactly like an exhausted Actions quota — the precise condition this workflow exists to detect. I spent a while today diagnosing that signature for real. A watchdog that dies in the shape of the outage it watches for is worse than no watchdog, because it is indistinguishable from the thing it is meant to warn about.
Fix
Thresholds are now literal YAML numbers (verified as
intby parsing the file), and the dispatch inputs are removed — their only purpose was to be forwarded. The values are easier to find where they now sit.actionlintclean. Will be dispatched to verify after merge; the reusable workflow's own logic was already proven against live billing data across all three threshold branches in JorisJonkers-dev/github-workflows#128.