Skip to content

Commit 6edcece

Browse files
committed
Add logging to help with config update debugging
1 parent bbb6577 commit 6edcece

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

azimuth/routers/config.py

+3
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,19 @@ def patch_config(
7878
)
7979

8080
try:
81+
log.info(f"Validating config change with {partial_config}.")
8182
new_config = update_config(old_config=config, partial_config=partial_config)
8283
if attribute_changed_in_config("large_dask_cluster", partial_config, config):
8384
cluster = default_cluster(partial_config["large_dask_cluster"])
8485
else:
8586
cluster = task_manager.cluster
8687
run_startup_tasks(new_config, cluster)
88+
log.info(f"Config successfully updated with {partial_config}.")
8789
except Exception as e:
8890
log.error("Rollback config update due to error", exc_info=e)
8991
new_config = config
9092
initialize_managers(new_config, task_manager.cluster)
93+
log.info("Config update cancelled.")
9194
if isinstance(e, (AzimuthValidationError, ValidationError)):
9295
raise HTTPException(HTTP_400_BAD_REQUEST, detail=str(e))
9396
else:

0 commit comments

Comments
 (0)