Skip to content

[Bug]: Launch Wizard modifies the manually specified resources #3679

@jvstme

Description

@jvstme

Steps to reproduce

  1. Open the Launch Wizard using a simple template, e.g., the "Desktop IDE" template from https://github.com/dstackai/dstack-templates
  2. Click through the steps until the YAML editor opens up.
    type: dev-environment
    ide: cursor
    resources:
      gpu: 0
  3. Update the configuration to include these resources:
    type: dev-environment
    ide: cursor
    resources:
      gpu: 0
      cpu: 1..
      memory: 0.5GB..
      disk: 0.5GB..
  4. Click "Apply"

Actual behaviour

resources in the configuration sent to the server are different from what was entered in the configuration editor.

{
  "plan": {
    "run_spec": {
      "configuration": {
        "type": "dev-environment",
        "ide": "cursor",
        "resources": {
          "gpu": 0,
          "cpu": 1
        }
      }
    }
  },
  "force": false
}
  • cpu: 1.. became cpu: 1
  • memory: 0.5GB.. was dropped (and was interpreted as memory: 8GB.. on the server)
  • disk: 0.5GB.. was dropped (and was interpreted as disk: 100GB.. on the server)

This configuration is just one example. Other examples of incorrect modifications:

  • cpu: 2..8 becomes cpu: 2
  • cpu: 2:arm becomes cpu: 2
  • memory: ..24GB becomes memory: 24GB..
  • disk: ..1000GB is dropped
  • gpu: ..24GB becomes "gpu":{"name":["..24GB"] (is parsed as name instead of memory)
  • gpu: 1:24GB:nvidia:a10 becomes 1:24GB:nvidia
  • etc

Expected behaviour

Resources are sent to the server as-is, without modification.

Overall, I would expect the entire configuration to be sent as-is. Not sure if there is a good reason to parse it and modify it on the frontend, introducing bugs and maintenance costs.

dstack version

0.20.13

Server logs

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingui

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions