-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ttx_diff] Retry normalizer on failure #1040
Conversation
We have spurious normalizer failures sometimes, and this will now check for those cases and retry (up to five times) if they occur.
if not (can_skip and out_path.is_file()): | ||
temppath = font_file.parent / "markkern.txt" | ||
cmd = [ | ||
"timeout", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this was already metnioned somewhere but, I couldn't find this timeout
command on my macOS 14.7 environment. I had to do brew install coreutils
and then I had to symlink gtimeout to timeout. I suppose the 'g' stands for GNU and brew doesn't want to step on macos feet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yes you will need coreutils
, but I don't recall having to do an additional symlink? I would only expect the g
prefix on commands that are also included by the system (and I just double checked this and brew install coreutils
was enough for me?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be OK to either make timeout optional, off by default, or to only do it if which timeout
indicates it exists. I think I prefer the flag option so CI can't accidentally lose timeout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh actually subprocess.run has a timeout parameter so we might not even need to use an external command for this, since we are actually relying on subprocess already?
https://docs.python.org/3/library/subprocess.html#subprocess.run
We have spurious normalizer failures sometimes, and this will now check for those cases and retry (up to five times) if they occur.
JMM