Skip to content
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

Can we improve reporting when request is out of time range? #194

Open
agstephens opened this issue Oct 28, 2021 · 0 comments
Open

Can we improve reporting when request is out of time range? #194

agstephens opened this issue Oct 28, 2021 · 0 comments
Assignees

Comments

@agstephens
Copy link
Contributor

When a user makes a request to rook and the selected time range is outside the available range the response is:

Some or all of the requested collection are not in the list of available data.

The details below show an example of the actual data and the requested range:

(rook) [root@rook-wps1 ~]# ./show-dump.py /gws/nopw/j04/cp4cds1_vol1/wps/prod/tmp/rook/pywps_process_wu8rrd6p/job-error.txt
Dumpfile: /gws/nopw/j04/cp4cds1_vol1/wps/prod/tmp/rook/pywps_process_wu8rrd6p/job_duzrtes8.dump
Workdir:  /gws/nopw/j04/cp4cds1_vol1/wps/prod/tmp/rook/pywps_process_wu8rrd6p
Status:   true
Workflow...
        Step 0:
                inputs -> {'pr': ['c3s-cmip6.CMIP.CAS.FGOALS-g3.historical.r1i1p1f1.day.pr.gn.v20190826']}
                Looked for data files in: /badc/cmip6/data/CMIP6/CMIP/CAS/FGOALS-g3/historical/r1i1p1f1/day/pr/gn/v20190826
                Found 167:
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18500101-18501231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18510101-18511231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18520101-18521231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18530101-18531231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18540101-18541231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18550101-18551231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18560101-18561231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18570101-18571231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18580101-18581231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18590101-18591231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18600101-18601231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18610101-18611231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18620101-18621231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18630101-18631231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18640101-18641231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18650101-18651231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18660101-18661231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18670101-18671231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18680101-18681231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18690101-18691231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18700101-18701231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18710101-18711231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18720101-18721231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18730101-18731231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18740101-18741231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18750101-18751231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18760101-18761231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18770101-18771231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18780101-18781231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18790101-18791231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18800101-18801231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18810101-18811231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18820101-18821231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18830101-18831231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18840101-18841231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18850101-18851231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18860101-18861231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18870101-18871231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18880101-18881231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18890101-18891231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18900101-18901231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18910101-18911231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18920101-18921231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18930101-18931231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18940101-18941231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18950101-18951231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18960101-18961231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18970101-18971231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18980101-18981231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_18990101-18991231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19000101-19001231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19010101-19011231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19020101-19021231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19030101-19031231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19040101-19041231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19050101-19051231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19060101-19061231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19070101-19071231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19080101-19081231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19090101-19091231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19100101-19101231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19110101-19111231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19120101-19121231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19130101-19131231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19140101-19141231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19150101-19151231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19160101-19161231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19170101-19171231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19180101-19181231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19190101-19191231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19200101-19201231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19210101-19211231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19220101-19221231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19230101-19231231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19240101-19241231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19250101-19251231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19260101-19261231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19270101-19271231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19280101-19281231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19290101-19291231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19300101-19301231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19310101-19311231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19320101-19321231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19330101-19331231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19340101-19341231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19350101-19351231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19360101-19361231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19370101-19371231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19380101-19381231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19390101-19391231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19400101-19401231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19410101-19411231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19420101-19421231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19430101-19431231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19440101-19441231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19450101-19451231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19460101-19461231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19470101-19471231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19480101-19481231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19490101-19491231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19500101-19501231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19510101-19511231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19520101-19521231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19530101-19531231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19540101-19541231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19550101-19551231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19560101-19561231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19570101-19571231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19580101-19581231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19590101-19591231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19600101-19601231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19610101-19611231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19620101-19621231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19630101-19631231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19640101-19641231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19650101-19651231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19660101-19661231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19670101-19671231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19680101-19681231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19690101-19691231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19700101-19701231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19710101-19711231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19720101-19721231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19730101-19731231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19740101-19741231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19750101-19751231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19760101-19761231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19770101-19771231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19780101-19781231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19790101-19791231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19800101-19801231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19810101-19811231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19820101-19821231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19830101-19831231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19840101-19841231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19850101-19851231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19860101-19861231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19870101-19871231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19880101-19881231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19890101-19891231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19900101-19901231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19910101-19911231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19920101-19921231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19930101-19931231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19940101-19941231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19950101-19951231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19960101-19961231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19970101-19971231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19980101-19981231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_19990101-19991231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20000101-20001231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20010101-20011231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20020101-20021231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20030101-20031231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20040101-20041231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20050101-20051231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20060101-20061231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20070101-20071231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20080101-20081231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20090101-20091231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20100101-20101231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20110101-20111231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20120101-20121231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20130101-20131231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20140101-20141231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20150101-20151231.nc
                        pr_day_FGOALS-g3_historical_r1i1p1f1_gn_20160101-20161231.nc
                steps -> {'subset_pr_1': {'run': 'subset', 'in': {'collection': 'inputs/pr', 'time': '2017-01-01/2022-01-01', 'area': '-9,17,13,40'}}}
                outputs -> {'output': 'subset_pr_1/output'}
                doc -> workflow
(rook) [root@rook-wps1 ~]# more /gws/nopw/j04/cp4cds1_vol1/wps/prod/tmp/rook/pywps_process_wu8rrd6p/job-error.txt
Traceback (most recent call last):
  File "/usr/local/anaconda/envs/rook/lib/python3.7/site-packages/rook/director/director.py", line 20, in wrap_director
    director = Director(collection, inputs)
  File "/usr/local/anaconda/envs/rook/lib/python3.7/site-packages/rook/director/director.py", line 46, in __init__
    self._resolve()
  File "/usr/local/anaconda/envs/rook/lib/python3.7/site-packages/rook/director/director.py", line 73, in _resolve
    raise InvalidCollection()
roocs_utils.exceptions.InvalidCollection: Some or all of the requested collection are not in the list of available data.

A better solution would be if we could raise and Exception that said:

The collection you have requested is only available for the time range <start> to <end>. Please ensure your time selection is within these limits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants