Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion odpf/optimus/runtime_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ service RuntimeService {
get: "/v1/project/{project_name}/job/{job_name}/replay/{id}"
};
}
rpc GetReplayList(GetReplayListRequest) returns (GetReplayListResponse) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we call ListReplays

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReplayList sounds better to me, but you have concern on this? And should we change the GetReplayStatus too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we considering replay as a resource? In that case, I guess it should be replays in endpoint and ListReplays in the method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replays seems more descriptive. but i'm seeing other endpoints are not in a plural word, for example when getting projects or resource specs. thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

understood why ListReplays is better, just went through the method naming convention.

Copy link
Contributor Author

@arinda-arif arinda-arif Aug 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems Optimus is using singular in all the endpoint, do you think it is acceptable to keep as it is @ravisuhag ? if not, we need to apply the changes to the others as well to keep it in uniform. cc @kushsharma

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Planning to resolve this and thinking to just follow the current Optimus convention to use singular, and if a change in convention is needed, will handle it in a different issue. Please let me know if you have any concern on this, @ravisuhag

option (google.api.http) = {
get: "/v1/project/{project_name}/replay/list"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should make it follow REST principles, do we need list?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to not use list

};
}
// TODO(kush.sharma): disabled ATM
//rpc DeleteResource(DeleteResourceRequest) returns (DeleteResourceResponse) {}

Expand Down Expand Up @@ -660,4 +665,21 @@ message RegisterJobEventRequest {
JobEvent event = 4;
}

message RegisterJobEventResponse {}
message RegisterJobEventResponse {}

message GetReplayListRequest {
string project_name = 1;
}

message GetReplayListResponse {
repeated ReplaySpec replay_list = 1;
}

message ReplaySpec {
string id = 1;
string job_name = 2;
string start_date = 3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not google.protobuf.Timestamp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm fine either way, but since start and end date is a date, i figured the response we are sending is already represented as expected, not in protobuf timestamp. any concern on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussed this and decided to use timestamp

string end_date = 4;
string state = 5;
google.protobuf.Timestamp created_at = 6;
}