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

wrapped error support in transport mappers #6050

Merged

Conversation

3vilhamster
Copy link
Contributor

@3vilhamster 3vilhamster commented May 23, 2024

What changed?
I've added support for wrapped errors for transport level.

Why?
This will allow us to return wrapped errors in services and not think about transport-level conversions.

Alternatively, we could introduce error methods To/FromProto and To/FromThrift, so instead of type assertion, we just return the result, I've tried it, but it complicates the error code significantly, while the generic solution is easier to understand.

How did you test it?
Unti tests

Potential risks

Release notes

Documentation Changes

Copy link

codecov bot commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.33%. Comparing base (fb4bfce) to head (fe2b7a8).
Report is 2 commits behind head on master.

Additional details and impacted files
Files Coverage Δ
common/types/mapper/errorutils/convert.go 100.00% <100.00%> (ø)
common/types/mapper/proto/errors.go 100.00% <100.00%> (ø)
common/types/mapper/thrift/errors.go 100.00% <100.00%> (ø)

... and 8 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb4bfce...fe2b7a8. Read the comment docs.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 018fa703-7c36-4de4-bf85-55da8ebb37f0

Details

  • 239 of 239 (100.0%) changed or added relevant lines in 3 files are covered.
  • 51 unchanged lines in 14 files lost coverage.
  • Overall coverage decreased (-0.002%) to 69.306%

Files with Coverage Reduction New Missed Lines %
common/task/weighted_round_robin_task_scheduler.go 2 88.06%
common/peerprovider/ringpopprovider/config.go 2 81.58%
common/persistence/execution_manager.go 2 86.43%
service/matching/tasklist/task_list_manager.go 2 76.09%
common/persistence/sql/sqlplugin/mysql/task.go 2 73.68%
service/history/task/transfer_active_task_executor.go 2 72.72%
common/persistence/sql/sqlplugin/mysql/db.go 2 79.49%
common/task/fifo_task_scheduler.go 3 84.54%
service/history/task/fetcher.go 3 85.57%
service/frontend/api/handler.go 4 62.26%
Totals Coverage Status
Change from base Build 018fa464-40c9-4742-b88d-967555b43b81: -0.002%
Covered Lines: 102170
Relevant Lines: 147418

💛 - Coveralls

@3vilhamster 3vilhamster merged commit f0d9d72 into cadence-workflow:master May 24, 2024
20 checks passed
@3vilhamster 3vilhamster deleted the transport-for-wrapped-errors branch May 24, 2024 07:54
timl3136 pushed a commit to timl3136/cadence that referenced this pull request Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants