Say why the dashboard refused a run, and accept "never" and "1 hour" - #103
Merged
Merged
Conversation
Starting a run from the dashboard said "That is not a run this can start
- a template cannot be run, only copied." for teams that were not
templates. The page maps every exit code 2 from `team run` to that one
guess, because only the exit code crosses back from the command; the
words go to the terminal serving the page. The real refusal was the
new "Take the lead's recommendation after" box: its placeholder reads
"never", so people type never - or 10, or 1 hour - and none of those
parsed as a duration.
Reproduced against 0.42.0 through a sandboxed daemon, with no agent on
PATH so nothing could launch: "never", "10" and "1 hour" in that box
each gave the template message; an empty box got as far as the agent
check.
- `never`, `off`, `none` and `no` mean no timed answer. For a run they
override a team's own setting, and the page passes nothing for them.
- Durations may spell the unit out: 30 mins, 1 hour, 2 days, 1.5h. A
bare number is still refused, since ten of one unit is not ten of
another.
- An unreadable duration is refused by the page before it starts
anything, in the same words `team run` uses. The fallback for any
other exit 2 no longer mentions templates, which the page never
offers, and points at the terminal instead.
- A criterion or goal typed as a list item ("- tests pass", "1. ...")
broke the whole run: a value starting with a dash is read as an
option ("Option does not have a name"). The marker is taken off, and
criteria travel as --done-when=... so one that truly starts with a
dash still arrives as a value.
StartFormTests gains tests for each, including one that parses the
page's own argument list with team run's settings class and checks the
goal, the criteria (one starting with a dash) and the duration arrive
intact. Two existing assertions changed from the separate
"--done-when", value pair to the joined form; their point - one option
per criterion - is unchanged. Put back to main's DashboardActions, the
new and updated tests fail (7 of 23).
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.
Say why the dashboard refused a run, and accept "never" and "1 hour"
Starting a run from the dashboard said "That is not a run this can start
templates. The page maps every exit code 2 from
team runto that oneguess, because only the exit code crosses back from the command; the
words go to the terminal serving the page. The real refusal was the
new "Take the lead's recommendation after" box: its placeholder reads
"never", so people type never - or 10, or 1 hour - and none of those
parsed as a duration.
Reproduced against 0.42.0 through a sandboxed daemon, with no agent on
PATH so nothing could launch: "never", "10" and "1 hour" in that box
each gave the template message; an empty box got as far as the agent
check.
never,off,noneandnomean no timed answer. For a run theyoverride a team's own setting, and the page passes nothing for them.
bare number is still refused, since ten of one unit is not ten of
another.
anything, in the same words
team runuses. The fallback for anyother exit 2 no longer mentions templates, which the page never
offers, and points at the terminal instead.
broke the whole run: a value starting with a dash is read as an
option ("Option does not have a name"). The marker is taken off, and
criteria travel as --done-when=... so one that truly starts with a
dash still arrives as a value.
StartFormTests gains tests for each, including one that parses the
page's own argument list with team run's settings class and checks the
goal, the criteria (one starting with a dash) and the duration arrive
intact. Two existing assertions changed from the separate
"--done-when", value pair to the joined form; their point - one option
per criterion - is unchanged. Put back to main's DashboardActions, the
new and updated tests fail (7 of 23).