-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validation not working when project is connected to Jazz source control #201
Comments
Hi, interesting case; we'll have a look. At first sight it seems that there are couple of places which can be broken by using scheme assumption. Hopefully this can be fixed, but we need to investigate. |
Hi, I did some debugging and it seems that the plugin expected that the URI scheme always is 'file:'.
I applied this fix and everything seems to be working just fine and the tests are passing (https://github.com/bastidest/RED/commit/561192fb4b90a468d164b2f70ccf8b6ae2e6565b). Are there any other dependencies I am not aware of? Do you suggest moving this code in a Util class? Thank you |
Great! I will test it when it's released. |
@bastidest This looks alright at first sight. We would need to test how does it behave with some remotely linked filesystems (e.g. via Remote System Explorer) as some of our clients were using it in daily work. |
@michalanglart Sure, do you know how to test this / are there tests available? I don't know the framework very well (I just read 'if(foo.equals("Remote")' in some places). |
I was refering to eclipse plugin called Remote System Explorer. This is a plugin which allows user to see some remote filesystems like if it would be part of their workspace/projects. In short you're seeing in navigator the files which are not part of local filesystem but instead they are remotely connected for example via SSH. Those files however have different URI schemes than As far as I remember we do not have automatic tests for RSE integration since we've only had few minor issues raised for that and on the other hand it would require us to set up some environment in which this integration could be tested. |
I tried out working with the Remote System Explorer and created a project from a remote destination. It does not seem to be working both before and after my changes. Can anyone provide or test a concrete example/use case of a RED Project in conjunction with the RSE? When I configure a RSE project folder as RED Project I get a NPE on this line: Line 29 in bc91515
I think I moved the changes I made into a helper class and applied the scheme transformation only if the scheme is The changes can be found here: bastidest/RED@58d031f50a152ae86e7a6b11928369b6197eff1f Let me know if I should create a pull request. |
This is precisely what I was afraid of (NPE when projects are outside the local file system) when looking at proposal to replace all This may be true that currently RED might again not work with remotely connected file systems (as I said we do not test it), however in the past we were making some changes in order to fix some problems for users working with such remote systems. Overall it would be the best to:
together. |
This problem can be reproduced without using IBM Jazz Source Control. It is sufficient to use any other plugin which is able to provide some local but non- |
Would you be comfortable with applying this workaround for IBM Jazz Source Control and opening another more general Issue for non-
The Plugin would be perfectly functional for my use-case because the |
I think we don't need another issue. We'll just fix this in more general case. I'm looking into it and it seems we can fix that for next release. As to your workaround proposed in https://github.com/bastidest/RED/commit/58d031f50a152ae86e7a6b11928369b6197eff1f : there are 2 problems with it:
From my investigation it seems that there are 2 possible fixes:
or the second one:
Both seem to work with the latter being more clear and according to javadocs for methods used it does precisely what we want to achieve. The first one seem to work too but I'm not yet sure if it is equivalent to second.
Ugh, this sounds awfully bad. We'll make it work. |
Fixing multiple problems occuring when projects uses eclipse filesystem other than file:/ which is however local in underlying OS filesystem
Fixing couple of major problems when preventing editor opening and validating when remote filesystems are used as linked part of projects
Fix for debugger issue found in testing
fix for exception thrown under linux when windows absolute paths are used
I tested this fix today. Looks like validation is now working ok with IBM Jazz source control. Tested in:
|
Great to hear that. Closing - fixed in RED 0.8.8 |
Validation is not working when project is connected to IBM Jazz source control.
Validation error is displayed after modifying robotframework files.
Validation error ruins RED's validation functionality so many RED's helpful capabilities are also not working.
Eclipse error log:
eclipse.buildId=4.7.3.M20180301-0715
java.version=1.8.0_102
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -data file:/home/username/eclipse-workspace/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product
org.eclipse.core.jobs
Error
Tue Apr 03 14:18:42 EEST 2018
An internal error occurred during: "Validating".
java.lang.IllegalArgumentException: URI scheme is not "file"
at java.io.File.(File.java:421)
at org.robotframework.ide.eclipse.main.plugin.model.RobotProject.lambda$1(RobotProject.java:233)
at org.robotframework.ide.eclipse.main.plugin.model.RobotProject.lambda$0(RobotProject.java:139)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)
at com.google.common.collect.CollectSpliterators$1FlatMapSpliterator.lambda$forEachRemaining$1(CollectSpliterators.java:246)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at com.google.common.collect.CollectSpliterators$1FlatMapSpliterator.forEachRemaining(CollectSpliterators.java:246)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
at org.robotframework.ide.eclipse.main.plugin.model.RobotProject.getStandardLibraries(RobotProject.java:138)
at org.robotframework.ide.eclipse.main.plugin.model.RobotProject.getLibrarySpecificationsStream(RobotProject.java:194)
at org.robotframework.ide.eclipse.main.plugin.model.RobotProject.getLibrarySpecifications(RobotProject.java:207)
at org.robotframework.ide.eclipse.main.plugin.project.build.validation.ValidationContext.collectLibraries(ValidationContext.java:102)
at org.robotframework.ide.eclipse.main.plugin.project.build.validation.ValidationContext.(ValidationContext.java:85)
at org.robotframework.ide.eclipse.main.plugin.project.build.RobotArtifactsValidator.runValidation(RobotArtifactsValidator.java:161)
at org.robotframework.ide.eclipse.main.plugin.project.build.RobotArtifactsValidator.access$3(RobotArtifactsValidator.java:148)
at org.robotframework.ide.eclipse.main.plugin.project.build.RobotArtifactsValidator$3.runInWorkspace(RobotArtifactsValidator.java:133)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Assumption:
This error happens because RED is expecting URI Scheme to be "file:".
In my case IBM Jazz source control is used and URI scheme is returned as "sourcecontrol:".
My project's local folder structure:
/home/username/eclipse-workspace/project-name/red.xml
Similar URI scheme issue is also handled here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=366652
The text was updated successfully, but these errors were encountered: