From 97f79bc6fecd1f68cbefe55c078906db599b9994 Mon Sep 17 00:00:00 2001 From: James Corbett Date: Fri, 24 Jan 2025 12:27:37 -0800 Subject: [PATCH] dws: drop rabbit mapping from eventlog context Problem: the dws_environment shell plugin no longer looks for a mapping from rabbits to compute nodes in the 'dws_environment' eventlog entry, so that part of the event's context (which could be quite large) can be dropped. Drop it. Fixes #244. --- src/job-manager/plugins/dws-jobtap.c | 8 +++----- src/modules/coral2_dws.py | 3 --- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/job-manager/plugins/dws-jobtap.c b/src/job-manager/plugins/dws-jobtap.c index 3d608ce..f840582 100644 --- a/src/job-manager/plugins/dws-jobtap.c +++ b/src/job-manager/plugins/dws-jobtap.c @@ -687,11 +687,11 @@ static void prolog_remove_msg_cb (flux_t *h, { flux_plugin_t *p = (flux_plugin_t *)arg; json_int_t jobid; - json_t *env = NULL, *rabbit_mapping = NULL; + json_t *env = NULL; int *prolog_active, junk_prolog_active = 1; int copy_offload = 0; - if (flux_msg_unpack (msg, "{s:I, s:o, s:o}", "id", &jobid, "variables", &env, "rabbits", &rabbit_mapping) < 0) { + if (flux_msg_unpack (msg, "{s:I, s:o}", "id", &jobid, "variables", &env) < 0) { flux_log_error (h, "received malformed dws.prolog-remove RPC"); return; } @@ -712,11 +712,9 @@ static void prolog_remove_msg_cb (flux_t *h, if (flux_jobtap_event_post_pack (p, jobid, "dws_environment", - "{s:O, s:O, s:b}", + "{s:O, s:b}", "variables", env, - "rabbits", - rabbit_mapping, "copy_offload", copy_offload) < 0 diff --git a/src/modules/coral2_dws.py b/src/modules/coral2_dws.py index 126e1a0..dd58d88 100755 --- a/src/modules/coral2_dws.py +++ b/src/modules/coral2_dws.py @@ -524,9 +524,6 @@ def _workflow_state_change_cb_inner(workflow, winfo, handle, k8s_api, disable_fl payload={ "id": jobid, "variables": workflow["status"].get("env", {}), - "rabbits": { - rabbit: _RABBITS_TO_HOSTLISTS[rabbit] for rabbit in rabbits - }, }, ).then(log_rpc_response) save_elapsed_time_to_kvs(handle, jobid, workflow)