Stefan Adelbert
05/16/2022, 4:25 AMAssetMaterialization
from a failure hook
I can see that it's possible from an op by calling OpExecutionContext.log_event
, but HookContext
doesn't provide the same mechanism. Is it reasonable to expect to be able to log an AssetMaterialization
from a failure hook, or is there some good reason why this is non-sensical?jamie
05/16/2022, 2:23 PMStefan Adelbert
05/17/2022, 12:58 AMdagster
to run data processing and automation tasks. The automation tasks tend to involve interacting with a web browser - I'm using selenium to interact with a headless firefox instance available to ops as a resource. I have the ability to take screenshots of the headless browser, which is particularly useful for fault finding issues, especially given that the browser is headless. I've been materializing each screenshot taken for a particular run against the same asset, i.e. there is an browser screenshot asset for each run with potentially several materializations, one for each screenshot. If there is some error in an op, I'd like to materialize a screenshot showing the state of the browser at the time of the failure, hence my query.
I get that this is probably not the intended use of asset materializations. I'm keen to hear your thoughts.jamie
05/20/2022, 5:15 PMtry except
block, and materializing the asset there, then reraise the error so the op still failsStefan Adelbert
05/24/2022, 6:26 AMjamie
05/24/2022, 2:18 PM