Expose ${ISOLATED_OUTDIR} to isolated scripts runtime |
|||
Issue description
Dumping data into ${ISOLATED_OUTDIR} will allow swarming infrastructure to archive those data. This is a great places to dumb data such as: traces, video files, browser log,...
I originally thought ${ISOLATED_OUTDIR} is exported as an environment variable for all swarming tests, but it doesn't seems so (https://codereview.chromium.org/2429273003 failed to dumb the data in ${ISOLATED_OUTDIR}).
+Marc: I think the easiest way is to make a change to https://cs.chromium.org/chromium/build/scripts/slave/recipe_modules/chromium_tests/steps.py?rcl=0&l=1052 to export ${ISOLATED_OUTDIR} as environment variable, as this would be part of the contract of isolated_scripts API. What do you think?
,
Oct 19 2016
I'd prefer not. If the output directory becomes a task ambient property, it'll open a can of worms. Trust me, it'll be unmaintainable and unrefactorable within 4 years max. Have your wrapper python script use environment variables based in arguments passed on the command line if you want, but do not assume Swarming sets any. This keeps self-containment, which is an important property.
,
Oct 19 2016
So here is the new proposal: we change the API of isolated_scripts to also accept an optional "--isolated-outdir" flag. Then on the recipe side, I will change SwarmingIsolatedScriptTest to add "--isolated-outdir=${ISOLATED_OUTDIR}".
What do you think?
,
Oct 19 2016
What are you trying to do with these files? You just want to have them around in case you need to reference them later? Manually or through the recipe? I am not sure how long they stay on the swarmed bot, but you can always visit the task page and download any output from the test. We just need to be careful since we already have two special cases in the recipe for swarming output, so we want to make sure we think about that when trying to determine how to access the rest of this data.
,
Oct 19 2016
Emily: here are the use cases:
1) If the test fails, it would be very useful to look at detailed chrome debug log saved in the outdir.
2) If the test timing blows up, the trace files we save will tell which has taken so much time
3) For the case of system health smoke test, I also the video recording which help i) figure out what went wrong if the test crashes & ii) makes it easy for me to get a quick idea of what the benchmark is doing
I believe adding support for ${ISOLATED_OUTDIR} is not special case, since it's a swarming infra feature that data saved in this folder is meant to be archived. I am not sure how gtest_swarming is doing this though
,
Oct 19 2016
About comment #3; this is already done but not in a formal way; it's hacked in in swarming/api.py, v8/testing.py and ios/api.py. I think it's a good idea to formalize this if possible. About comment #4; the files are always deleted after a task per definition. But they stay on the isolated server and it is possible to reference them through the swarming task, as you noted. What Ned asks to archive these files in the first place.
,
Jan 16
,
Jan 16
|
|||
►
Sign in to add a comment |
|||
Comment 1 by nedngu...@google.com
, Oct 19 2016