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

[BEAM-8017] Plumb errors and remove panics from package graphx #13028

Merged
merged 2 commits into from
Oct 8, 2020
Merged

[BEAM-8017] Plumb errors and remove panics from package graphx #13028

merged 2 commits into from
Oct 8, 2020

Conversation

milantracy
Copy link
Contributor

@milantracy milantracy commented Oct 7, 2020

Please add a meaningful description for your change here

The PR removes panic from package graphx

Exported methods and functions in package graphx are not backwards compatible, APIs return an extra error indicating roots of failures

Methods and functions outside graphx, it follows how they handle error, either return error back to callers or panic, which does't impact compatibility.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

Post-Commit Tests Status (on master branch)

Lang SDK Dataflow Flink Samza Spark Twister2
Go Build Status --- Build Status --- Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status --- Build Status --- Build Status ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status --- --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

@milantracy
Copy link
Contributor Author

R: @lostluck

Copy link
Contributor

@lostluck lostluck left a comment

Choose a reason for hiding this comment

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

Wow thanks! This is great!
Most of my suggestions are to adjust the error messages to the idomatic "errors don't start with capital letters". The rule exists since often times the messages get concatenated or later included in logs, which tends to read funny.
Otherwise there were some odd inclusions of extra blank lines, which have been similarly removed.

There are two spots where in addition to the standard if err != nil { boilerplate there was a fair amount of repetition due to repeating the same error message. I've added a suggestion for how to reduce that repetition.

Thanks for the contribution!

sdks/go/pkg/beam/core/runtime/graphx/coder_test.go Outdated Show resolved Hide resolved
sdks/go/pkg/beam/core/runtime/graphx/cogbk.go Outdated Show resolved Hide resolved
sdks/go/pkg/beam/core/runtime/graphx/cogbk.go Outdated Show resolved Hide resolved
sdks/go/pkg/beam/core/runtime/graphx/cogbk.go Outdated Show resolved Hide resolved
sdks/go/pkg/beam/core/runtime/graphx/serialize.go Outdated Show resolved Hide resolved
sdks/go/pkg/beam/core/runtime/graphx/translate.go Outdated Show resolved Hide resolved
sdks/go/pkg/beam/core/runtime/graphx/translate.go Outdated Show resolved Hide resolved
sdks/go/pkg/beam/core/runtime/graphx/translate.go Outdated Show resolved Hide resolved
sdks/go/pkg/beam/core/runtime/graphx/translate.go Outdated Show resolved Hide resolved
sdks/go/pkg/beam/core/runtime/graphx/xlang_test.go Outdated Show resolved Hide resolved
Exported methods and functions in package graphx are not backwards compatible, APIs return an extra error indicating roots of failures
Copy link
Contributor

@lostluck lostluck left a comment

Choose a reason for hiding this comment

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

This LGTM. Thank you very much!

sdks/go/pkg/beam/core/runtime/graphx/translate.go Outdated Show resolved Hide resolved
@lostluck
Copy link
Contributor

lostluck commented Oct 8, 2020

Run Go PostCommit

@lostluck lostluck merged commit e58d4e1 into apache:master Oct 8, 2020
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.

None yet

2 participants