diff --git a/releases/notes/1.8.7.md b/releases/notes/1.8.7.md new file mode 100644 index 000000000..b80ffab38 --- /dev/null +++ b/releases/notes/1.8.7.md @@ -0,0 +1,3 @@ +#### Ensure correct artifact is used as required input + +By taking the most recent one \ No newline at end of file diff --git a/src/mpyl/steps/executor.py b/src/mpyl/steps/executor.py index cd2f9f7f8..1fccb165c 100644 --- a/src/mpyl/steps/executor.py +++ b/src/mpyl/steps/executor.py @@ -112,7 +112,8 @@ def _find_required_artifact( if not required_artifact or required_artifact == ArtifactType.NONE: return None - for stage in stages: + stages_from_recent_to_old = reversed(stages) + for stage in stages_from_recent_to_old: output: Optional[Output] = Output.try_read(project.target_path, stage.name) if ( output