Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349952 - [server] Git Init should be a task
Summary: [server] Git Init should be a task
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Git (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.3 M1   Edit
Assignee: Szymon Brandys CLA
QA Contact:
URL:
Whiteboard: gsoc2011
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-21 10:33 EDT by Szymon Brandys CLA
Modified: 2012-01-19 11:44 EST (History)
1 user (show)

See Also:
Szymon.Brandys: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Szymon Brandys CLA 2011-06-21 10:33:48 EDT
Git Init should be a task. We also need to update tests when it is done.
Comment 1 Szymon Brandys CLA 2011-06-21 10:44:40 EDT
Piotrek, when you are looking at this bug and tests for Git Init, please add tests for missing cases like Bug 349868.
Comment 2 Tomasz Zarna CLA 2011-06-22 05:42:24 EDT
(In reply to comment #0)
> Git Init should be a task.

What's the rationale for that? Init is not supposed to be a long running operation.
Comment 3 Szymon Brandys CLA 2011-06-22 06:07:38 EDT
I think we already talked about that. Timeouts can happen not only for operations on remote Git servers. From time to time I can see timeouts during log operations and it may happen for status and init. The point is to use the task framework for all important operations to improve the end-user experience in case of such timeouts.

There is also a place for an improvement in our task framework. Right now, it always returns the task location and we need to check the task, even if the task was finished quickly. In such a case we could just return the result immediately instead of returning the task location. Then in most cases for operations like Git Init, there would be no task locations flying around between the client and server. Moreover we could decide whether we want to start an operation as a task or not, see Bug 350026.
Comment 4 Piotr Janik CLA 2011-06-22 10:35:40 EDT
Fix.
client: https://github.com/pjanik/orion.client/tree/bug349952
server: https://github.com/pjanik/orion.server/tree/bug349952

I've also added a test, which checks if the configuration (user.name and user.email) after git init operation is valid (Bug 349868).
Comment 5 Szymon Brandys CLA 2011-06-29 07:21:51 EDT
Fixed with da9330d6fff0770fef0bfb1554b85c4f963ab7a6 and a1cccf0254e0fec09366f5805ea89b25f382b939.