Open smirnp opened 6 years ago
As we investigated via email the problem is not in the browser itself, but in the list of systems returned by the platform. For my one account (@gmail, Michael knows that) I see the list of 5-6 systems, while I have only one in git. For my second one (@agt) I see the same number of the systems, which I have in my git.
I just checked this on the platform. To me, the situation looks like the following: The AGT user sees 1 system. That is correct since he defined this system in one of his projects. The gmail user sees 6 systems while he only has defined 2 systems.
The problem is caused be the reusage of the same URI for different systems. The gmail user defined a http://project-hobbit.eu/resources/debs2017/debsparrotsystemexample
system. This appears already 5 times in our repository and causes the controller to list all 5 systems.
@yamalight, @denkv We have the problem that several systems share the same URI (because unexperienced users might simply copy an example system without changing its URI). As it can be seen, this creates problems inside our system (not only in the UI but also in the platform itself since it is not clear which system will be benchmarked).
Do you have a good idea how to handle this? Should we block all systems that are sharing the same URI? But that might be bad when it comes to example systems that are not executable because someone copied its file...
Can we enforce unique URIs for systems? Just rejecting creation with message "this URI is already used, please enter a different one" should solve this, right?
Upd: Considering users use gitlab to "create" their system, we can add a warning to user GUI when he has systems with conflicting URIs. Thoughts?
Just rejecting creation with message "this URI is already used, please enter a different one" should solve this, right?
Yes, it would solve it but it is not possible since the "act of creating a system" is uploading / creating a file in gitlab.
we can add a warning to user GUI when he has systems with conflicting URIs. Thoughts?
Good idea. I would also "block" the execution of experiments containing these systems (maybe that is what you meant with "rejecting creation" above.
From my point of view this makes only sense, if we are able to check that the "original" system with this URI still can be used. Otherwise two users A and B are not able to benchmark their systems just because B made a mistake (i.e., copied the system.ttl from A without changing the system URI). I have to check whether we can get access to creation times of files/projects via the Gitlab API...
Update: getting the creation date of a project is no problem. I would suggest to "block" the execution of system A that is "reusing" a URI of another system B when the other system has been defined in a project P_B that is older than the project P_A.
@MichaelRoeder yep, sounds good! :+1:
@MichaelRoeder maybe move that outline to issue description instead?
not possible since the "act of creating a system" is uploading / creating a file in gitlab.
Looks like it's possible to set up global hooks in gitlab if we want to prevent uploading of systems with duplicate URIs in the first place.
A global hook would be a solution but makes it harder to use something else than our Gitlab (makes it nearly impossible to implement #9). Since our platform should be able to handle different "sources" of benchmark and system definitions, it has to be able to handle URI conflicts, internally.
@romankorf and @Ennosigaeon
How do you would like to have the information, that a system has a problem and can not be chosen by the user? At the moment, the GUI Serverbackend returns List<SystemBean>
encapsulated inside a response.
SystemBean
to contain the error message
List<SystemBean>
and a list of messages
What do you think?
I think as long as the number of systems is limited (e.g. < 1000) it should be no problem to filter the systems in the frontend. We can simply remove all SystemBeans
containing a error message from the dropdown and display an alert containing all faulty system including the error message.
This should be quite forward to implement.
I added this information to the beans in the feature/UriCopyHandling136
branch.
Note that it has been added to benchmarks and systems (to their super class). I also created an example for both. The JSON that is received by the GUI client looks as follows.
Requesting benchmarks (faulty benchmark and another, normal benchmark):
[...
{
"type":"benchmarkBean",
"description":"This is a faulty benchmark used for testing!",
"errorMessage":"This image has the same URI as HOBBIT Platform Benchmark (http://w3id.org/hobbit/platform-benchmark/vocab#PlatformBenchmark) from gitadmin / platform-benchmark.",
"id":"http://w3id.org/hobbit/platform-benchmark/vocab#PlatformBenchmark",
"name":"Faulty Benchmark (Do not use me!)","configurationParamNames":[]
},{
"type":"benchmarkBean",
"description":"DEBS GC 2017 parrot tutorial benchmark",
"id":"http://project-hobbit.eu/resources/debs2017/debsparrotbenchmark",
"name":"DEBS GC 2017 parrot tutorial benchmark","configurationParamNames":[]},
...]
(the complete example can be found here)
For benchmarks, it would be good to simply filter the faulty beans (this can also be done in the GUI-Serverbackend). We don't have to show an error for them because we would display the error to all the users without knowing whether the current user is responsible for the problem or not.
Requesting benchmark details (faulty system and another, normal system)):
{
"type":"benchmarkBean",
"description":"This benchmark emulates the traffic created by benchmarking a SPARQL store to determine the maximal throughput of the platform.",
"id":"http://w3id.org/hobbit/platform-benchmark/vocab#PlatformBenchmark",
"name":"HOBBIT Platform Benchmark",
"configurationParamNames": [...],
"kpis":[...],
"systems":[
{
"description":"I am a faulty system used for testing!",
"errorMessage":"This image has the same URI as HOBBIT Platform Benchmark System 1 (http://w3id.org/hobbit/platform-benchmark/vocab#PlatformBenchSystem_1) from gitadmin / platform-benchmark-system.",
"id":"http://w3id.org/hobbit/platform-benchmark/vocab#PlatformBenchSystem_1",
"name":"Faulty System (Do not use me!)"
},{
"description":"The system needed to run the platform benchmark instantiating 1 system adapter.",
"id":"http://w3id.org/hobbit/platform-benchmark/vocab#PlatformBenchSystem_1",
"name":"HOBBIT Platform Benchmark System 1"
},...]}
(the complete example can be found here)
@MichaelRoeder Currently we have a merge conflict in PlatformControllerClient (develop). Can you please fix that, so that I can incorporate #193 easily?
@Ennosigaeon sure. Can you please create a pull request and assign me? Otherwise, I am not sure which branch I should merge :confused:
Pull request #203 is created and assigned to you.
merged.
I have implemented the necessary UI changes.
The problem still seems to be in the online platform. Under multiple accounts without the 'challenge organizer' role I'm able to execute all available systems compatible with selected benchmark: https://gyazo.com/b08515942c22de1808c51a880851052c
But do not see invalid systems warning, which I see under my 'challenge organizer' account (but 'duplicating' system is not included in the list)
Also I may register/unregister not-my systems for challenge tasks.
Original description
In MS Edge it looks, that the platform does not return the list of the systems either for registration into the challenge or for execution of the standalone experiment.
In Google Chrome it works fine
Problem
Several users define systems with the same URI (e.g., by copying the system.ttl file of another user). This leads to problems inside the platform which assumes that URIs are unique. We want to
Solution
Steps