How do I get access to the labels on a Flow? Are they in the Context object?
Tim Enders
09/08/2021, 2:37 PM
I was expecting an empty
labels
item but I don't see one
Tim Enders
09/08/2021, 2:41 PM
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
Kevin Kho
09/08/2021, 2:50 PM
Hey @Tim Enders, I don’t think you can do this. You need to hit the GraphQL API to get the labels.
Kevin Kho
09/08/2021, 2:56 PM
What do you do with the labels once you have them?
t
Tim Enders
09/08/2021, 3:03 PM
I am evaluating them in a state_handler. We define our git branch there and I can tell what is
master
or not
Tim Enders
09/08/2021, 3:03 PM
It looks like I can get the agent labels, which has the git branch as well
k
Kevin Kho
09/08/2021, 3:14 PM
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
Tim Enders
09/08/2021, 3:17 PM
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
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.