Skip to content

Conversation

odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Sep 10, 2025

What do these changes do?

This PR implements the ability to delete functions in the frontend, adding a force delete option to handle functions with associated jobs.

deleteFunction

Related issue/s

How to test

Dev-ops

Copy link

codecov bot commented Sep 10, 2025

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.75%. Comparing base (7a4e794) to head (91c6780).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8351      +/-   ##
==========================================
+ Coverage   86.76%   89.75%   +2.99%     
==========================================
  Files        1771     1530     -241     
  Lines       68674    63279    -5395     
  Branches     1312      499     -813     
==========================================
- Hits        59585    56797    -2788     
+ Misses       8694     6353    -2341     
+ Partials      395      129     -266     
Flag Coverage Δ
integrationtests 64.00% <25.00%> (+0.81%) ⬆️
unittests 88.16% <90.90%> (+2.02%) ⬆️
Components Coverage Δ
pkg_aws_library ∅ <ø> (∅)
pkg_celery_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 93.09% <100.00%> (+<0.01%) ⬆️
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration 70.19% <ø> (ø)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.03% <ø> (ø)
agent 93.53% <ø> (ø)
api_server 91.91% <ø> (∅)
autoscaling 95.77% <ø> (ø)
catalog 92.34% <ø> (ø)
clusters_keeper 99.13% <ø> (ø)
dask_sidecar 92.37% <ø> (ø)
datcore_adapter 97.94% <ø> (ø)
director 75.81% <ø> (ø)
director_v2 90.93% <ø> (+5.58%) ⬆️
dynamic_scheduler 96.27% <ø> (ø)
dynamic_sidecar 90.46% <ø> (ø)
efs_guardian 89.62% <ø> (ø)
invitations 91.44% <ø> (ø)
payments 92.61% <ø> (ø)
resource_usage_tracker 92.02% <ø> (-0.11%) ⬇️
storage 86.49% <ø> (∅)
webclient ∅ <ø> (∅)
webserver 87.99% <87.50%> (+0.77%) ⬆️

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 7a4e794...91c6780. 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.

Copy link
Contributor

mergify bot commented Sep 10, 2025

🧪 CI Insights

Here's what we observed from your CI run for 7ac36bb.

✅ Passed Jobs With Interesting Signals

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

@odeimaiz odeimaiz self-assigned this Sep 10, 2025
@odeimaiz odeimaiz changed the title Feature/delete functions ✨ [Frontend] Delete Functions Sep 10, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels Sep 10, 2025
@odeimaiz odeimaiz requested a review from Copilot September 10, 2025 12:49
@odeimaiz odeimaiz added this to the Cheops milestone Sep 10, 2025
@odeimaiz odeimaiz marked this pull request as ready for review September 10, 2025 12:49
Copy link
Contributor

@Copilot Copilot AI left a 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 implements the ability to delete functions in the frontend, adding a force delete option to handle functions with associated jobs. The implementation includes both backend API changes and frontend UI components to support function deletion.

  • Adds a force query parameter to the delete function API endpoint to allow deletion of functions with associated jobs
  • Implements frontend UI for function deletion with confirmation dialogs and error handling for functions with jobs
  • Introduces proper error handling for attempting to delete functions that have associated jobs without the force flag

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
services/web/server/src/simcore_service_webserver/functions/_functions_repository.py Adds logic to check for associated jobs and prevent deletion unless force flag is used
services/web/server/src/simcore_service_webserver/functions/_functions_service.py Updates service layer to accept force parameter
services/web/server/src/simcore_service_webserver/functions/_controller/_functions_rest.py Adds force query parameter handling to delete endpoint
services/web/server/src/simcore_service_webserver/functions/_controller/_functions_rest_schemas.py Defines query parameter schema for force delete
packages/models-library/src/models_library/functions_errors.py Adds new error class for functions with associated jobs
services/static-webserver/client/source/class/osparc/store/Functions.js Implements deleteFunction method in the store
services/static-webserver/client/source/class/osparc/data/Resources.js Adds delete endpoint configuration
services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js Adds function deletion UI components and handlers
services/web/server/tests/unit/with_dbs/04/functions/test_functions_controller_rest.py Adds comprehensive tests for function deletion scenarios
services/web/server/tests/unit/with_dbs/04/functions/conftest.py Adds test fixture for function with associated job

Copy link
Contributor

@giancarloromeo giancarloromeo left a comment

Choose a reason for hiding this comment

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

🦩

Copy link

@odeimaiz
Copy link
Member Author

@mergify queue

Copy link
Contributor

mergify bot commented Sep 10, 2025

queue

🛑 Configuration not compatible with a branch protection setting

The branch protection setting Require branches to be up to date before merging is not compatible with max_parallel_checks>1, queue_conditions != merge_conditions and must be unset.

@odeimaiz odeimaiz added the 🤖-automerge marks PR as ready to be merged for Mergify label Sep 10, 2025
@odeimaiz odeimaiz merged commit f772080 into ITISFoundation:master Sep 10, 2025
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖-automerge marks PR as ready to be merged for Mergify a:frontend issue affecting the front-end (area group) t:enhancement Improvement or request on an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a delete button
3 participants