Skip to content
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

Add UpdateApplication to WebApi #1228

Merged
merged 1 commit into from Dec 10, 2020
Merged

Add UpdateApplication to WebApi #1228

merged 1 commit into from Dec 10, 2020

Conversation

khanhtc1202
Copy link
Member

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #1219

Does this PR introduce a user-facing change?:

NONE

@khanhtc1202
Copy link
Member Author

/cc @cakecatz

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 33.86%. This pull request decreases coverage by -0.10%.

File Function Base Head Diff
pkg/app/api/grpcapi/web_api.go WebAPI.UpdateApplication -- 0.00% +0.00%

@@ -56,6 +56,7 @@ service WebService {
rpc SyncApplication(SyncApplicationRequest) returns (SyncApplicationResponse) {}
rpc GetApplication(GetApplicationRequest) returns (GetApplicationResponse) {}
rpc GenerateApplicationSealedSecret(GenerateApplicationSealedSecretRequest) returns (GenerateApplicationSealedSecretResponse) {}
rpc UpdateApplication(UpdateApplicationRequest) returns (UpdateApplicationResponse) {}
Copy link
Member

Choose a reason for hiding this comment

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

nit: Move this to right beblow AddApplication.

}

message UpdateApplicationResponse {
bool completed = 1;
Copy link
Member

Choose a reason for hiding this comment

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

Is this necessary? No error already means the operation was successfully completed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't have strong opinion about this 😅 let's remove the field 🆗

})
if err != nil {
a.logger.Error("failed to update application", zap.Error(err))
return nil, status.Error(codes.Internal, "Failed to update application")
Copy link
Member

Choose a reason for hiding this comment

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

Not in the scope of this PR, but I found an issue around this error.
A validation check is done before putting into the database. So in some cases, this is not an Internal error.
https://github.com/pipe-cd/pipe/blob/master/pkg/datastore/deploymentstore.go#L136

Can you please raise an issue for this?

@nghialv
Copy link
Member

nghialv commented Dec 10, 2020

/approve

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by nghialv.

Approvers can cancel the approval by writing /approve cancel in a comment. Any additional commits also will change this pull request to be not-approved.

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 33.80%. This pull request decreases coverage by -0.10%.

File Function Base Head Diff
pkg/app/api/grpcapi/web_api.go WebAPI.UpdateApplication -- 0.00% +0.00%

@pipecd-bot pipecd-bot merged commit d7801ac into master Dec 10, 2020
@pipecd-bot pipecd-bot deleted the update-application-impl branch December 10, 2020 06:19
@pipecd-bot pipecd-bot mentioned this pull request Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add web api to update application
3 participants