-
Notifications
You must be signed in to change notification settings - Fork 32
Add the created_at field to registered function objects 🎨 #7797
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 the created_at field to registered function objects 🎨 #7797
Conversation
…parc-simcore into function_cache_check_success
|
@mergify queue |
🟠 Waiting for conditions to match
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7797 +/- ##
==========================================
+ Coverage 86.48% 88.22% +1.74%
==========================================
Files 1813 1464 -349
Lines 69743 60930 -8813
Branches 1218 476 -742
==========================================
- Hits 60316 53757 -6559
+ Misses 9085 7052 -2033
+ Partials 342 121 -221
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
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
Adds the created_at timestamp to registered function, job, and collection objects and updates all related models, service mappings, API specs, and tests to surface this field.
- Extends internal service encoding/decoding (
_functions_service) to includecreated_at - Updates Pydantic models and database schemas to add
created_at - Adjusts OpenAPI specs and client/server tests to expect and verify the new field
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| services/web/server/src/.../_functions_service.py | Maps created DB field to created_at in returned DTOs |
| packages/models-library/src/models_library/functions.py | Adds created_at attribute to Registered* model classes |
| services/web/server/src/.../api/v0/openapi.yaml | Defines new createdAt property in OpenAPI spec |
| services/api-server/openapi.json | Adds created_at to JSON schema and required lists |
| tests (both webserver and api-server) | Updates fixtures and assertions to account for the new timestamp |
Comments suppressed due to low confidence (1)
services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml:15465
- Property name
createdAtin the YAML spec conflicts with the snake_casecreated_atused elsewhere (e.g., in JSON and tests). Align naming across all API specs.
createdAt:
services/web/server/tests/unit/with_dbs/04/functions_rpc/test_function_jobs_controller_rpc.py
Show resolved
Hide resolved
.../server/tests/unit/with_dbs/04/functions_rpc/test_function_job_collections_controller_rpc.py
Show resolved
Hide resolved
services/api-server/tests/unit/api_functions/test_api_routers_functions.py
Show resolved
Hide resolved
services/api-server/tests/unit/api_functions/test_api_routers_functions.py
Show resolved
Hide resolved
services/api-server/tests/unit/api_functions/test_api_routers_functions.py
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.
.../server/tests/unit/with_dbs/04/functions_rpc/test_function_job_collections_controller_rpc.py
Outdated
Show resolved
Hide resolved
services/web/server/tests/unit/with_dbs/04/functions_rpc/test_function_jobs_controller_rpc.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!
…osparc-simcore into add_registered_at_to_functions
|
@mergify refresh |
✅ Pull request refreshed |
|
@mergify refresh |
✅ Pull request refreshed |
|
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



What do these changes do?
As requested by JGO, expose the created_at field of registered function / job / collection objects. This makes it easier to recognize functions created in the frontend.
(I've also split up the function rpc tests in 3 files)
Related issue/s
https://github.com/ITISFoundation/private-issues/issues/187
How to test
Create a function, get it back, check if the created_at date is close to the time the function was registered.
Dev-ops
No changes