Make dataset_def_name_newest_snapshot return an error if there are no snapshots
I was wondering if it's possible to have samweb throw an error when dataset_def_name_newest_snapshot doesn't find a snapshot for the given definition, rather than returning an empty file list. Sometimes we make compound definitions out of snapshots (e.g.: "dataset_def_name_newest_snapshot def1 minus isparentof:(dataset_def_name_newest_snapshot def2)" and occasionally a non-snapshotted definition name sneaks into one of these, leading to confusing results when the subquery just returns nothing. If instead samweb could throw an error saying "No applicable snapshots found for definition name 'blah'" instead, that would save us lots of headache.
Is this doable?
#1 Updated by Robert Illingworth over 2 years ago
- Status changed from New to Assigned
- % Done changed from 0 to 70
This is at least partially working:
$ samweb -e samdev list-files dataset_def_name_newest_snapshot no_snapshots Definition 'no_snapshots' returns no snapshots; cannot evaluate dataset_def_name_newest_snapshot dimension
I still have to test it gives the right results for actual snapshots and write some test cases.