[
https://issues.apache.org/jira/browse/BEAM-7087?focusedWorklogId=233192&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-233192
]
ASF GitHub Bot logged work on BEAM-7087:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Apr/19 00:12
Start Date: 26/Apr/19 00:12
Worklog Time Spent: 10m
Work Description: youngoli commented on pull request #8406: [BEAM-7087]
Updating Go SDK errors in base beam directory
URL: https://github.com/apache/beam/pull/8406
This change updates code in sdks/go/pkg/beam to use the new errors package,
and (mostly) does not change code in any sub-directories. It should be the
first of several PRs to update all our Go SDK code to use the new errors where
possible.
That said, this change isn't as "clean" as I'd like it to be. During the
course of changing the calls I decided to change some of the messages slightly
to more accurately match the intended style of errors that this package
promotes (i.e. context should say "doing this" instead of "something broke").
You can see this in the spots where I completely changed error messages. But in
order to retain all the useful information, I sometimes had to go and edit the
calls that generated the error and so forth. So this PR is a mix of actual
error improvements and just changing calls.
For future PRs in this effort I'm definitely going to keep it more strict
and not change any error implementations (I can note those down and put them in
their own PR). Unfortunately I was too far into this change to separate it out
easily, so whoever reviews this gets the short end of the stick.
------------------------
Thank you for your contribution! Follow this checklist to help us
incorporate your contribution quickly and easily:
- [x] [**Choose
reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and
mention them in a comment (`R: @username`).
- [x] 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.
- [ ] If this contribution is large, please file an Apache [Individual
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
Post-Commit Tests Status (on master branch)
------------------------------------------------------------------------------------------------
Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark
--- | --- | --- | --- | --- | --- | --- | ---
Go | [](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/)
| --- | --- | --- | --- | --- | ---
Java | [](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/)
Python | [](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Python3_Verify/lastCompletedBuild/)
| --- | [](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/)
<br> [](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PreCommit_Python_PVR_Flink_Cron/lastCompletedBuild/)
| --- | --- | ---
Pre-Commit Tests Status (on master branch)
------------------------------------------------------------------------------------------------
--- |Java | Python | Go | Website
--- | --- | --- | --- | ---
Non-portable | [](https://builds.apache.org/job/beam_PreCommit_Java_Cron/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PreCommit_Go_Cron/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PreCommit_Website_Cron/lastCompletedBuild/)
Portable | --- | [](https://builds.apache.org/job/beam_PreCommit_Portable_Python_Cron/lastCompletedBuild/)
| --- | ---
See
[.test-infra/jenkins/README](https://github.com/apache/beam/blob/master/.test-infra/jenkins/README.md)
for trigger phrase, status and link of all Jenkins jobs.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 233192)
Time Spent: 50m (was: 40m)
> Create an errors package for Go SDK
> -----------------------------------
>
> Key: BEAM-7087
> URL: https://issues.apache.org/jira/browse/BEAM-7087
> Project: Beam
> Issue Type: Improvement
> Components: sdk-go
> Reporter: Daniel Oliveira
> Assignee: Daniel Oliveira
> Priority: Major
> Fix For: Not applicable
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> We can't import an established errors package such as github.com/pkg/errors
> due to how the Go SDK is currently implemented, so instead we should have our
> own package. This package should provide the following to be worth replacing
> the basic errors we currently use.
> # A way to wrap other errors without losing the original error, as in
> [https://github.com/pkg/errors]
> # Making printed errors more legible than currently. (For ex. having
> different wrapped errors on different lines, differentiating between errors
> and context, etc.)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)