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

mockgcp: Refactor errors from storage.Update and storage.Delete also #1221

Conversation

justinsb
Copy link
Collaborator

@justinsb justinsb commented Feb 9, 2024

  • mockgcp: Refactor errors from storage.Get
  • mockgcp: Refactor errors from storage.Update
  • mockgcp: Refactor errors from storage.Delete

Builds on #1210, I broke it up to be easier to review.

Going through one method at a time, but the code is much simplified by
having storage.Get return an object that follows the GRPC design
patterns, where codes.NotFound is returned when the object is not
found.
storage.Update now returns a suitable error for returning to the
caller.
storage.Delete now returns a suitable error for returning to the
caller.
@justinsb justinsb changed the title storage better errors update mockgcp: Refactor errors from storage.Update and storage.Delete also Feb 9, 2024
@justinsb
Copy link
Collaborator Author

justinsb commented Feb 9, 2024

/assign @cheftako

@cheftako
Copy link
Collaborator

cheftako commented Feb 9, 2024

/lgtm
/approve
This is clearly an improvement over where we are. Still curious about the Create and the already exists case.

@google-oss-prow google-oss-prow bot added the lgtm label Feb 9, 2024
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheftako, justinsb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 8d4ec8a into GoogleCloudPlatform:master Feb 9, 2024
6 checks passed
@cheftako cheftako mentioned this pull request Feb 9, 2024
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.

2 participants