-
Notifications
You must be signed in to change notification settings - Fork 205
Add a definition of function for the deployment frequency graph #1179
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
Changes from 5 commits
2765192
174d9a8
4bd4505
117bd27
fae84f5
566976b
e1084a5
4cf59c7
d501d70
b87b50b
b24c7a4
d2c5d9d
e6b4ba3
dab071c
26663a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1309,3 +1309,12 @@ func (a *WebAPI) ListAPIKeys(ctx context.Context, req *webservice.ListAPIKeysReq | |||||
| Keys: apiKeys, | ||||||
| }, nil | ||||||
| } | ||||||
|
|
||||||
| // GetApplicationDeploymentFrequency [WIP] Made a temporary implementation to satisfy interface | ||||||
| func (a *WebAPI) GetApplicationDeploymentFrequency(ctx context.Context, req *webservice.GetApplicationDeploymentFrequencyRequest) (*webservice.GetApplicationDeploymentFrequencyResponse, error) { | ||||||
|
||||||
| func (a *WebAPI) GetApplicationDeploymentFrequency(ctx context.Context, req *webservice.GetApplicationDeploymentFrequencyRequest) (*webservice.GetApplicationDeploymentFrequencyResponse, error) { | |
| func (a *WebAPI) GetApplicationDeploymentFrequency(_ context.Context, _ *webservice.GetApplicationDeploymentFrequencyRequest) (*webservice.GetApplicationDeploymentFrequencyResponse, error) { |
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.
nit:
// GetInsightData returns the accumulated insight data.
func (a *WebAPI) GetInsightData(_ context.Context, _ *webservice.GetInsightDataRequest) (*webservice.GetInsightDataResponse, error) {
return nil, status.Error(codes. Unimplemented, "")
}
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,6 +85,9 @@ service WebService { | |
| rpc GenerateAPIKey(GenerateAPIKeyRequest) returns (GenerateAPIKeyResponse) {} | ||
| rpc DisableAPIKey(DisableAPIKeyRequest) returns (DisableAPIKeyResponse) {} | ||
| rpc ListAPIKeys(ListAPIKeysRequest) returns (ListAPIKeysResponse) {} | ||
|
|
||
| // Insights | ||
| rpc GetApplicationDeploymentFrequency(GetApplicationDeploymentFrequencyRequest) returns (GetApplicationDeploymentFrequencyResponse) {} | ||
| } | ||
|
|
||
| message AddEnvironmentResponse { | ||
|
|
@@ -401,3 +404,13 @@ message ListAPIKeysRequest { | |
| message ListAPIKeysResponse { | ||
| repeated model.APIKey keys = 1; | ||
| } | ||
|
|
||
| message GetApplicationDeploymentFrequencyRequest { | ||
|
||
| string application_id = 1 [(validate.rules).string.min_len = 1]; | ||
|
||
| repeated int64 dates = 2; | ||
|
||
| } | ||
|
|
||
| message GetApplicationDeploymentFrequencyResponse { | ||
| // key: date, value: deployment_count_of_the_day | ||
| map<int64, int64> deployment_counts = 1; | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can abstract the models/definitions around this The web client sends a request that includes:
and the response will contain either a list of data points or an error. Here are suggestions:
message InsightDataPoint {
int64 timestamp
float value
}
enum InsightMetricsKind {
DEPLOYMENT_FREQUENCY
CHANGE_FAILURE_RATE
...
}
enum InsightStep {
DAILY
WEEKLY
...
}
rpc GetInsightData()...
message GetInsightDataRequest{
InsightMetricsKind metrics_kind;
...
}
message GetInsightDataResponse {
int64 updated_at;
repeated InsightDataPoint data_points;
}
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks good. Some metrics kind may not be able to be represented by only timestamp and value alone, but then let's reconsider it at that time.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good :) |
||
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.
ctxis unused in GetApplicationDeploymentFrequency