Skip to content

Conversation

@kalenmcmillan
Copy link

Summary

Breaks down the delete_all_traces_that_match_name_contains_filter method in TracesPage into targeted helper methods to improve maintainability and uphold the single-responsibility principle, resolving the TODO calling for this refactor.

Changes

  • Split delete_all_traces_that_match_name_contains_filter into two private helper methods: _apply_name_contains_filter() for filter setup and _delete_all_filtered_traces() for the deletion loop.
  • Removed the TODO comment that requested this refactoring.
  • Added docstrings to all methods for better documentation.
  • Maintained the same public API, ensuring backward compatibility with existing tests.

Usage

The refactored code maintains the same public interface, so no changes are required in test code:

traces_page = TracesPage(page)
traces_page.delete_all_traces_that_match_name_contains_filter("test-trace")

The method now internally defers to:

  • _apply_name_contains_filter(name) - Handles filter configuration
  • _delete_all_filtered_traces() - Handles the deletion loop across pagination

@kalenmcmillan kalenmcmillan requested review from a team as code owners November 22, 2025 16:42
@andrescrz
Copy link
Member

Hi @kalenmcmillan !

Thank you so much for submitting your contribution — we really appreciate your efforts to help improve the project! 🙌

Could I kindly ask for a few updates to help us move forward with the review process?

  • Please run the Python linter on your changes to ensure they pass all checks.
  • Fill out the PR template fully with context about your changes — this helps the linting and review process.
  • Add relevant test coverage for your contribution to help us validate and safeguard the new behavior.
  • Attach a short demo video showcasing your changes in action or the bug fix — even a quick screen recording is perfect!

For additional guidance, please refer to:

If you have any questions or run into issues, feel free to reach out.
Thank you again for contributing — we’re excited to review your changes! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants