```{ project: "shelly-robotics-bidepal-robot", ...
# ask-the-community
s
Copy code
{
  project: "shelly-robotics-bidepal-robot",
  domain: "development",
  name: "my-project.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1",
  spec: {
    launch_plan: {
      project: "shelly-robotics-bidepal-robot",
      domain: "development",
      name: "my-project.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1",
      version: "0.0.1",
    },
    inputs: {
      x: 1,
    },
  },
};
y
do you have any more errors?
any stack traces/line numbers etc. would be helpful
s
This is all I got (it’s the response I get from the browser when I hit the /executions endpoint):
Copy code
{
  "error": "size of name exceeded length 20 : my_project.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1",
  "code": 3,
  "message": "size of name exceeded length 20 : my_project.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1"
}
Exact same workflow seems to work fine when I execute it from the dashboard ui so it looks like flyte’s rest api validation?
y
can you check admin logs to see if there’s any more information?
s
So flyteadmin pod logs?
y
yeah
s
I think these are it:
Copy code
2022/09/23 23:13:39 /go/src/github.com/flyteorg/flyteadmin/pkg/repositories/gormimpl/execution_repo.go:103
[1.064ms] [rows:9] SELECT "executions"."id","executions"."created_at","executions"."updated_at","executions"."deleted_at","executions"."execution_project","executions"."execution_domain","executions"."execution_name","executions"."launch_plan_id","executions"."workflow_id","executions"."task_id","executions"."phase","executions"."closure","executions"."spec","executions"."started_at","executions"."execution_created_at","executions"."execution_updated_at","executions"."duration","executions"."abort_cause","executions"."mode","executions"."source_execution_id","executions"."parent_node_execution_id","executions"."cluster","executions"."inputs_uri","executions"."user_inputs_uri","executions"."error_kind","executions"."error_code","executions"."user","executions"."state" FROM "executions" INNER JOIN workflows ON executions.workflow_id = workflows.id WHERE executions.execution_project = 'shelly-robotics-bipedal-robot' AND executions.execution_domain = 'development' AND (workflows.name = 'sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1') AND executions.state = 'EXECUTION_ACTIVE' ORDER BY created_at desc LIMIT 100

2022/09/23 23:13:39 /go/src/github.com/flyteorg/flyteadmin/pkg/repositories/gormimpl/workflow_repo.go:44 record not found
[1.267ms] [rows:0] SELECT * FROM "workflows" WHERE "workflows"."project" = 'shelly-robotics-bipedal-robot' AND "workflows"."domain" = 'development' AND "workflows"."name" = 'sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1' AND "workflows"."version" = 'draft' LIMIT 1
{"json":{"src":"workflow_manager.go:222","wf":"sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1"},"level":"info","msg":"Failed to get workflow with id [resource_type:WORKFLOW project:\"shelly-robotics-bipedal-robot\" domain:\"development\" name:\"sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1\" version:\"draft\" ] with err missing entity of type WORKFLOW with identifier project:\"shelly-robotics-bipedal-robot\" domain:\"development\" name:\"sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1\" version:\"draft\" ","ts":"2022-09-23T23:13:39Z"}
{"json":{"src":"workflow.go:43"},"level":"info","msg":"Adding resource type for unspecified value in request: [id:\u003cproject:\"shelly-robotics-bipedal-robot\" domain:\"development\" name:\"sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1\" version:\"0.0.18\" \u003e ]","ts":"2022-09-23T23:13:40Z"}

2022/09/23 23:13:40 /go/src/github.com/flyteorg/flyteadmin/pkg/repositories/gormimpl/workflow_repo.go:44
[0.571ms] [rows:1] SELECT * FROM "workflows" WHERE "workflows"."project" = 'shelly-robotics-bipedal-robot' AND "workflows"."domain" = 'development' AND "workflows"."name" = 'sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1' AND "workflows"."version" = '0.0.18' LIMIT 1
{"json":{"src":"execution_manager.go:818"},"level":"debug","msg":"Failed to validate ExecutionCreateRequest {Project:shelly-robotics-bipedal-robot Domain:development Name:sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1 Spec:launch_plan:\u003cproject:\"shelly-robotics-bipedal-robot\" domain:\"development\" name:\"sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1\" version:\"0.0.18\" \u003e inputs:\u003c\u003e security_context:\u003crun_as:\u003ck8s_service_account:\"flyte-executor\" \u003e \u003e  Inputs: XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0} with err size of name exceeded length 20 : sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1","ts":"2022-09-23T23:13:44Z"}

2022/09/23 23:13:44 /go/src/github.com/flyteorg/flyteadmin/pkg/repositories/gormimpl/execution_repo.go:103
[1.265ms] [rows:9] SELECT "executions"."id","executions"."created_at","executions"."updated_at","executions"."deleted_at","executions"."execution_project","executions"."execution_domain","executions"."execution_name","executions"."launch_plan_id","executions"."workflow_id","executions"."task_id","executions"."phase","executions"."closure","executions"."spec","executions"."started_at","executions"."execution_created_at","executions"."execution_updated_at","executions"."duration","executions"."abort_cause","executions"."mode","executions"."source_execution_id","executions"."parent_node_execution_id","executions"."cluster","executions"."inputs_uri","executions"."user_inputs_uri","executions"."error_kind","executions"."error_code","executions"."user","executions"."state" FROM "executions" INNER JOIN workflows ON executions.workflow_id = workflows.id WHERE executions.execution_project = 'shelly-robotics-bipedal-robot' AND executions.execution_domain = 'development' AND (workflows.name = 'sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1') AND executions.state = 'EXECUTION_ACTIVE' ORDER BY created_at desc LIMIT 100
y
that’s it?
s
Based on the timestamp these are generated when I hit the /executions endpoint
There’s a lot more but I think that’s from before
y
Copy code
kubectl -n flyte logs <pod> | egrep -B 2 -A 2 "size of name"
does that give anything?
s
Yes:
Copy code
2022/09/23 23:13:40 /go/src/github.com/flyteorg/flyteadmin/pkg/repositories/gormimpl/workflow_repo.go:44
[0.571ms] [rows:1] SELECT * FROM "workflows" WHERE "workflows"."project" = 'shelly-robotics-bipedal-robot' AND "workflows"."domain" = 'development' AND "workflows"."name" = 'sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1' AND "workflows"."version" = '0.0.18' LIMIT 1
{"json":{"src":"execution_manager.go:818"},"level":"debug","msg":"Failed to validate ExecutionCreateRequest {Project:shelly-robotics-bipedal-robot Domain:development Name:sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1 Spec:launch_plan:\u003cproject:\"shelly-robotics-bipedal-robot\" domain:\"development\" name:\"sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1\" version:\"0.0.18\" \u003e inputs:\u003c\u003e security_context:\u003crun_as:\u003ck8s_service_account:\"flyte-executor\" \u003e \u003e  Inputs: XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0} with err size of name exceeded length 20 : sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1","ts":"2022-09-23T23:13:44Z"}

2022/09/23 23:13:44 /go/src/github.com/flyteorg/flyteadmin/pkg/repositories/gormimpl/execution_repo.go:103
So it looks like this is the error:
Inputs: XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0} with err size of name exceeded length 20 : sidetrek_generated.workflows.04b2ed0b-434b-4d7b-9220-90606fdc2afc.test_wf_1
Also looks like my inputs field format might be wrong?
k
s
Thanks @Kevin Su ! But I thought I were using the latest helm chart already (v1.2.0-b3)? Not sure which helm version is linked to this flyteadmin version?
k
s
OK thanks - but I do have automation setup so just to confirm, this is not released in the helm chart yet?
k
yes, but we’ll release v1.2.0 soon, and it will include that patch.
s
OK awesome - thank you!
@Kevin Su - sorry to keep bugging you, but how do I update the pod image? I was going to just
kubectl edit deployment flyteadmin
and then update the spec.containers.image to
<http://ghcr.io/flyteorg/flyteadmin:v1.1.43|ghcr.io/flyteorg/flyteadmin:v1.1.43>
and then delete the flyteadmin pod. Is this correct?
Also, I see multiple references to
<http://cr.flyte.org/flyteorg/flyteadmin-release:v1.2.0-b3|cr.flyte.org/flyteorg/flyteadmin-release:v1.2.0-b3>
in the flyteadmin deployment yaml file (strangely missing “g” in front of “cr.flyte.org”), for example in initContainers. Is it necessary to update all references to the old version?
k
1. You don’t need to delete the pod manually. k8s will help you delete the older version of the pod. 2. In this case, you could only update first container image
Copy code
containers:
      - command:
        - flyteadmin
        - --config
        - /etc/flyte/config/*.yaml
        - serve
        image: flyteorg/flyteadmin-release:v1.2.0-b3 # <- only need to update this image
        imagePullPolicy: IfNotPresent
        name: flyteadmin
        ports:
s
@Kevin Su Thanks for this - it worked great. But I’m still getting an error:
invalid name format: <http://sidetrek.wf.wf|sidetrek.wf.wf>_<http://1.my|1.my>_test_wf1
.
Since the name looks fine, I dug into the flyteadmin pod logs, and this is what I see:
Copy code
{
  "json": {
    "src": "execution_manager.go:818"
  },
  "level": "debug",
  "msg": "Failed to validate ExecutionCreateRequest {Project:shelly-robotics-bipedal-robot Domain:development Name:sidetrek.wf.wf_1.my_test_wf1 Spec:launch_plan:<project:\"shelly-robotics-bipedal-robot\" domain:\"development\" name:\"sidetrek.wf.wf_1.my_test_wf1\" version:\"0.0.3\" > security_context:<run_as:<k8s_service_account:\"flyte-executor\" > >  Inputs:literals:<key:\"scalar\" value:<> >  XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0} with err invalid name format: sidetrek.wf.wf_1.my_test_wf1",
  "ts": "2022-09-26T16:14:34Z"
}
Looks like it’s related to inputs - maybe I’m sending it in the wrong format? I’m just trying to test a simple integer
2
Here’s my payload for
POST /executions
Copy code
{
  project: "shelly-robotics-bipedal-robot",
  domain: "development",
  name: "sidetrek.wf.wf_1.my_test_wf1",
  inputs: {
    literals: {
      scalar: {
        primitive: {
          integer: {
            x: 2,
          },
        },
      },
    },
  },
  spec: {
    launch_plan: {
      project: "shelly-robotics-bipedal-robot",
      domain: "development",
      name: "sidetrek.wf.wf_1.my_test_wf1",
      version: "0.0.3",
    },
    security_context: {
      run_as: {
        k8s_service_account: "flyte-executor",
      },
    },
  },
};
k
The name format is incorrect. could you change the name from
<http://sidetrek.wf.wf|sidetrek.wf.wf>_<http://1.my|1.my>_test_wf1
to
test-wf
. IIRC, we can’t use underscore in the name
s
Sorry - so you want me to change all underscores to hyphens? I was using this as wf name because I saw it in the console (
<http://sidetrek.wf.wf|sidetrek.wf.wf>_<http://1.my|1.my>_test_wf1
)
Also, if I change it to hyphen, I think it’s an invalid python package name?
My workflow is inside
/sidetrek/wf/wf_1.py
with workflow function name
my_test_wf1
Also, I see that the workflow name in the hello-world documentation is
my_wf
so it looks like underscore is not the issue??
k
no, I mean execution name
Copy code
project: "shelly-robotics-bipedal-robot",
  domain: "development",
  name: "sidetrek.wf.wf_1.my_test_wf1", <- this one
  inputs: {
    literals: {
...
s
Ohhh
I see - so launch_plan name refers to the workflow name (since Flyte creates the same named launch plan by default) and the execution name is just anything I specify it to be?
k
yes, exactly
s
Ok got it - let me try that thank you!
OK looks like there’s a character limit on the execution name as well? uuidv4 doesn’t seem to work but
test-wf
worked. But then there’s another error:
Copy code
Invalid reference entity resource type [UNSPECIFIED], only [map[TASK:<nil> LAUNCH_PLAN:<nil>]] allowed
Not sure what this means?
k
you have to specify resource type in the launchPlan spec.
Copy code
spec: {
    launch_plan: {
      project: "shelly-robotics-bipedal-robot",
      domain: "development",
      name: "sidetrek.wf.wf_1.my_test_wf1",
      version: "0.0.3",
      resource_type: 3 <- here, 3 is launch plan
    },
    security_context: {
      run_as: {
...
s
Oh ok - I missed that from the swagger docs
And I see that you can either put inputs outside the spec or inside spec - which one is correct?
k
I think inside is correct
s
OK got it - testing it out now
Sorry to keep bugging you, but new error:
missing valid literal in inputs scalar
with this input:
Copy code
inputs: {
  literals: {
    scalar: {
      primitive: {
        integer: {
          x: "2",
        },
      },
    },
  },
},
k
Hmm, perhaps I’m wrong .maybe outside?
s
OK let me try that
Same error
Is my inputs format wrong?
In the swagger docs,
Copy code
"integer": {
          "type": "string",
          "format": "int64"
        },
k
one sec, let me check
s
OK thank you!!
k
I think it should be
Copy code
inputs: {
 literals {
   x: {
      scalar {
      primitive: {
        integer: {
          "2"
   ...
s
Hmm that doesn’t look like a correct js syntax
You mean this?
Copy code
inputs: {
  x: {
    scalar: {
      primitive: {
        integer: '2',
      },
    },
  },
},
k
sorry, updated it. yeah, something like that
s
OK running this gives me this error:
expected_inputs x missing
k
mind sharing your payload again. let me test it on my server
s
This is the original payload:
Copy code
const x = {
  project: "shelly-robotics-bipedal-robot",
  domain: "development",
  name: "test-wf",
  spec: {
    inputs: {
      literals: {
        scalar: {
          primitive: {
            integer: {
              x: '2',
            },
          },
        },
      },
    },
    launch_plan: {
      project: "shelly-robotics-bipedal-robot",
      domain: "development",
      name: "sidetrek.wf.wf_1.my_test_wf1",
      version: "0.0.3",
      resource_type: 3,
    },
    security_context: {
      run_as: {
        k8s_service_account: "flyte-executor",
      },
    },
  },
};
You can disregard
security_context
of course
Hey @Kevin Su I got it to work! It’s really easy to misread the swagger docs I guess:
Copy code
inputs: {
            literals: {
              x: {
                scalar: {
                  primitive: {
                    integer: '2',
                  },
                },
              },
            }
          },
This works
k
Oh, nice
s
Thank you for all your help!!
Really appreciate it
161 Views