Page MenuHomePhabricator

Include batch file context lines when throwing an error
Closed, DeclinedPublic

Description

For tasks like T351449, it would be useful to include some context from the batch file used in the query when an exception occurs. This can be done with e.g. grep -C 5 to get 5 lines of context around an IP address in a batch file. I am not sure what the ideal number of lines would be, but some amount of context would be better than nothing.

Event Timeline

Would the context be useful? Are you saying that when a particular IP fails we should grep around that IP from the sql file? From my experience, the IP failing on an import is normally a one-off (eg. duplicate IP) and knowing the IPs around it wouldn't affect anything. If it fails on an import, context around the statement that failed (which is returned) and context around the job (not returned) have been the most useful pieces of information.