-
Notifications
You must be signed in to change notification settings - Fork 32
Add more function job filters 🎨 #8187
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
Add more function job filters 🎨 #8187
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8187 +/- ##
==========================================
- Coverage 88.04% 87.97% -0.08%
==========================================
Files 1907 1486 -421
Lines 73285 60930 -12355
Branches 1301 651 -650
==========================================
- Hits 64526 53601 -10925
+ Misses 8371 7099 -1272
+ Partials 388 230 -158
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
@mergify queue |
🛑 Configuration not compatible with a branch protection settingThe branch protection setting |
…-simcore into add_function_job_filters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds filtering capabilities to function job listings and introduces pagination for job collection endpoints. It establishes a service layer pattern in the API server for functions to better encapsulate business logic.
- Adds new filters for function jobs (by function ID, job IDs, and collection ID)
- Introduces separate
/pageand/listendpoints for function job collections to support both paginated and non-paginated responses - Creates service layer classes (
FunctionServiceandFunctionJobService) to abstract RPC client interactions
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
_functions_service.py |
Adds new filter parameters to function job listing service method |
_functions_repository.py |
Implements database filtering logic with proper SQL condition building |
_functions_rpc.py |
Passes through new filter parameters to service layer |
function_jobs_routes.py |
Updates endpoint to use new service layer and filter dependencies |
function_job_collections_routes.py |
Adds separate /page and /list endpoints for different response formats |
functions_filters.py |
Defines new filter schema for function job queries |
_service_functions.py |
New service class for function-related operations |
_service_function_jobs.py |
New service class for function job operations |
| Test files | Updates tests to use new service patterns and verify filter functionality |
services/api-server/src/simcore_service_api_server/api/routes/studies_jobs.py
Outdated
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/api/routes/studies_jobs.py
Outdated
Show resolved
Hide resolved
pcrespov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx. left some suggestions.
It is important the @bisgaard-itis learns about this change. thx
services/api-server/src/simcore_service_api_server/api/routes/studies_jobs.py
Outdated
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/api/routes/studies_jobs.py
Outdated
Show resolved
Hide resolved
...ices/api-server/src/simcore_service_api_server/api/routes/function_job_collections_routes.py
Show resolved
Hide resolved
...ices/api-server/src/simcore_service_api_server/api/routes/function_job_collections_routes.py
Show resolved
Hide resolved
GitHK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, just a minor thing
services/api-server/tests/unit/api_functions/test_api_routers_function_jobs.py
Outdated
Show resolved
Hide resolved
bisgaard-itis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot. A few questions/suggestions from my side.
services/api-server/src/simcore_service_api_server/_service_function_jobs.py
Show resolved
Hide resolved
...pi-server/src/simcore_service_api_server/api/dependencies/models_schemas_function_filters.py
Show resolved
Hide resolved
...ices/api-server/src/simcore_service_api_server/api/routes/function_job_collections_routes.py
Outdated
Show resolved
Hide resolved
sanderegg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! added a few comments
...pi-server/src/simcore_service_api_server/api/dependencies/models_schemas_function_filters.py
Show resolved
Hide resolved
...ices/api-server/src/simcore_service_api_server/api/routes/function_job_collections_routes.py
Show resolved
Hide resolved
...ices/api-server/src/simcore_service_api_server/api/routes/function_job_collections_routes.py
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/api/routes/function_jobs_routes.py
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/api/routes/functions_routes.py
Show resolved
Hide resolved
...ices/api-server/src/simcore_service_api_server/api/routes/function_job_collections_routes.py
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/api/routes/studies_jobs.py
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/services_rpc/wb_api_server.py
Show resolved
Hide resolved
|
🧪 CI InsightsHere's what we observed from your CI run for 18de9fa. ✅ Passed Jobs With Interesting Signals
|
|
@mergify refresh |
✅ Pull request refreshed |
|
@mergify queue |
🛑 Configuration not compatible with a branch protection settingThe branch protection setting |



What do these changes do?
This adds some filters to the function jobs listings, and add pagination to the endpoint that lists the jobs of the job collection.
Originally my idea was to have a response_type at the latter endpoint that would allow for list/page, but didn't work out because of the pagination library we use. So another /page endpoint was added instead.
This PR also starts a service layer in the API server for functions.
Related issue/s
How to test
Run api server and web server tests.
Call function job listings with filters.
Dev-ops
No changes