Skip to content

Conversation

@bisgaard-itis
Copy link
Contributor

What do these changes do?

  • Add an optional body to the POST /studies/{study_id}:clone endpoint in the api-server to support modifing the description and title of the cloned study.
  • @pcrespov if you prefer I could instead allow the users to do this via the POST studies/{study_id}/jobs endpoint. This would mirror what we do for the Program section of the api-server. I think it is better to support this in a POST endpoint where we are anyway cloning the project to not open the door to people modifying already existing projects. But I am happy to change this if there are concerns it conceptually doesn't fit with the :clone

Related issue/s

How to test

Dev-ops

@bisgaard-itis bisgaard-itis requested a review from pcrespov as a code owner June 13, 2025 09:55
@bisgaard-itis bisgaard-itis self-assigned this Jun 13, 2025
@bisgaard-itis bisgaard-itis added this to the Engage milestone Jun 13, 2025
@codecov
Copy link

codecov bot commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.14%. Comparing base (522bfc6) to head (d5c9220).
Report is 1 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (522bfc6) and HEAD (d5c9220). Click for more details.

HEAD has 32 uploads less than BASE
Flag BASE (522bfc6) HEAD (d5c9220)
unittests 32 1
integrationtests 6 5
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #7892       +/-   ##
===========================================
- Coverage   87.94%   66.14%   -21.81%     
===========================================
  Files        1845      795     -1050     
  Lines       71141    36456    -34685     
  Branches     1220      176     -1044     
===========================================
- Hits        62565    24112    -38453     
- Misses       8224    12286     +4062     
+ Partials      352       58      -294     
Flag Coverage Δ
integrationtests 60.45% <ø> (-3.79%) ⬇️
unittests 91.85% <100.00%> (+5.33%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_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 77.16% <ø> (-7.95%) ⬇️
agent ∅ <ø> (∅)
api_server 91.85% <100.00%> (+<0.01%) ⬆️
autoscaling ∅ <ø> (∅)
catalog ∅ <ø> (∅)
clusters_keeper ∅ <ø> (∅)
dask_sidecar ∅ <ø> (∅)
datcore_adapter ∅ <ø> (∅)
director ∅ <ø> (∅)
director_v2 60.11% <ø> (-31.00%) ⬇️
dynamic_scheduler ∅ <ø> (∅)
dynamic_sidecar 88.33% <ø> (-1.77%) ⬇️
efs_guardian ∅ <ø> (∅)
invitations ∅ <ø> (∅)
payments ∅ <ø> (∅)
resource_usage_tracker ∅ <ø> (∅)
storage ∅ <ø> (∅)
webclient ∅ <ø> (∅)
webserver 58.98% <ø> (-28.49%) ⬇️

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 522bfc6...d5c9220. 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
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

Thx

@pcrespov
Copy link
Member

  • @pcrespov if you prefer I could instead allow the users to do this via the POST studies/{study_id}/jobs endpoint. This would mirror what we do for the Program section of the api-server. I think it is better to support this in a POST endpoint where we are anyway cloning the project to not open the door to people modifying already existing projects. But I am happy to change this if there are concerns it conceptually doesn't fit with the :clone

I am not sure how POST studies/{study_id}/jobs endpoint would help here. You mean POST functions/{functions}/jobs/{job_id}:clone endpoint?

In any case, I am ok with it. As I mentioned aboe, this is a "clone and optionally update"

@bisgaard-itis
Copy link
Contributor Author

  • @pcrespov if you prefer I could instead allow the users to do this via the POST studies/{study_id}/jobs endpoint. This would mirror what we do for the Program section of the api-server. I think it is better to support this in a POST endpoint where we are anyway cloning the project to not open the door to people modifying already existing projects. But I am happy to change this if there are concerns it conceptually doesn't fit with the :clone

I am not sure how POST studies/{study_id}/jobs endpoint would help here. You mean POST functions/{functions}/jobs/{job_id}:clone endpoint?

In any case, I am ok with it. As I mentioned aboe, this is a "clone and optionally update"

@pcrespov, right, I am thinking if POST functions/{functions}/jobs/{job_id}:expose would be a good way to go, to indicate a single endpoint for "exposing" a study job in the frontend. What do you think?

@bisgaard-itis
Copy link
Contributor Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Jun 16, 2025

queue

🟠 Waiting for conditions to match

  • -closed [📌 queue requirement]
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of: [📌 queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed
  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue default]
      • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
      • #approved-reviews-by>=2
      • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
      • #changes-requested-reviews-by=0
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • #review-threads-unresolved=0
      • -conflict
      • -draft
      • base=master
      • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
      • label!=🤖-do-not-merge
      • label=🤖-automerge
      • any of: [🛡 GitHub branch protection]
        • check-skipped = deploy to dockerhub
        • check-neutral = deploy to dockerhub
        • check-success = deploy to dockerhub
      • any of: [🛡 GitHub branch protection]
        • check-success = system-tests
        • check-neutral = system-tests
        • check-skipped = system-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = unit-tests
        • check-neutral = unit-tests
        • check-skipped = unit-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = check OAS' are up to date
        • check-neutral = check OAS' are up to date
        • check-skipped = check OAS' are up to date
      • any of: [🛡 GitHub branch protection]
        • check-success = integration-tests
        • check-neutral = integration-tests
        • check-skipped = integration-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = build-test-images (frontend) / build-test-images
        • check-neutral = build-test-images (frontend) / build-test-images
        • check-skipped = build-test-images (frontend) / build-test-images

@bisgaard-itis bisgaard-itis added the 🤖-automerge marks PR as ready to be merged for Mergify label Jun 16, 2025
@bisgaard-itis bisgaard-itis enabled auto-merge (squash) June 16, 2025 11:58
@sonarqubecloud
Copy link

@bisgaard-itis bisgaard-itis merged commit 5e3f6be into ITISFoundation:master Jun 17, 2025
91 of 95 checks passed
@bisgaard-itis bisgaard-itis deleted the 191-enhance-study-clone-endpoint-in-api-server branch June 17, 2025 07:22
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:apiserver api-server service Meta-modeling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants