aces / cbrain

CBRAIN is a flexible Ruby on Rails framework for accessing and processing of large data on high-performance computing infrastructures.
GNU General Public License v3.0
71 stars 43 forks source link

A new invalid Data Provider may break the Data Provider list page #1402

Closed MontrealSergiy closed 3 months ago

MontrealSergiy commented 3 months ago

Steps to reproduce

  1. Create a new smart Data Provider (e.g. Carmin), but do not fill Physical Data Location aka Full Directory Path. Actually, do not fill any fields but name, that should be enough

  2. Go to the Data Provider list.

Expected : you still can see the list of data providers

Observed: 500 error

prioux commented 3 months ago

Is this only with Carmin DPs or does this happen with other types?

prioux commented 3 months ago

We're going to junk all CARMIN stuff out of CBRAIN anyway, soon.

MontrealSergiy commented 3 months ago

Not only Carmin, just any smart

prioux commented 3 months ago

Well, then, identify which attributes are not set that cause the index page to fail and then

1) if a DP requires that attribute anyway, make sure the ActiveRecord validation rules ensures it cannot be saved without it 2) if a DP shoudl work without that attribute, then make sure the index page doesn't crash because of it's missing.

prioux commented 3 months ago

Make sure to list here which attributes are faulty, please; don't make a pull request righr away, I'd like to review them first.

MontrealSergiy commented 3 months ago

@real_provider is the source of issues. It needs a remote_path attribute

prioux commented 3 months ago

Do you meant remote_dir ? I can't find remote_path anywhere. And I don't see where in the DP index page the exception is raised.

prioux commented 3 months ago

Fixed in my most recent commit: https://github.com/aces/cbrain/commit/1702bfa01476ec0f1d1f8fa74317dd30bad32377