-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Added JSON-RPC back-end to Project API and removed deprecated VFS classes #6726
Conversation
Build # 4137 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/4137/ to view the results. |
if (url.contains("?")) { | ||
url += "&clientId=" + appContext.getApplicationId().orElse(""); | ||
} else { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both parts of if
should look the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improved by this commit
if (url.contains("?")) { | ||
url += "&clientId=" + appContext.getApplicationId().orElse(""); | ||
} else { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both parts of if
should look the same.
verify(asyncRequest).header(CONTENT_TYPE, APPLICATION_JSON); | ||
verify(asyncRequest).send(); | ||
// client.importProject(resourcePath, source); | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove if not needed.
assertEquals(2, prjsArgCaptor.getValue().size()); | ||
// List<NewProjectConfigDto> configs = Arrays.asList(prjConfig1, prjConfig2); | ||
// | ||
// client.createBatchProjects(configs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove if not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is already reworked be one of my previous commits, in general I'm not sure if it is a good idea to review the PR that is in a work-in-progress state, I mean you will have many of your remarks outdated and useless. Please watch "status" label to be aware of current PR status not to waste your time.
Reader reader = new BufferedReader(new InputStreamReader(composerFile.getInputStream())); | ||
return new Gson().fromJson(reader, JsonObject.class); | ||
private JsonObject readModel(Path projectFsPath) throws ServerException, IOException { | ||
return new Gson().fromJson(Files.newBufferedReader(projectFsPath), JsonObject.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to close reader here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with the logic, I did just source code adaptation to a new API, so I don't really know if we need to close reader here. If it matters for you, I guess you can ask an author.
fsManager.createDir(projectWsPath); | ||
InputStream inputStream = getClass().getClassLoader().getResourceAsStream(RESOURCE_NAME); | ||
String wsPath = resolve(projectWsPath, FILE_NAME); | ||
fsManager.createFile(wsPath, inputStream); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to close inputStream here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, I'm not sure if we need to close the stream here, probably we do, however this is out of scope of this issue. The PR already has like three hundreds of file changed, honestly, I see those and some other errors, but I haven't the slightest desire to mix those fixes with this huge PR. I'm sure that there will be enough PR-related bugs and errors.
If you are really concerned about such kind of errors (and I sincerely share your concern) I guess you can create a dedicated issue so we could later get back to it and fix all those bugs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created an issue: #6841.
String projectWsPath, Map<String, AttributeValue> attributes, Map<String, String> options) | ||
throws ForbiddenException, ConflictException, ServerException, NotFoundException { | ||
fsManager.createDir(projectWsPath); | ||
InputStream inputStream = getClass().getClassLoader().getResourceAsStream(RESOURCE_NAME); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to close inputStream here?
// | ||
// EventService eventService = new EventService(); | ||
// LocalVirtualFileSystemProvider vfsProvider = | ||
// new LocalVirtualFileSystemProvider(root, sProvider); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
String projectCheFolderWsPath = resolve(projectWsPath, CHE_FOLDER); | ||
|
||
if (!fsManager.existsAsDir(projectCheFolderWsPath)) { | ||
fsManager.createDir(projectCheFolderWsPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to check if a directory has been created here?
String cheFormatterWsPath = resolve(projectCheFolderWsPath, CHE_FORMATTER_XML); | ||
|
||
if (!fsManager.existsAsFile(cheFormatterWsPath)) { | ||
fsManager.createFile(cheFormatterWsPath, content); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to check if a file has been created here?
ci-test |
ci-test build report: |
Build # 4185 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/4185/ to view the results. |
ci-test |
ci-test build report: |
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
…classes Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
ci-test |
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
ci-test build report: |
ci-test |
ci-test build report: |
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
ci-test |
ci-test build report: |
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
ci-test |
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
Signed-off-by: Dmytro Kulieshov <dkuliesh@redhat.com>
ci-test |
ci-test build report: |
it is normal this PR has been closed ? looks like it was a work in progress since one month ? |
Created a new PR instead of this one #7380 |
Work is still in progress.
Original issue: #6122
Changes to Project Service:
Changes to Project Manager:
Changes to VFS
Changes to Search
What is yet to be done: