Skip to content
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

Review update-task-version feature when latest version adds an parameters with a default #728

Closed
tcompa opened this issue Mar 12, 2025 · 2 comments · Fixed by #731
Closed

Comments

@tcompa
Copy link
Collaborator

tcompa commented Mar 12, 2025

Ref fractal-analytics-platform/fractal-server#2349.
We should review this behavior also in fractal-web.

Also note that the request body is now required, as of the first backend version after 2.13.1 - be it 2.13.2 or 2.14.0.

@tcompa tcompa changed the title Review update-task-version feature when latest version adds an optional parameter Review update-task-version feature when latest version adds an parameters with a default Mar 13, 2025
@tcompa
Copy link
Collaborator Author

tcompa commented Mar 14, 2025

I tested the new version in #731 as follows.

Create a v1 task with JSON schema

{
  "additionalProperties": false,
  "properties": {
    "image_dir": {
      "description": "Image where the raw images are",
      "title": "Image Dir",
      "type": "string"
    },
    "num_images": {
      "default": 2,
      "description": "Number of images that this dummy task will produce.",
      "title": "Num Images",
      "type": "integer"
    },
    "zarr_dir": {
      "description": "description",
      "title": "Zarr Dir",
      "type": "string"
    },
    "zarr_urls": {
      "description": "description",
      "items": {
        "type": "string"
      },
      "title": "Zarr Urls",
      "type": "array"
    }
  },
  "required": [
    "zarr_urls",
    "zarr_dir",
    "image_dir"
  ],
  "title": "CreateCellvoyagerOmeZarr",
  "type": "object"
}

Create the v2 of the same task, with an additional darkfield: bool = True argument - and with JSON schema

{
  "additionalProperties": false,
  "properties": {
    "darkfield": {
      "default": true,
      "description": "xxx",
      "title": "Darkfield",
      "type": "boolean"
    },
    "image_dir": {
      "description": "Image where the raw images are",
      "title": "Image Dir",
      "type": "string"
    },
    "num_images": {
      "default": 2,
      "description": "Number of images that this dummy task will produce.",
      "title": "Num Images",
      "type": "integer"
    },
    "zarr_dir": {
      "description": "description",
      "title": "Zarr Dir",
      "type": "string"
    },
    "zarr_urls": {
      "description": "description",
      "items": {
        "type": "string"
      },
      "title": "Zarr Urls",
      "type": "array"
    }
  },
  "required": [
    "zarr_urls",
    "zarr_dir",
    "image_dir"
  ],
  "title": "CreateCellvoyagerOmeZarr",
  "type": "object"
}

Add task v1 to a workflow

Image

Update to v2

Image

Image

Export arguments

{
  "args_parallel": null,
  "args_non_parallel": {
    "darkfield": true,
    "num_images": 2,
    "image_dir": "/something"
  }
}

@tcompa
Copy link
Collaborator Author

tcompa commented Mar 14, 2025

I also added an optional argument, and observed nothing unexpected:

Image

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
1 participant