ManageIQ / floe

Floe is a runner for Amazon States Language workflows
Apache License 2.0
0 stars 5 forks source link

Able to pass context to exe/floe (to specify api) #161

Closed kbrock closed 5 months ago

kbrock commented 6 months ago

Our current workflows have the api endpoint url stored in Context["Execution"]["_manageiq_api_url"].

Before

There is no way to set the api url in exe/floe

After

./exe/floe --context '{"Execution": {"_manageiq_api_url": "http://localhost:3000"}}' workflow.asl "{}"

followup:

Comments

The input changes per workflow, so it makes sense to specify alongside the workflow in the ARGV.

The api endpoint url, on the other hand, is the same across all executions, so a single value make sense.

agrare commented 5 months ago

@kbrock the API passing is something specific to manageiq, could you just pass the execution as part of the context input that exists already?

agrare commented 5 months ago

context input that exists already?

Looks like we only accept --input on the command-line and build a context from that, I think if we also had a --context option you could do floe --context '{"Execution": {"_manageiq_api_url": "http://localhost:3000"}} ...'

kbrock commented 5 months ago

update:

kbrock commented 5 months ago

🍏 , but code climate says this is more complex. Which it is. But ensuring all these extra fields work.

Fryguy commented 5 months ago

I take code climate complexity with a grain of salt 😅

kbrock commented 5 months ago

update:

update:

agrare commented 5 months ago

@kbrock can you just update the title and description to match what we ended up doing?