Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix managed identity issue
  • Loading branch information
bupt-wenxiaole committed Feb 23, 2024
commit 4b4c5a1a919d7414e9a5688642dcb9947295bdd4
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ def _to_rest_object(self, **kwargs: Any) -> dict:
"limits": get_rest_dict_for_node_attrs(self.limits, clear_empty_value=True),
"resources": get_rest_dict_for_node_attrs(self.resources, clear_empty_value=True),
"services": get_rest_dict_for_node_attrs(self.services),
"identity": self.identity._to_dict() if self.identity and not isinstance(self.identity, Dict) else None,
"identity": get_rest_dict_for_node_attrs(self.identity),
"queue_settings": get_rest_dict_for_node_attrs(self.queue_settings, clear_empty_value=True),
}.items():
if value is not None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,7 @@ def _to_rest_object(self, **kwargs: Any) -> dict:
"partition_keys": json.dumps(self.partition_keys)
if self.partition_keys is not None
else self.partition_keys,
"identity": self.identity._to_dict()
if self.identity and not isinstance(self.identity, Dict)
else None,
"identity": get_rest_dict_for_node_attrs(self.identity),
"resources": get_rest_dict_for_node_attrs(self.resources),
}
)
Expand Down Expand Up @@ -481,9 +479,8 @@ def _from_rest_object_to_init_params(cls, obj: dict) -> Dict:

if "partition_keys" in obj and obj["partition_keys"]:
obj["partition_keys"] = json.dumps(obj["partition_keys"])

if "identity" in obj and obj["identity"]:
obj["identity"] = _BaseJobIdentityConfiguration._load(obj["identity"])
obj["identity"] = _BaseJobIdentityConfiguration._from_rest_object(obj["identity"])
return obj

def _build_inputs(self) -> Dict:
Expand Down