We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24745cb commit 422c5a5Copy full SHA for 422c5a5
1 file changed
src/dstack/_internal/core/models/fleets.py
@@ -163,6 +163,15 @@ class FleetNodesSpec(CoreModel):
163
),
164
] = None
165
166
+ def dict(self, *args, **kwargs) -> Dict:
167
+ # super() does not work with pydantic-duality
168
+ res = CoreModel.dict(self, *args, **kwargs)
169
+ # For backward compatibility with old clients
170
+ # that do not ignore extra fields due to https://github.com/dstackai/dstack/issues/3066
171
+ if hasattr(res, "target") and res["target"] == res["min"]:
172
+ del res["target"]
173
+ return res
174
+
175
@root_validator(pre=True)
176
def set_min_and_target_defaults(cls, values):
177
min_ = values.get("min")
0 commit comments