Skip to content

fix: do not mutate caller-provided client_kwargs in LinkContentFetcher - #12880

Closed
burakeyler wants to merge 1 commit into
deepset-ai:mainfrom
burakeyler:fix/link-content-fetcher-client-kwargs
Closed

burakeyler wants to merge 1 commit into
deepset-ai:mainfrom
burakeyler:fix/link-content-fetcher-client-kwargs

Conversation

@burakeyler

Copy link
Copy Markdown

Related Issues

Fixes #12828

Proposed Changes

LinkContentFetcher.__init__ stored the caller's client_kwargs dictionary and then called setdefault on it, so constructing the component added timeout and follow_redirects to a dictionary the application owns. Sharing one HTTP-client configuration between components leaked Haystack's defaults into the later use.

The dictionary is now shallow-copied before the defaults are applied.

How did you test it?

Added test_init_does_not_mutate_client_kwargs, which fails on main and passes here, and checked that the component still receives both defaults. pytest test/components/fetchers/test_link_content_fetcher.py -m "not integration" → 27 passed.

Checklist

🤖 Generated with Claude Code

@burakeyler
burakeyler requested a review from a team as a code owner September 23, 2026 12:44
@burakeyler
burakeyler requested review from sjrl and removed request for a team September 23, 2026 12:44
@vercel

vercel Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

@burakeyler is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Signed-off-by: Burak Eyler <burakeyler@gmail.com>

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Hi @burakeyler, thanks for your interest in contributing to Haystack! 🙏

⚠️ Issue #12828 is already being addressed by open pull request(s) #12829. Before opening a PR for an issue, please check whether a PR is already linked to it, and consider contributing to the existing PR instead. We may close duplicate PRs to keep the review queue manageable.

This is an automated message to help us keep the review queue healthy.

@github-actions

Copy link
Copy Markdown
Contributor

Hi @burakeyler, thanks for your interest in contributing to Haystack! 🙏

⛔ First-time contributors can have at most 1 open pull request in this repository until it has been approved, so this PR was closed automatically. Your open pull request #12879 is unaffected. Once it has been approved by a maintainer, you are welcome to open more PRs. Feel free to reopen this one at that point.

See the contributing guidelines for details.

This is an automated message to help us keep the review queue healthy.

@github-actions github-actions Bot closed this Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LinkContentFetcher mutates caller-provided client_kwargs

2 participants