New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
access to instance id #324
Comments
I've thought about this as well. Do you have any examples where knowing the instance ID is desirable, as opposed to just having some sort of unique key? I don't know if there's any harm in sharing the instance ID to the logic. If only a unique key is needed, a function/container can easily solve this. |
#315 might be a good use-case for this. |
It does not have to be the instance id but it makes sense. Sometimes I want to create random files and I could just use the instance variable. I'm wondering if adding custom Direktiv commands in jq could be doing this? |
That would be one way to do it. I'd be inclined to add a new state instead of messing with the JQ though. Perhaps some sort of utility state that works just a little bit like how action secrets work: the engine could generate a standardized object with various information that only exists in the scope of a single JQ command, and users could use JQ to extract the things they want from it and store it? For example: states:
- id: info
type: util
extract: '.instanceID = .util.instanceID' Input: {} Output: {
"instanceID": "12345-..."
} We could extent this state in future. Maybe allow it to grab the current time, namespace, etc. |
It is an interesting idea. As you said namespace, instance id, time, user executing the workflow etc. That would be very helpful. |
Is your feature request related to a problem? Please describe.
It would be good if the instance could access the instance id. If I want to publish events and want to use something as context value to wait for e.g. multiple async subflows.
Describe the solution you'd like
Up for discussion
Describe alternatives you've considered
At the moment I'm using something like jq(.name + (now | todateiso8601 | fromdate | tostring)). Not so nice output.
The text was updated successfully, but these errors were encountered: