[
https://issues.apache.org/jira/browse/BEAM-7068?focusedWorklogId=228720&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-228720
]
ASF GitHub Bot logged work on BEAM-7068:
----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Apr/19 22:18
Start Date: 16/Apr/19 22:18
Worklog Time Spent: 10m
Work Description: youngoli commented on pull request #8298: [BEAM-7068]
Improving error messages when binding functions in Go SDK
URL: https://github.com/apache/beam/pull/8298#discussion_r276015169
##########
File path: sdks/go/pkg/beam/core/graph/edge.go
##########
@@ -202,16 +202,16 @@ func NewCoGBK(g *Graph, s *Scope, ns []*Node)
(*MultiEdge, error) {
for i := 1; i < len(ns); i++ {
n := ns[i]
if !typex.IsKV(n.Type()) {
- return nil, fmt.Errorf("input type must be KV: %v", n)
+ return nil, fmt.Errorf("creating new CoGBK in scope %v:
input type must be KV: %v", s, n)
Review comment:
Ack. Yeah, I considered reducing the repetition by creating an error type,
but I was already thinking about creating an error package for Beam and didn't
really wanna do anything too complex in case it wouldn't work with the new
errors. I'll add a TODO with a bug though so I don't forget to improve this
later.
----------------------------------------------------------------
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: 228720)
Time Spent: 50m (was: 40m)
> Improve error messages when binding functions
> ---------------------------------------------
>
> Key: BEAM-7068
> URL: https://issues.apache.org/jira/browse/BEAM-7068
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-go
> Reporter: Daniel Oliveira
> Assignee: Daniel Oliveira
> Priority: Minor
> Time Spent: 50m
> Remaining Estimate: 0h
>
> This bug covers error messages around the file core/graph/bind.go which binds
> the inputs and outputs of functions to make sure all the types match up
> properly. When DoFns are created with the wrong number of inputs/outputs or
> wrong input/output types, this is where errors will usually originate from.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)