Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -69,24 +69,24 @@ def enhanced_execute_pipeline(parsed_yaml):
|
|
69 |
|
70 |
# Check dependencies
|
71 |
if depends_on:
|
|
|
72 |
for dependency in depends_on:
|
73 |
if stage_results.get(dependency) != "success":
|
74 |
st.write(f"Skipping stage {stage_name} due to failed dependency: {dependency}.")
|
75 |
stage_results[stage_name] = "skipped"
|
|
|
76 |
break
|
77 |
-
|
78 |
-
pass # All dependencies are successful
|
79 |
-
|
80 |
-
# Check conditions
|
81 |
-
if condition and "failed" in condition:
|
82 |
-
dependent_stage = condition.split("(")[1].split(")")[0]
|
83 |
-
if stage_results.get(dependent_stage) != "failed":
|
84 |
-
st.write(f"Skipping stage {stage_name} due to condition: {condition}.")
|
85 |
-
stage_results[stage_name] = "skipped"
|
86 |
continue
|
87 |
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
# Execute the stage
|
92 |
st.write(f"Starting stage: {stage_name}...")
|
@@ -105,6 +105,10 @@ def enhanced_execute_pipeline(parsed_yaml):
|
|
105 |
st.success(f"Stage {stage_name} completed successfully.")
|
106 |
stage_results[stage_name] = "success"
|
107 |
|
|
|
|
|
|
|
|
|
108 |
# Button to run the enhanced pipeline
|
109 |
if st.button("Run Enhanced Pipeline"):
|
110 |
if yaml_input.strip():
|
|
|
69 |
|
70 |
# Check dependencies
|
71 |
if depends_on:
|
72 |
+
dependencies_satisfied = True
|
73 |
for dependency in depends_on:
|
74 |
if stage_results.get(dependency) != "success":
|
75 |
st.write(f"Skipping stage {stage_name} due to failed dependency: {dependency}.")
|
76 |
stage_results[stage_name] = "skipped"
|
77 |
+
dependencies_satisfied = False
|
78 |
break
|
79 |
+
if not dependencies_satisfied:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
continue
|
81 |
|
82 |
+
# Check conditions
|
83 |
+
if condition:
|
84 |
+
if "failed" in condition:
|
85 |
+
dependent_stage = condition.split("(")[1].split(")")[0]
|
86 |
+
if stage_results.get(dependent_stage) != "failed":
|
87 |
+
st.write(f"Skipping stage {stage_name} due to condition: {condition}.")
|
88 |
+
stage_results[stage_name] = "skipped"
|
89 |
+
continue
|
90 |
|
91 |
# Execute the stage
|
92 |
st.write(f"Starting stage: {stage_name}...")
|
|
|
105 |
st.success(f"Stage {stage_name} completed successfully.")
|
106 |
stage_results[stage_name] = "success"
|
107 |
|
108 |
+
# Log final stage results for debugging
|
109 |
+
st.write("Final Stage Results:")
|
110 |
+
st.json(stage_results)
|
111 |
+
|
112 |
# Button to run the enhanced pipeline
|
113 |
if st.button("Run Enhanced Pipeline"):
|
114 |
if yaml_input.strip():
|