Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed pagination issue in search.py and added corresponding test #846

Merged
merged 5 commits into from
Feb 3, 2025

Conversation

JoaquinPolonuer
Copy link
Contributor

No description provided.

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Feb 3, 2025
tests/test_agents.py Outdated Show resolved Hide resolved
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Feb 3, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Feb 3, 2025
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Feb 3, 2025
@pytest.mark.asyncio
async def test_search_pagination(agent_test_settings: Settings) -> None:
"""Test that pagination works correctly in SearchIndex.query()."""
index = await get_directory_index(settings=agent_test_settings)
Copy link
Collaborator

Choose a reason for hiding this comment

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

One other comment is, this index build in CI is a bit slow.

Can you do this:

  1. Make an async pytest.fixture with session scope that does this
  2. Use it in test_search_pagination, test_deepcopy_env

Then this PR is good to go

Copy link
Collaborator

Choose a reason for hiding this comment

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

Per in-person convo, agent_test_settings being not session scoped messes this up.

It's too much work to undo this for now, so we can handle this in a separate PR. YAGNI

Copy link
Collaborator

@jamesbraza jamesbraza left a comment

Choose a reason for hiding this comment

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

LGTM, nice work and thanks!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 3, 2025
@JoaquinPolonuer JoaquinPolonuer merged commit 33a6412 into main Feb 3, 2025
5 checks passed
@JoaquinPolonuer JoaquinPolonuer deleted the fix-query-pagination branch February 3, 2025 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants