mff-uk / odcs

ODCleanStore
1 stars 11 forks source link

DPU replace rework - validate DPU #505

Open jakubklimek opened 11 years ago

jakubklimek commented 11 years ago

I wanted to replace my BP DPU. I accidentaly clicked on another JAR from another DPU, which, however, was also deployed on the ODCS instance. This resulted in overwrite of the other DPU and I don't want to think about the consequences of having multiple DPUs linked to a single file.

Add some distinguishing folder to the /dpu directory based on, for example, the ID of the DPU template so that all my DPU Templates can have the same JAR name and so that I have no chance of overwriting foreign DPU in the process (to be extreme).

skodapetr commented 11 years ago

In current "future" version, the DPU's name is determined by first upload. The name is not changing when replace, so there should be no way how to reproduce this on new version.

When creating new dpu, for example you upload file ABC-0.0.1.jar .. then the name is ABC.jar .. if you have other format, for example A_B.jar then the full name (A_B).jar is used. There can be name collisions, but in such case the user is inform and the DPU is not uploaded.

jakubklimek commented 11 years ago

So, my approach would be better - no collisions, no need to inform the user and the name is preserved, so I see at first glance that it is the one I just uploaded if I need to check?

jakubklimek commented 11 years ago

From Skype: Only level 1 DPUs can be replaced, Level 2 (DPU link + config) will see "This DPU is derived from ..." and no replace button. After replace, all instance configuration are checked if they are still valid. When no, email should be sent. The actual email sending will wait until email support is added/tested, but invalid configuration has to work anyway.

skodapetr commented 11 years ago

We now have support for DPUs in subdirectories. I will discuss the configuration validation with Thomas as we have no clearly define the configuration "validity" yet.

tomas-knap commented 11 years ago

Remains: Check validity of configurations when DPU template changes. Send mail when there is a problem.

tomas-knap commented 11 years ago

Should be checked by backend

tomas-knap commented 11 years ago

Now the problems with validity of configurations is realized when launching/opening DPU. This issue should validate configuration after replace

tomas-knap commented 11 years ago

Could be also validated once per day for example

skodapetr commented 10 years ago

Just the update: The "validation" can be added by author of the DPU in deserialize method when the DPU is loaded. So it's author responsibility to provide back compatible implementation that will in deserialize method takes care about migration to the newer version. Still this is not on replace validate-all solution.