Opened 9 years ago
Closed 9 years ago
#2409 closed defect (done)
Dependent plugins of programmable items cannot be determined through serialization
Reported by: | abeham | Owned by: | ascheibe |
---|---|---|---|
Priority: | medium | Milestone: | HeuristicLab 3.3.12 |
Component: | Hive.Client | Version: | 3.3.11 |
Keywords: | Cc: |
Description (last modified by abeham)
We have an issue with programmable items that are sent to HIVE.
These items may use classes from plugins that are not dependencies of the plugin where the programmable item is contained in. These classes may not appear in the serialized representation of the programmable item. Thus the HIVE client does not know that these plugins need to be included.
The solution is to introduce an interface IProgrammableItem in HeuristicLab.Core which is then implemented by all programmable items that currently exist. The Hive client has to check whether such a type is present and in that case send all loaded plugins to Hive.
The discussed alternative solution was to introduce a method in that interface that would return all referenced plugins from the compiled assembly. The downside is that we may lose that information, e.g. when serializing those items to a .hl file. If we restore that file later and send it to HIVE we would have to recompile all of the items to recover that information which is not possible due to the slow compilation process. This could be mitigated by having a common base class that extracts that information from the compiled assembly. Ticket #2410 describes the implementation of a common base class.
Change History (9)
comment:1 Changed 9 years ago by abeham
- Description modified (diff)
comment:2 Changed 9 years ago by abeham
- Status changed from new to accepted
comment:3 Changed 9 years ago by abeham
- Owner changed from abeham to ascheibe
- Status changed from accepted to assigned
comment:4 Changed 9 years ago by ascheibe
- Status changed from assigned to accepted
r12621 added support for IProgrammableItem in Hive
comment:5 Changed 9 years ago by ascheibe
- Owner changed from ascheibe to abeham
- Status changed from accepted to assigned
comment:6 Changed 9 years ago by ascheibe
- Owner changed from abeham to ascheibe
- Status changed from assigned to accepted
comment:7 Changed 9 years ago by ascheibe
- Owner changed from ascheibe to abeham
- Status changed from accepted to reviewing
r12644 simplified IProgrammableItem discovery
comment:8 Changed 9 years ago by abeham
- Owner changed from abeham to ascheibe
- Status changed from reviewing to readytorelease
r12673: corrected check
I changed the check as I was not completely sure if GetInterfaces() fully expands to every interface in an inheritance hierarchy. If not the equality check would fail if a type would implement a derived interface from IProgrammableItem. Also using IsAssignableFrom makes the code cleaner IMO.
r12616: Added IProgrammableItem interface, implemented the interface in ProgrammableOperator, Script, and the *ProgrammableProblems
Please make sure that HIVE sends all loaded plugins when uploading a job/task that contains an IProgrammableItem