Skip to content

Commit 1fd9931

Browse files
committed
Enhance upsert_graph_template function to include store_config and improve error handling
- Added store_config to the GraphTemplate creation process, ensuring comprehensive data handling. - Improved error handling by refining the structure of the upsert_graph_template function, enhancing robustness and clarity. - Included debug print statements for graph_template to aid in troubleshooting during development.
1 parent dcf8b84 commit 1fd9931

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

state-manager/app/controller/upsert_graph_template.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ async def upsert_graph_template(namespace_name: str, graph_name: str, body: Upse
1515
GraphTemplate.name == graph_name,
1616
GraphTemplate.namespace == namespace_name
1717
)
18+
print("================================================")
19+
print(graph_template)
20+
print("================================================")
1821

1922
try:
2023
if graph_template:
@@ -28,7 +31,8 @@ async def upsert_graph_template(namespace_name: str, graph_name: str, body: Upse
2831
GraphTemplate.nodes: body.nodes, # type: ignore
2932
GraphTemplate.validation_status: GraphTemplateValidationStatus.PENDING, # type: ignore
3033
GraphTemplate.validation_errors: [], # type: ignore
31-
GraphTemplate.retry_policy: body.retry_policy # type: ignore
34+
GraphTemplate.retry_policy: body.retry_policy, # type: ignore
35+
GraphTemplate.store_config: body.store_config # type: ignore
3236
})
3337
)
3438

@@ -46,7 +50,8 @@ async def upsert_graph_template(namespace_name: str, graph_name: str, body: Upse
4650
nodes=body.nodes,
4751
validation_status=GraphTemplateValidationStatus.PENDING,
4852
validation_errors=[],
49-
retry_policy=body.retry_policy
53+
retry_policy=body.retry_policy,
54+
store_config=body.store_config
5055
).set_secrets(body.secrets)
5156
)
5257
except ValueError as e:

0 commit comments

Comments
 (0)