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

[Bug]: Error changing configuration type #2034

Closed
jvstme opened this issue Nov 25, 2024 · 0 comments · Fixed by #2070
Closed

[Bug]: Error changing configuration type #2034

jvstme opened this issue Nov 25, 2024 · 0 comments · Fixed by #2070
Assignees
Labels
bug Something isn't working

Comments

@jvstme
Copy link
Collaborator

jvstme commented Nov 25, 2024

Steps to reproduce

  1. Create and run a configuration with a name.
    > cat .dstack.yml
    name: test-1
    type: dev-environment
    ide: vscode
    
    > dstack apply -y
  2. Stop the run.
  3. Change the configuration type and re-run.
    > cat .dstack.yml
    name: test-1
    type: task
    commands:
    - sleep infinity
    
    > dstack apply -y

Actual behaviour

CLI:

Traceback (most recent call last):
  File "/home/jvstme/git/dstack/dstack/venv/bin/dstack", line 8, in <module>
    sys.exit(main())
  File "/home/jvstme/git/dstack/dstack/src/dstack/_internal/cli/main.py", line 81, in main
    args.func(args)
  File "/home/jvstme/git/dstack/dstack/src/dstack/_internal/cli/commands/apply.py", line 77, in _command
    configurator.apply_configuration(
  File "/home/jvstme/git/dstack/dstack/src/dstack/_internal/cli/services/configurators/run.py", line 104, in apply_configuration
    diff = diff_models(
  File "/home/jvstme/git/dstack/dstack/src/dstack/_internal/core/services/diff.py", line 9, in diff_models
    raise TypeError("Both instances must be of the same Pydantic model class.")
TypeError: Both instances must be of the same Pydantic model class.

Expected behaviour

The new configuration runs successfully.

dstack version

0.18.27

Server logs

No response

Additional information

No response

@jvstme jvstme added the bug Something isn't working label Nov 25, 2024
@r4victor r4victor self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants