Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Jun 12, 2025

What do these changes do?

As discussed, this PR hides the template that is used to register a function and adds some project_metadata to it.

HiddenTemplate

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz self-assigned this Jun 12, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) release Preparation for pre-release/release labels Jun 12, 2025
@odeimaiz odeimaiz marked this pull request as ready for review June 12, 2025 14:15
@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 @odeimaiz

Copy link
Contributor

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 hides the function-registration template by default and adds custom metadata to it, while also updating the resources API to support these changes.

  • Adds a hidden: true flag when publishing templates and hidden: false when copying studies
  • Introduces __updateTemplateMetadata to patch project metadata before registering the function
  • Extends osparc.data.Resources with a hidden URL parameter and an updateMetadata PATCH endpoint

Reviewed Changes

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

File Description
services/static-webserver/client/source/class/osparc/study/CreateFunction.js Mark template as hidden, split creation into metadata update and function registration
services/static-webserver/client/source/class/osparc/desktop/MainPage.js Pass hidden: false when copying a study to a new template
services/static-webserver/client/source/class/osparc/data/Resources.js Add hidden query param to postToTemplate and define updateMetadata endpoint
Comments suppressed due to low confidence (3)

services/static-webserver/client/source/class/osparc/study/CreateFunction.js:315

  • [nitpick] The custom metadata key hidden overlaps with the template creation flag. Consider renaming this field to clarify its purpose (e.g., template_description or metadata_note).
"hidden": "Base template for function"

services/static-webserver/client/source/class/osparc/study/CreateFunction.js:290

  • The new hidden flag on template creation and the updateMetadata workflow lack corresponding unit or integration tests. Consider adding tests to verify both behaviors.
"hidden": true,

services/static-webserver/client/source/class/osparc/study/CreateFunction.js:312

  • [nitpick] This method would benefit from a brief JSDoc comment explaining its responsibility, parameters, and any important side effects.
__updateTemplateMetadata: function(templateData) {

@odeimaiz odeimaiz added the 🤖-automerge marks PR as ready to be merged for Mergify label Jun 12, 2025
@odeimaiz
Copy link
Member Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Jun 12, 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

@odeimaiz odeimaiz merged commit aa07dd8 into ITISFoundation:master Jun 12, 2025
57 of 58 checks passed
@odeimaiz odeimaiz deleted the enh/hide-template-functions branch June 12, 2025 14:40
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
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) release Preparation for pre-release/release t:enhancement Improvement or request on an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Template created through "Create Function" does show up at templates in

4 participants