seems underscore is not allowed for `node_name` wh...
# ask-the-community
n
seems underscore is not allowed for
node_name
when using
with_overrides(node_name=)
in the workflow definition. An error occurred when registering the workflow:
Copy code
@flytekit.task
def task1(x: int) -> str:
    return str(x)

@flytekit.task
def task2(x: str) -> str:
    return x


@flytekit.workflow
def baby_training_wf() -> str:
    t1 = task1(x=3).with_overrides(node_name='t_1')
    return task2(x=t1).with_overrides(node_name='t_2')
error msg:
Copy code
Failed with Exception: Reason: SYSTEM:Unknown
RPC Failed, with Status: StatusCode.INTERNAL
        details: failed to compile workflow for [resource_type:WORKFLOW project:"flytesnacks" domain:"development" name:"tmp.workflow.baby_training_wf" version:"yXlTbWXJo4nsbhCWJe5PGw==" ] with err failed to compile workflow with err Collected Errors: 4
        Error 0: Code: NodeReferenceNotFound, Node Id: t_1, Description: Referenced node [t_1] not found.
        Error 1: Code: NodeReferenceNotFound, Node Id: t_2, Description: Referenced node [t_2] not found.
        Error 2: Code: ParameterNotBound, Node Id: end-node, Description: Parameter not bound [o0].
        Error 3: Code: ParameterNotBound, Node Id: t-2, Description: Parameter not bound [x].
no error if replace underscore with dash as
node_name='t-1'
node_name='t-2'
d
this seems to be because we call the dnsify function when assigning node names. however, this shouldn't fail, rather it shoudl transparently convert the node name to a valid representation. it looks like the ids used to bind task input parameters may be using the non-cleansed node name values.
@Nan Qin would you mind filing an issue to track this on github?
not sure if it is related. sometimes the resulting node id is different from the one I specified in
with_overrides
Copy code
id {
  node_id: "f3ud1gfq"
  execution_id {
    project: "flytesnacks"
    domain: "development"
    name: "ff31a4cdb358e4f2fa05"
  }
}
...
metadata {
  spec_node_id: "tttttt-222222-tttttt-222222"
}
this seems to happen only when the overriden node_name is long.
@Dan Rammer (hamersaw) any thoughts on this 👆
d
cc @Kevin Su do you have time to take a look into this?
k
yes, looking
is
tttttt-222222-tttttt-222222
generated from flytekit?
n
no, I renamed it using
with_overrides(node_name='tttttt-222222-tttttt-222222')
d
this may be a flytepropeller thing, if i recall we have a max node name length that if execeded, we compute a hash and use that instead.
n
ahh that makes sense. do you recall the length limit?
150 Views