How do I get access to the labels on a Flow? Are they in the Context object?
t
How do I get access to the labels on a Flow? Are they in the Context object?
I was expecting an empty
labels
item but I don't see one
For context, I assign labels on deploy, but don't have them locally. In case labels just isn't there 100% of the time.
k
Hey @Tim Enders, I don’t think you can do this. You need to hit the GraphQL API to get the labels.
What do you do with the labels once you have them?
t
I am evaluating them in a state_handler. We define our git branch there and I can tell what is
master
or not
It looks like I can get the agent labels, which has the git branch as well
k
I see. I’m just throwing ideas out here, but maybe you can set the branch on the KV Store as well and pull it from there upon deployment?
t
Nah, I already have it available on deploy as an environment variable. But I don't have the envvar locally. The agent has empty labels locally so I SHOULD be able to use that and evaluate as a None for a local test