Skip to content

fix: require messages input parameter in Agent component#11147

Merged
sjrl merged 3 commits intomainfrom
revert-agent-messages
Apr 20, 2026
Merged

fix: require messages input parameter in Agent component#11147
sjrl merged 3 commits intomainfrom
revert-agent-messages

Conversation

@sjrl
Copy link
Copy Markdown
Contributor

@sjrl sjrl commented Apr 20, 2026

Related Issues

Proposed Changes:

Make the messages param of Agent required.

Same issue as outlined here #10734

making Agent's messages input optional created unwarranted pipeline scheduling behavior

How did you test it?

Updated unit tests

Notes for the reviewer

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines.
  • I have run pre-commit hooks and fixed any issue.

@sjrl sjrl requested a review from a team as a code owner April 20, 2026 07:39
@sjrl sjrl requested review from davidsbatista and removed request for a team April 20, 2026 07:39
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
haystack-docs Ignored Ignored Preview Apr 20, 2026 7:57am

Request Review

@sjrl sjrl requested review from julian-risch and removed request for davidsbatista April 20, 2026 07:39
@sjrl sjrl self-assigned this Apr 20, 2026
@sjrl sjrl added this to the 2.28.0 milestone Apr 20, 2026
@github-actions github-actions Bot added the type:documentation Improvements on the docs label Apr 20, 2026
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 20, 2026

Coverage Report for CI Build 24655141668

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Warning

No base build found for commit 3b5e774 on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 92.855%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 17173
Covered Lines: 15946
Line Coverage: 92.86%
Coverage Strength: 0.93 hits per line

💛 - Coveralls

Copy link
Copy Markdown
Member

@julian-risch julian-risch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good to me! I suggest we extend the release note with an upgrade section that tells users to add messages=[] if they didn't have messages for the Agent at all in Haystack 2.27 or Haystack 2.26. We can mention that only users of these two versions are affected.

@@ -0,0 +1,5 @@
---
fixes:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we also include a note in the section upgrade given that this is a breaking change for users you started to use Agent without messages in the mean time. I don't expect many users to be affected if any at all.

@sjrl sjrl enabled auto-merge (squash) April 20, 2026 08:03
@sjrl sjrl merged commit 26c4a2e into main Apr 20, 2026
24 checks passed
@sjrl sjrl deleted the revert-agent-messages branch April 20, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic:tests type:documentation Improvements on the docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spurious component execution via pipeline_run_args injection

3 participants