Skip to content

Conversation

@davidgamez
Copy link
Member

@davidgamez davidgamez commented Jan 6, 2026

Summary:

This PR adds the search_query parameter to the Operations Feeds GET endpoint.

Closes: #1442

Expected behavior:

When the search_query parameter is populated, the feeds are filtered using the LIKE function on the feed field.stable_id, feed.feed_name, feed.provider

Testing tips:

  • Populate local DB
  • Run local operations api service
  • Make a few calls with or without the search_query parameter in the URL and verify results.

From our AI friend

This pull request adds a general search query filter to the get_feeds API endpoint, allowing users to search feeds by stable ID, feed name, or provider. The implementation includes changes to the API specification, backend query logic, and test coverage to support and verify the new search functionality.

API and Query Enhancements:

  • Added a new search_query parameter to the get_feeds endpoint in the OpenAPI specification (docs/OperationsAPI.yaml), enabling clients to perform general searches against feed stable ID, feed name, and provider.
  • Updated the backend query logic in get_feeds_query to filter feeds using the provided search_query, matching against stable ID, feed name, and provider fields with case-insensitive partial matches. [1] [2]
  • Modified the get_feeds implementation to accept and pass the new search_query parameter to the query helper. [1] [2]

Test and Data Improvements:

  • Updated test feed provider names in test fixtures to be distinct, allowing for more accurate search query tests. (functions-python/operations_api/tests/conftest.py) [1] [2] [3]
  • Added new tests to verify the search query filter works as intended, checking results for various search terms and confirming correct filtering. (functions-python/operations_api/tests/feeds_operations/impl/test_get_feeds.py)

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@davidgamez davidgamez changed the title add search_query parameter to op api feat: add search_query parameter to operations api Jan 6, 2026

@with_db_session
async def get_feeds(
def handle_get_feeds(
Copy link
Member Author

Choose a reason for hiding this comment

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

This is necessary because the with_db_session annotation doesn't properly close sessions when applied to async functions. I'll update the other endpoints in a separate PR to avoid polluting this one with "unrelated" changes.

Copy link
Contributor

@qcdyx qcdyx left a comment

Choose a reason for hiding this comment

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

LGTM

@davidgamez davidgamez merged commit 2cddaa5 into main Jan 7, 2026
8 of 9 checks passed
@davidgamez davidgamez deleted the feat/op_api_search_query branch January 7, 2026 17:15
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.

Add a search parameter to Operations Feeds GET endpoint

3 participants