Skip to content

Conversation

@sjrl
Copy link
Contributor

@sjrl sjrl commented Jan 26, 2026

Related Issues

  • fixes #issue-number

Proposed Changes:

While working on adding more tests for the auto joiner experiment I found there was many opportunities to reduce duplicate code and code lines in the pipeline run tests.

How did you test it?

Existing tests. Didn't remove or add 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.

@vercel
Copy link

vercel bot commented Jan 26, 2026

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

1 Skipped Deployment
Project Deployment Review Updated (UTC)
haystack-docs Ignored Ignored Preview Jan 26, 2026 2:20pm

Request Review

@sjrl sjrl self-assigned this Jan 26, 2026
Comment on lines -136 to -146
@then("draw it to file")
def draw_pipeline(pipeline_data: tuple[Pipeline, list[PipelineRunData]], request: pytest.FixtureRequest) -> None:
"""
Draw the pipeline to a file with the same name as the test.
"""
if m := PIPELINE_NAME_REGEX.search(request.node.name):
name = m.group(1).replace(" ", "_")
pipeline = pipeline_data[0]
graphs_dir = Path(request.config.rootpath) / "test_pipeline_graphs"
graphs_dir.mkdir(exist_ok=True)
pipeline.draw(path=graphs_dir / f"{name}.png")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this utility function since it wasn't used in the tests.

Comment on lines -1550 to -1556
[
PipelineRunData(
inputs={
"prompt": {"question": "This is a question that has an answer", "columns": columns},
"router": {"question": "This is a question that has an answer"},
},
expected_outputs={"sql_querier": {"results": "This is the query result", "query": "Some SQL query"}},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This example was removed since it was left over accidentally and already being skipped. It's a copy from a different test.

@sjrl sjrl added the ignore-for-release-notes PRs with this flag won't be included in the release notes. label Jan 26, 2026
@coveralls
Copy link
Collaborator

coveralls commented Jan 26, 2026

Pull Request Test Coverage Report for Build 21361008047

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.446%

Totals Coverage Status
Change from base Build 21353884971: 0.0%
Covered Lines: 14758
Relevant Lines: 15964

💛 - Coveralls

@sjrl sjrl marked this pull request as ready for review January 26, 2026 14:14
@sjrl sjrl requested a review from a team as a code owner January 26, 2026 14:14
@sjrl sjrl requested review from anakin87 and removed request for a team January 26, 2026 14:14
Copy link
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

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

Thank you! 🧹

@sjrl sjrl merged commit c255095 into main Jan 26, 2026
18 checks passed
@sjrl sjrl deleted the refactor-pipeline-run-tests branch January 26, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore-for-release-notes PRs with this flag won't be included in the release notes. topic:tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants