Skip to content

Commit

Permalink
Deprecate lsp service, merged rpcs with runner service.
Browse files Browse the repository at this point in the history
  • Loading branch information
BugDiver authored and nehashri committed Oct 21, 2019
1 parent 3c353a3 commit 632bca6
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 20 deletions.
43 changes: 30 additions & 13 deletions lsp.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,35 @@ option java_package = "com.thoughtworks.gauge";

import "messages.proto";

// Empty is a blank response, to be used when there is no return expected.
message Empty {}

service lspService {
rpc GetStepNames (StepNamesRequest) returns (StepNamesResponse);
rpc CacheFile (CacheFileRequest) returns (Empty);
rpc GetStepPositions (StepPositionsRequest) returns (StepPositionsResponse);
rpc GetImplementationFiles (Empty) returns (ImplementationFileListResponse);
rpc ImplementStub (StubImplementationCodeRequest) returns (FileDiff);
rpc ValidateStep (StepValidateRequest) returns (StepValidateResponse);
rpc Refactor (RefactorRequest) returns (RefactorResponse);
rpc GetStepName (StepNameRequest) returns (StepNameResponse);
rpc GetGlobPatterns (Empty) returns (ImplementationFileGlobPatternResponse);
rpc KillProcess (KillProcessRequest) returns (Empty);
rpc GetStepNames (StepNamesRequest) returns (StepNamesResponse){
option deprecated = true;
};
rpc CacheFile (CacheFileRequest) returns (Empty){
option deprecated = true;
};
rpc GetStepPositions (StepPositionsRequest) returns (StepPositionsResponse){
option deprecated = true;
};
rpc GetImplementationFiles (Empty) returns (ImplementationFileListResponse){
option deprecated = true;
};
rpc ImplementStub (StubImplementationCodeRequest) returns (FileDiff){
option deprecated = true;
};
rpc ValidateStep (StepValidateRequest) returns (StepValidateResponse){
option deprecated = true;
};
rpc Refactor (RefactorRequest) returns (RefactorResponse){
option deprecated = true;
};
rpc GetStepName (StepNameRequest) returns (StepNameResponse){
option deprecated = true;
};
rpc GetGlobPatterns (Empty) returns (ImplementationFileGlobPatternResponse){
option deprecated = true;
};
rpc KillProcess (KillProcessRequest) returns (Empty){
option deprecated = true;
};
}
3 changes: 3 additions & 0 deletions messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ message KeepAlive {
string pluginId = 1;
}

// Empty is a blank response, to be used when there is no return expected.
message Empty {}

/// This is the message which gets transferred all the time
/// with proper message type set
/// One of the Request/Response fields will have value, depending on the MessageType set.
Expand Down
102 changes: 95 additions & 7 deletions runner.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,118 @@ option csharp_namespace = "Gauge.Messages";
option java_package = "com.thoughtworks.gauge";

import "messages.proto";
import "lsp.proto";
/*
This is done to get the Empty message.
We should aim to merge the lspService with Runner service.
The Empty message should be moved to messages.proto, so that latest it can
be used for plugin services as well.
*/


