scalable-pypeline 2.1.27__tar.gz → 2.1.28__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of scalable-pypeline might be problematic. Click here for more details.
- {scalable-pypeline-2.1.27/scalable_pypeline.egg-info → scalable-pypeline-2.1.28}/PKG-INFO +1 -1
- scalable-pypeline-2.1.28/pypeline/__init__.py +1 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pipelines/middleware/pypeline_middleware.py +39 -47
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28/scalable_pypeline.egg-info}/PKG-INFO +1 -1
- scalable-pypeline-2.1.27/pypeline/__init__.py +0 -1
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/LICENSE +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/MANIFEST.in +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/README.md +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/barrier.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/constants.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/dramatiq.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/executable_job_config_schema.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/extensions.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/flask/__init__.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/flask/api/__init__.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/flask/api/pipelines.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/flask/api/schedules.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/flask/decorators.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/flask/flask_pypeline.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pipeline_config_schema.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pipeline_settings_schema.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pipelines/__init__.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pipelines/composition/__init__.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pipelines/composition/parallel_pipeline_composition.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pipelines/composition/pypeline_composition.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pipelines/factory.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pipelines/middleware/__init__.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pipelines/middleware/get_active_worker_id_middleware.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pipelines/middleware/graceful_shutdown_middleware.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pipelines/middleware/parallel_pipeline_middleware.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pypeline_yaml.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/schedule_config_schema.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/utils/__init__.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/utils/config_utils.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/utils/dramatiq_utils.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/utils/executable_job_util.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/utils/graceful_shutdown_util.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/utils/module_utils.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/utils/pipeline_utils.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/utils/schema_utils.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/requirements.txt +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/scalable_pypeline.egg-info/SOURCES.txt +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/scalable_pypeline.egg-info/dependency_links.txt +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/scalable_pypeline.egg-info/entry_points.txt +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/scalable_pypeline.egg-info/requires.txt +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/scalable_pypeline.egg-info/top_level.txt +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/setup.cfg +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/setup.py +0 -0
- {scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/tests/fixtures/__init__.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.1.28"
|
|
@@ -46,82 +46,74 @@ class PypelineMiddleware(Middleware):
|
|
|
46
46
|
|
|
47
47
|
graph = get_execution_graph(pipeline_config)
|
|
48
48
|
children_tasks = pipeline_config["dagAdjacency"].get(task_name, [])
|
|
49
|
-
|
|
50
49
|
messages = []
|
|
51
50
|
for child in children_tasks:
|
|
52
51
|
child_ancestors = sorted(graph.predecessors(child))
|
|
52
|
+
child_ancestors_complete = {a: False for a in child_ancestors}
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
for scenario in message.options["scenarios"]:
|
|
55
|
+
if scenario["execution_id"] == execution_id:
|
|
56
|
+
tasks_to_run_in_scenario = scenario["tasksToRunInScenario"]
|
|
55
57
|
|
|
56
58
|
for ancestor in child_ancestors:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
)
|
|
64
|
-
try:
|
|
65
|
-
locking_parallel_barrier.acquire_lock(
|
|
66
|
-
timeout=PARALLEL_PIPELINE_CALLBACK_BARRIER_TTL
|
|
59
|
+
if ancestor in tasks_to_run_in_scenario:
|
|
60
|
+
current_scenario_ancestor_task_key = f"{execution_id}-{ancestor}"
|
|
61
|
+
locking_parallel_barrier = LockingParallelBarrier(
|
|
62
|
+
self.redis_url,
|
|
63
|
+
task_key=current_scenario_ancestor_task_key,
|
|
64
|
+
lock_key=f"{message.options['base_case_execution_id']}-lock",
|
|
67
65
|
)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
for scenario in message.options["scenarios"]:
|
|
82
|
-
if scenario["execution_id"] == execution_id:
|
|
83
|
-
tasks_to_run_in_scenario = scenario["tasksToRunInScenario"]
|
|
84
|
-
|
|
85
|
-
if ancestor not in tasks_to_run_in_scenario and remaining_tasks is None:
|
|
86
|
-
ancestor_task_key = (
|
|
66
|
+
try:
|
|
67
|
+
locking_parallel_barrier.acquire_lock(
|
|
68
|
+
timeout=PARALLEL_PIPELINE_CALLBACK_BARRIER_TTL
|
|
69
|
+
)
|
|
70
|
+
if not locking_parallel_barrier.task_exists():
|
|
71
|
+
child_ancestors_complete[ancestor] = False
|
|
72
|
+
elif locking_parallel_barrier.get_task_count() <= 0:
|
|
73
|
+
child_ancestors_complete[ancestor] = True
|
|
74
|
+
finally:
|
|
75
|
+
locking_parallel_barrier.release_lock()
|
|
76
|
+
else:
|
|
77
|
+
base_scenario_ancestor_task_key = (
|
|
87
78
|
f"{message.options['base_case_execution_id']}-{ancestor}"
|
|
88
79
|
)
|
|
89
|
-
|
|
90
80
|
locking_parallel_barrier = LockingParallelBarrier(
|
|
91
81
|
self.redis_url,
|
|
92
|
-
task_key=
|
|
82
|
+
task_key=base_scenario_ancestor_task_key,
|
|
93
83
|
lock_key=f"{message.options['base_case_execution_id']}-lock",
|
|
94
84
|
)
|
|
95
85
|
try:
|
|
96
86
|
locking_parallel_barrier.acquire_lock(
|
|
97
87
|
timeout=PARALLEL_PIPELINE_CALLBACK_BARRIER_TTL
|
|
98
88
|
)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
89
|
+
if not locking_parallel_barrier.task_exists():
|
|
90
|
+
child_ancestors_complete[ancestor] = False
|
|
91
|
+
elif locking_parallel_barrier.get_task_count() <= 0:
|
|
92
|
+
child_ancestors_complete[ancestor] = True
|
|
102
93
|
finally:
|
|
103
94
|
locking_parallel_barrier.release_lock()
|
|
104
95
|
|
|
105
|
-
|
|
106
|
-
if remaining_tasks is None or remaining_tasks >= 1:
|
|
107
|
-
ancestor_tasks_complete = False
|
|
108
|
-
break
|
|
109
|
-
|
|
110
|
-
# If the child's ancestor tasks aren't complete move onto the next child to check
|
|
111
|
-
if not ancestor_tasks_complete:
|
|
96
|
+
if any(complete is False for complete in child_ancestors_complete.values()):
|
|
112
97
|
continue
|
|
113
98
|
|
|
114
|
-
# Handle situation where base case kicks off new scenario.
|
|
115
99
|
if (
|
|
116
100
|
message.options["base_case_execution_id"]
|
|
117
101
|
== message.options["execution_id"]
|
|
118
102
|
):
|
|
119
103
|
for scenario in message.options["scenarios"]:
|
|
120
|
-
|
|
104
|
+
child_ancestors = list(graph.predecessors(child))
|
|
105
|
+
child_has_other_ancestors_in_scenario = False
|
|
106
|
+
|
|
107
|
+
for ancestor in child_ancestors:
|
|
108
|
+
if ancestor in scenario["tasksToRunInScenario"]:
|
|
109
|
+
child_has_other_ancestors_in_scenario = True
|
|
110
|
+
break
|
|
111
|
+
|
|
121
112
|
if (
|
|
122
113
|
child in scenario["tasksToRunInScenario"]
|
|
123
|
-
and task_name in
|
|
114
|
+
and task_name in child_ancestors
|
|
124
115
|
and task_name not in scenario["tasksToRunInScenario"]
|
|
116
|
+
and not child_has_other_ancestors_in_scenario
|
|
125
117
|
):
|
|
126
118
|
task_key = f"{scenario['execution_id']}-{child}"
|
|
127
119
|
locking_parallel_barrier = LockingParallelBarrier(
|
|
@@ -168,7 +160,7 @@ class PypelineMiddleware(Middleware):
|
|
|
168
160
|
)
|
|
169
161
|
messages.append(scenario_message)
|
|
170
162
|
|
|
171
|
-
# If we've made it here all ancestors of this child are complete and it's time to run.
|
|
163
|
+
# If we've made it here all ancestors of this child are complete, and it's time to run.
|
|
172
164
|
task_key = f"{execution_id}-{child}"
|
|
173
165
|
locking_parallel_barrier = LockingParallelBarrier(
|
|
174
166
|
self.redis_url,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.1.27"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/executable_job_config_schema.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pipelines/composition/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/pipelines/middleware/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/pypeline/utils/graceful_shutdown_util.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/scalable_pypeline.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/scalable_pypeline.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/scalable_pypeline.egg-info/requires.txt
RENAMED
|
File without changes
|
{scalable-pypeline-2.1.27 → scalable-pypeline-2.1.28}/scalable_pypeline.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|