Skip to content

Conversation

@bisgaard-itis
Copy link
Contributor

@bisgaard-itis bisgaard-itis commented Aug 15, 2025

What do these changes do?

  • The aim of this PR is to improve on the interface/service/repo structure of the api-server in order to support a celery worker. This PR should not change any functionality of the api-server.
  • In order to submit jobs via celery, all inputs to a function must be serializable. This PR moves code from the REST interface in the api-server to the JobService and FunctionJobService respectively in such a way that methods within those services can be run as jobs in celery.
  • The PR also resolves some issues we had with dependencies in the api-server. In several cases it used to be that the e.g. the SolverService was dependent on the SolverJobService, but that's the wrong way around. I have resolved these issues so that the "jobs" services depend on their parents. This was required to complete the refactoring described above.

Related issue/s

How to test

Dev-ops

@mergify
Copy link
Contributor

mergify bot commented Aug 15, 2025

🧪 CI Insights

Here's what we observed from your CI run for 90e9b2a.

✅ Passed Jobs With Interesting Signals

Pipeline Job Signal Health on base branch Retries 🔍 CI Insights 📄 Logs
CI system-tests Base branch is broken, but the job passed. Looks like this might be a real fix 💪 Broken 0 View View
unit-tests Base branch is broken, but the job passed. Looks like this might be a real fix 💪 Broken 0 View View

@codecov
Copy link

codecov bot commented Aug 15, 2025

Codecov Report

❌ Patch coverage is 87.76978% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.35%. Comparing base (4c15e6c) to head (90e9b2a).
⚠️ Report is 1 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (4c15e6c) and HEAD (90e9b2a). Click for more details.

HEAD has 29 uploads less than BASE
Flag BASE (4c15e6c) HEAD (90e9b2a)
unittests 30 1
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #8222       +/-   ##
===========================================
- Coverage   87.79%   69.35%   -18.44%     
===========================================
  Files        1868      857     -1011     
  Lines       72091    38487    -33604     
  Branches     1300      175     -1125     
===========================================
- Hits        63289    26692    -36597     
- Misses       8411    11738     +3327     
+ Partials      391       57      -334     
Flag Coverage Δ
integrationtests 63.99% <ø> (+0.03%) ⬆️
unittests 92.84% <87.76%> (+6.42%) ⬆️
Components Coverage Δ
pkg_aws_library ∅ <ø> (∅)
pkg_celery_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library ∅ <ø> (∅)
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration ∅ <ø> (∅)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 76.84% <ø> (-8.14%) ⬇️
agent ∅ <ø> (∅)
api_server 92.84% <87.76%> (-0.43%) ⬇️
autoscaling ∅ <ø> (∅)
catalog ∅ <ø> (∅)
clusters_keeper ∅ <ø> (∅)
dask_sidecar ∅ <ø> (∅)
datcore_adapter ∅ <ø> (∅)
director ∅ <ø> (∅)
director_v2 78.08% <ø> (-12.85%) ⬇️
dynamic_scheduler ∅ <ø> (∅)
dynamic_sidecar 87.13% <ø> (ø)
efs_guardian ∅ <ø> (∅)
invitations ∅ <ø> (∅)
payments ∅ <ø> (∅)
resource_usage_tracker ∅ <ø> (∅)
storage ∅ <ø> (∅)
webclient ∅ <ø> (∅)
webserver 58.76% <ø> (-29.33%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c15e6c...90e9b2a. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bisgaard-itis bisgaard-itis self-assigned this Aug 18, 2025
@bisgaard-itis bisgaard-itis changed the title ♻️ Refactor job_service in api-server before introducing celery worker ♻️ Refactor job_service and function_job_service in api-server before introducing celery worker Aug 19, 2025
@bisgaard-itis bisgaard-itis added t:maintenance Some planned maintenance work a:apiserver api-server service labels Aug 19, 2025
@bisgaard-itis bisgaard-itis added this to the Voyager milestone Aug 19, 2025
@bisgaard-itis bisgaard-itis marked this pull request as ready for review August 19, 2025 09:45
Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

Beautiful to look at 🤩

@sonarqubecloud
Copy link

Copy link
Contributor

@wvangeit wvangeit left a comment

Choose a reason for hiding this comment

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

Thanks a lot @bisgaard-itis

@bisgaard-itis bisgaard-itis enabled auto-merge (squash) August 19, 2025 11:36
@mrnicegyu11 mrnicegyu11 disabled auto-merge August 19, 2025 11:37
@mrnicegyu11 mrnicegyu11 merged commit 0c24036 into ITISFoundation:master Aug 19, 2025
92 of 95 checks passed
@mrnicegyu11
Copy link
Member

force merged upon request @bisgaard-itis

@bisgaard-itis bisgaard-itis deleted the 1973-refactor-create-start-inspect-methods branch August 19, 2025 11:42
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Sep 2, 2025
61 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:apiserver api-server service t:maintenance Some planned maintenance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants