Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions haystack/core/pipeline/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,12 @@ def connect(self, sender: str, receiver: str) -> "PipelineBase": # noqa: PLR091
If connecting to a component that has several output connections, specify the inputs and output names as
'component_name.connections_name'.

If multiple senders are connected to the same list-typed receiver socket, the socket is
promoted to a lazy variadic socket so it can accept all incoming values. With `Pipeline`,
the resulting list is ordered alphabetically by sender component name, not by the order in
which `connect()` was called. With `AsyncPipeline`, no ordering is guaranteed, since
components in different branches may run in parallel.
Comment thread
sjrl marked this conversation as resolved.

:param sender:
The component that delivers the value. This can be either just a component name or can be
in the format `component_name.connection_name` if the component has multiple outputs.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
enhancements:
- |
Document the input ordering behavior of auto-promoted lazy variadic sockets in
``Pipeline.connect()``. When
multiple senders are connected to the same list-typed receiver socket, ordering
depends on the pipeline class. With ``Pipeline``, items are ordered alphabetically
by sender component name (because ``Pipeline.run()`` schedules components in
alphabetical order for deterministic execution), not by the order of ``connect()``
calls. With ``AsyncPipeline``, no ordering is guaranteed, since components in
different branches may run in parallel. The docstrings now point users to a
dedicated joiner component when they need explicit ordering.
Loading