weather-tools icon indicating copy to clipboard operation
weather-tools copied to clipboard

Verify gcs target

Open blackvvine opened this issue 3 years ago • 3 comments

Fixes #209

blackvvine avatar Aug 15 '22 15:08 blackvvine

I just re-read #209 -- a general thought: Should the fix even be in the config parser? It seems like the source of the error has to do with the pipeline args / environment.

Furthermore, another possible fix is to change what kinds of errors we choose to retry and others we let bring down the pipeline. These are generally set here: https://github.com/google/weather-tools/blob/65b484ebdbc6af3c9311dbd097bf14712d96df4d/weather_dl/download_pipeline/util.py#L20

alxmrs avatar Sep 15 '22 17:09 alxmrs

I just re-read #209 -- a general thought: Should the fix even be in the config parser? It seems like the source of the error has to do with the pipeline args / environment.

Furthermore, another possible fix is to change what kinds of errors we choose to retry and others we let bring down the pipeline. These are generally set here:

https://github.com/google/weather-tools/blob/65b484ebdbc6af3c9311dbd097bf14712d96df4d/weather_dl/download_pipeline/util.py#L20

I see point that logically it might fit better in the error handler, but IMO it makes more sense for the check to be done in the arg parser since it's fail-fast. Even if we fix the error handler to tear down the job in case target location is unreachable, it does needlessly incur costs for the user to run the job up to the point of failure, and it takes somewhere between 5-20 minutes for it to reach there.

blackvvine avatar Sep 18 '22 21:09 blackvvine

Ok, the validation is very reasonable to me. I like the principle of failing fast.

My one nit is: this should at least occur in the run function and not in the parser, since it's testing resource choices rather than parsing (e.g. it's validating, not parsing).

alxmrs avatar Sep 23 '22 02:09 alxmrs