Is there a way to pass Flyte context to Flyte conn...
# flyte-connectors
h
Is there a way to pass Flyte context to Flyte connectors? I see that the topic was discussed last year, and I'm curious if there have been any updates since then. (We are building our connectors with flytekit==1.15.3, and the context is still empty.) Specifically, we are trying to retrieve the task identifier (which should be
task_id=TASK:{project}:{domain}:{launch_plan}.{workflow}.{task}:{version}
) from the context, but calling
current_context()
inside the connector returns
task_id=TASK:local:local:local:local
. If this is not supported yet, is there a recommended workaround?
h
@glamorous-carpet-83516 Yes, but
taskTemplate.id
only gives
project
domain
and
version
. The context about the launch plan and workflow name are still lost. (Is this expected behavior?)
g
propeller doesn’t pass workflow name and launch plan name to the connector
we can add that to the create task request if we want
g
I had a similar request a while back to pass some more state from propeller -> connector... IIRC it was to know the original creator identity vs launching user identity. Our connector pulls a few tricks to perform impersonation in our system... and we ended up finding a not-so-great way to do it, but would prefer to have some way to pass "secret" data about the task to the connector, that isn't exposed anywhere else in the system. We don't want it to be visible in the UI or any other APIs, but we do want some sort of point-in-time secret that only propeller and connector may access