Skip to content
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

Include "execution_time" or "execution_date" in context #524

Closed
cicdw opened this issue Jan 16, 2019 · 5 comments
Closed

Include "execution_time" or "execution_date" in context #524

cicdw opened this issue Jan 16, 2019 · 5 comments
Assignees
Milestone

Comments

@cicdw
Copy link
Member

cicdw commented Jan 16, 2019

For flow runs, both local and cloud runs should include "execution_time" (or something similarly named) into context.

@cicdw
Copy link
Member Author

cicdw commented Jan 16, 2019

And when this change occurs, update the examples/airflow_tutorial_dag.py file accordingly

@jlowin
Copy link
Member

jlowin commented Jan 25, 2019

Per discussion: scheduled_start_time would be great. This would be the time a Flow Run was scheduled to start, as opposed to start_time, the time it actually entered a running state. Interestingly, start_time will not be immediately available (because it is only set when the flow enters a running state!) but users could always query for it if they needed it.

@jlowin jlowin added this to the ASAP milestone Jan 25, 2019
@cicdw cicdw self-assigned this Jan 25, 2019
@cicdw
Copy link
Member Author

cicdw commented Jan 25, 2019

scheduled_start_time is much trickier than I thought; my first reaction was to pull it from the Scheduled state that starts a Flow run. This works fine and well for the duration of that first run. However, if for some reason the flow run needs a second run through, I don't know where to pull this information from (as context won't persist into the second run, and the flow won't be starting with a Scheduled state anymore).

Similarly for start_time: if we place it in context when the flow run enters a Running state, but then it is submitted again due to retries, etc. when will be place this into context? And will it have a new value this second time around?

cc: @jlowin

@cicdw
Copy link
Member Author

cicdw commented Jan 25, 2019

Also, for the record: things can be put in context via environment variable; so cloud could put it there and ensure it's there for each subsequent run. Although this would make local testing somewhat annoying.

@jlowin
Copy link
Member

jlowin commented Jan 25, 2019

@cicdw pull a field on the flow_run itself, not its state, called scheduled_start_time:

query { 
	flow_run_by_pk {
		scheduled_start_time
    }
}

@cicdw cicdw mentioned this issue Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants