Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make pipelines properly propagate their targets to child pipelines
Summary: There are 4 ways that a pipeline can start: 1.) It is started explicitly as a root pipeline. 2.) It is an immediately-runnable child of a pipeline that just ran (the "fanout" case. 3.) It runs as the result of another pipeline finishing (which triggers a barrier). 4.) It is a retry attempt for a pipeline. Pipelines have a "target" parameter that specifies the version and module to run on, but only the first case was actually using the target. This caused two problems: -The target was simply being ignored when spawning a child pipeline with a specific target. -The default target (the version/module the parent pipeline was running on) was being ignored, so flipping the default code version while a pipeline is running would cause the code to change for future child pipelines. This commit correctly sets the target for the other three cases, which should make explicitly-specified targets work and should make it so the version stays the same across all pipelines unless otherwise specified. Test Plan: Temporarily add a print statement to the taskqueue.Task constructor that prints the given target whenever the URL ends with '/run'. Run /admin/bigbingo/summarize_end_to_end_test . The first print statement gives a target of None (which is expected from my last commit), and all other print statements give explicitly-specified targets. Delete my BigQuery token and re-run /admin/bigbingo/summarize_end_to_end_test . The retry code is triggered and the retry tasks have the target explicitly specified. Reviewers: chris, mattfaus Reviewed By: mattfaus Differential Revision: http://phabricator.khanacademy.org/D8599
- Loading branch information