Skip to content

fix(errors): Remove usage of codes.Internal#485

Merged
kodiakhq[bot] merged 2 commits intocloudquery:mainfrom
erezrokah:fix/remove_internal_status_codes
Dec 11, 2022
Merged

fix(errors): Remove usage of codes.Internal#485
kodiakhq[bot] merged 2 commits intocloudquery:mainfrom
erezrokah:fix/remove_internal_status_codes

Conversation

@erezrokah
Copy link
Copy Markdown
Member

Summary

Related to #462 and also #477.
Two reasons for this change:

  1. We shouldn't be using codes.Internal as it's generated internally by gRPC so we won't be able to distinguish between gRPC protocol errors and application level errors, see https://github.com/grpc/grpc-go/blob/eeb9afa1f6b6388152955eeca8926e36ca94c768/codes/codes.go#L166.
  2. We don't really do anything with the code at the moment, it's only printed in a confusing way (see fix(sync): Extract error message from gRPC error #477)

Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines 🧑‍🎓
  • Run go fmt to format your code 🖊
  • Lint your changes via golangci-lint run 🚨 (install golangci-lint here)
  • Update or add tests 🧪
  • Ensure the status checks below are successful ✅

@github-actions
Copy link
Copy Markdown

⏱️ Benchmark results

Comparing with ad20787

  • DefaultConcurrency-2 resources/s: 11,581 ⬆️ 2.58% increase vs. ad20787
  • Glob-2 ns/op: 158.6 ⬆️ 4.79% increase vs. ad20787
  • TablesWithChildrenDefaultConcurrency-2 resources/s: 31,023 ⬆️ 0.56% increase vs. ad20787
  • BufferedScanner-2 ns/op: 9.381 ⬆️ 1.10% increase vs. ad20787
  • LogReader-2 ns/op: 30.73 ⬆️ 0.46% increase vs. ad20787

@kodiakhq kodiakhq bot merged commit 62692b9 into cloudquery:main Dec 11, 2022
kodiakhq bot pushed a commit that referenced this pull request Dec 12, 2022
🤖 I have created a release *beep* *boop*
---


## [1.12.0](v1.11.2...v1.12.0) (2022-12-11)


### Features

* Add handling for json.Number in faker ([#481](#481)) ([ad20787](ad20787))


### Bug Fixes

* Allow both 'yml' and 'yaml' extensions ([#476](#476)) ([52c4c56](52c4c56))
* **errors:** Remove usage of `codes.Internal` ([#485](#485)) ([62692b9](62692b9))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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