Skip to content

Select sets and not datasets in processes

see #1712 (closed)

Migration:

  1. Create the ProcessDatasetSet model.
  2. Create ProcessDatasetSet instances for all of the sets from ProcessDataset, using an UNNEST like for DatasetSet. You will need to join on DatasetSet to find the set_id, and that should implicitly exclude any set names that were in ProcessDataset.sets and that do not exist.
  3. Drop ProcessDataset.

The ProcessDataset model is replaced by ProcessDatasetSet, linking a process to a DatasetSet. Dataset processes will now require users to select sets directly, rather than select datasets and then play around with checkboxes.

Endpoints:

ListProcessDatasets is used by base-worker, but we got the greenlight to mess with it, as MLProd seems to actually prefer working with sets rather than datasets. It should be renamed ListProcessSets, because ListProcessDatasetSets is quite a mouthful. Its response now includes the set ID, set name, and dataset.

CreateProcessDataset and DestroyProcessDataset are renamed CreateProcessSet and DestroyProcessSet. It might be easiest to have them use /api/v1/<process_id>/set/<set_id>/ directly, but there is more freedom here as these endpoints are only used by the frontend.

UpdateProcessDataset and PartialUpdateProcessDataset are removed, since they were used to select sets within a dataset.