service Runner {
// ValidateStep is a RPC to validate a given step.
//
// Accepts a StepValidateRequest message and returns a StepValidateResponse message
rpc ValidateStep (StepValidateRequest) returns (StepValidateResponse);

// SuiteDataStoreInit is a RPC to initialize the suite level data store.
//
// Accepts a Empty message and returns a ExecutionStatusResponse message
rpc SuiteDataStoreInit(Empty) returns (ExecutionStatusResponse);

// ExecutionStarting is a RPC to tell runner to execute Suite level hooks.
//
// Accepts a ExecutionStartingRequest message and returns a ExecutionStatusResponse message
rpc ExecutionStarting(ExecutionStartingRequest) returns (ExecutionStatusResponse);

// SpecDataStoreInit is a RPC to initialize the spec level data store.
//
// Accepts a Empty message and returns a ExecutionStatusResponse message
rpc SpecDataStoreInit(Empty) returns (ExecutionStatusResponse);

// SpecExecutionStarting is a RPC to tell runner to execute spec level hooks.
//
// Accepts a SpecExecutionStartingRequest message and returns a ExecutionStatusResponse message
rpc SpecExecutionStarting(SpecExecutionStartingRequest) returns (ExecutionStatusResponse);

// ScenarioDataStoreInit is a RPC to initialize the scenario level data store.
//
// Accepts a Empty message and returns a ExecutionStatusResponse message
rpc ScenarioDataStoreInit(Empty) returns (ExecutionStatusResponse);

// ScenarioExecutionStarting is a RPC to tell runner to execute scenario level hooks.
//
// Accepts a ScenarioExecutionStartingRequest message and returns a ExecutionStatusResponse message
rpc ScenarioExecutionStarting(ScenarioExecutionStartingRequest) returns (ExecutionStatusResponse);

// StepExecutionStarting is a RPC to tell runner to execute step level hooks.
//
// Accepts a StepExecutionStartingRequest message and returns a ExecutionStatusResponse message
rpc StepExecutionStarting(StepExecutionStartingRequest) returns (ExecutionStatusResponse);

// ExecuteStep is a RPC to tell runner to execute a step .
//
// Accepts a ExecuteStepRequest message and returns a ExecutionStatusResponse message
rpc ExecuteStep(ExecuteStepRequest) returns (ExecutionStatusResponse);

// StepExecutionEnding is a RPC to tell runner to execute step level hooks.
//
// Accepts a StepExecutionEndingRequest message and returns a ExecutionStatusResponse message
rpc StepExecutionEnding(StepExecutionEndingRequest) returns (ExecutionStatusResponse);

// ScenarioExecutionEnding is a RPC to tell runner to execute Scenario level hooks.
//
// Accepts a ScenarioExecutionEndingRequest message and returns a ExecutionStatusResponse message
rpc ScenarioExecutionEnding(ScenarioExecutionEndingRequest) returns (ExecutionStatusResponse);

// SpecExecutionEnding is a RPC to tell runner to execute spec level hooks.
//
// Accepts a SpecExecutionEndingRequest message and returns a ExecutionStatusResponse message
rpc SpecExecutionEnding(SpecExecutionEndingRequest) returns (ExecutionStatusResponse);

// ExecutionEnding is a RPC to tell runner to execute suite level hooks.
//
// Accepts a ExecutionEndingRequest message and returns a ExecutionStatusResponse message
rpc ExecutionEnding(ExecutionEndingRequest) returns (ExecutionStatusResponse);


// GetStepNames is a RPC to get all the available steps from the runner.
//
// Accepts a StepNamesRequest message and returns a StepNamesResponse
rpc GetStepNames (StepNamesRequest) returns (StepNamesResponse);

// CacheFile is a RPC to tell runner to load/reload/unload a implementation file.
//
// Accepts a CacheFileRequest message and returns a Empty message
rpc CacheFile (CacheFileRequest) returns (Empty);

// GetStepPositions is a RPC to get all availabe steps in file.
//
// Accepts a StepPositionsRequest message and returns a StepPositionsResponse message
rpc GetStepPositions (StepPositionsRequest) returns (StepPositionsResponse);

// GetImplementationFiles is a RPC get all the existing implementaiton files.
//
// Accepts a Empty and returns a ImplementationFileListResponse message.
rpc GetImplementationFiles (Empty) returns (ImplementationFileListResponse);

// ValidateStep is a RPC to to ask ruuner to add a given implementation to given file.
//
// Accepts a StubImplementationCodeRequest and returns a FileDiff message.
rpc ImplementStub (StubImplementationCodeRequest) returns (FileDiff);

// GetStepName is a RPC to get information about the given step.
//
// Accepts a StepNameRequest message and returns a StepNameResponse message.
rpc GetStepName (StepNameRequest) returns (StepNameResponse);

// GetGlobPatterns is a RPC to get the file path pattern which needs to be cached.
//
// Accepts a Empty message and returns a ImplementationFileGlobPatternResponse message.
rpc GetGlobPatterns (Empty) returns (ImplementationFileGlobPatternResponse);

// Refactor is a RPC to refactor a given step in implementation file.
//
// Accepts a RefactorRequest message and returns a RefactorResponse message.
rpc Refactor (RefactorRequest) returns (RefactorResponse);

// KillProcess is a RPC tell runnner to stop grpc server and kill the runner process.
//
// Accepts a KillProcessRequest message and returns a Empty message.
rpc KillProcess (KillProcessRequest) returns (Empty);

}

0 comments on commit 632bca6

Please sign in to comment.