hundreds-father-404
11/24/2021, 8:40 PMpython_tests(timeout=120)
Should the value instead be like this?
"120s"
"10s"
"2m"
"1.5m"
A for the status quo, B for setting the time unit
Update going to accept both styles to avoid breaking BUILD filesfast-nail-55400
11/24/2021, 9:06 PMhundreds-father-404
11/24/2021, 9:06 PMfast-nail-55400
11/24/2021, 9:06 PMtimeout=120
and timeout="2m"
would both be validhundreds-father-404
11/24/2021, 9:07 PMfast-nail-55400
11/24/2021, 9:08 PMhundreds-father-404
11/24/2021, 9:09 PMpython_tests(timeout=5)
Probably 5 seconds, but could be 5 minutestimeout
type: int | None
default: None
A timeout (in seconds) used by each test file belonging to this target.
curved-television-6568
11/24/2021, 9:25 PMpython_tests(timeout_after="2m30s")
.. ? 😉hundreds-father-404
11/24/2021, 9:43 PMhappy-kitchen-89482
11/24/2021, 9:45 PMhundreds-father-404
11/24/2021, 9:47 PMchanging the type now would be disruptive to userscould be mitigated by
update-build-files
I more want to get this right for Go. I've been adding timeout support today. By extension, we would then "fix" Python and Shell to use the preferred approachlow priority?only a priority in that I want to get Go right
fast-nail-55400
11/24/2021, 9:55 PMhundreds-father-404
11/24/2021, 9:55 PMfast-nail-55400
11/24/2021, 10:00 PMhappy-kitchen-89482
11/24/2021, 10:24 PMhundreds-father-404
11/24/2021, 10:25 PMhappy-kitchen-89482
11/24/2021, 10:29 PM120
on the cmd line or in env vars, and just assume seconds. What happens with toml? Can an unquoted 120
be read as a string type?hundreds-father-404
11/24/2021, 10:32 PMtimeout
field uses Target API and we can teach it to be type str | int | None
for pants.toml
, what's relevant is [pytest].timeout_default
, which should also use this same affordance imo. Just verified that I can change type=str
and using an int in the TOML file still workshappy-kitchen-89482
11/24/2021, 10:32 PMhundreds-father-404
11/24/2021, 10:33 PMhappy-kitchen-89482
11/24/2021, 10:34 PMincalculable-yacht-75851
11/25/2021, 4:22 AMwitty-crayon-22786
11/29/2021, 7:03 PMhundreds-father-404
12/01/2021, 6:57 PMSince I'm very new to both pants and python I don't really have a strong opinion...Thank you for sharing your feedback, @incalculable-yacht-75851! It's a particularly helpful perspective, you don't have the curse of knowledge https://en.wikipedia.org/wiki/Curse_of_knowledge Agreed with those preferences.
However, is this change necessary?Not strictly. What we have works, only is suboptimal and I was hesitant to add timeouts to Go using a suboptimal implementation But I'm going to put this change down for now to focus on higher priority things. Will create a ticket to summarize the idea and discussion