diff --git a/clockwork_web/browser_routes/jobs.py b/clockwork_web/browser_routes/jobs.py index 9a49d5d9..20241e93 100644 --- a/clockwork_web/browser_routes/jobs.py +++ b/clockwork_web/browser_routes/jobs.py @@ -183,7 +183,7 @@ def route_one(): because we had troubles using the templates correctly with dicts. Besides, it's unclear what we're supposed to do with the extra - "cw" and "user" fields when it comes to displaying them as html. + "cw" fields when it comes to displaying them as html. See CW-82. .. :quickref: list one Slurm job as formatted html diff --git a/clockwork_web_test/test_db.py b/clockwork_web_test/test_db.py index d8c826d6..6a36c303 100644 --- a/clockwork_web_test/test_db.py +++ b/clockwork_web_test/test_db.py @@ -18,7 +18,7 @@ def test_insert_and_retrieve(app): mc["jobs"].delete_many({"slurm.job_id": job_id, "slurm.cluster_name": "mila"}) mc["jobs"].insert_one( - {"slurm": {"cluster_name": "mila", "job_id": job_id}, "cw": {}, "user": {}} + {"slurm": {"cluster_name": "mila", "job_id": job_id}, "cw": {}} ) L = list( mc["jobs"].find({"slurm.job_id": job_id, "slurm.cluster_name": "mila"}) diff --git a/docs/clockwork_dev_guide/slurm_state.md b/docs/clockwork_dev_guide/slurm_state.md index e7f83323..aa07e46b 100644 --- a/docs/clockwork_dev_guide/slurm_state.md +++ b/docs/clockwork_dev_guide/slurm_state.md @@ -30,9 +30,6 @@ Job and node entries both contain a "slurm" component based on the data that we read from Slurm. They also contain a "cw" component that Clockwork uses to store extra information. -Jobs entries have an extra "user" component that can be -modified by the owner of the job. It is a dictionary -whose keys can be set and read. ### Jobs format @@ -64,8 +61,7 @@ Jobs are stored in the database in the following format: "cc_account_username": "ccuser02", "mila_cluster_username": null, "mila_email_username": null - }, - "user": {} + } } ``` diff --git a/docs/clockwork_user_guide/rest_api.rst b/docs/clockwork_user_guide/rest_api.rst index 1a1e713f..2e7d1559 100644 --- a/docs/clockwork_user_guide/rest_api.rst +++ b/docs/clockwork_user_guide/rest_api.rst @@ -55,11 +55,10 @@ jobs "cw": { "cc_account_username": "ccuser01", "mila_cluster_username": null, - "mila_email_username": null}, - "user": {} + "mila_email_username": null} }, - {"slurm": {}, "cw": {}, "user": {}}, - {"slurm": {}, "cw": {}, "user": {}}, + {"slurm": {}, "cw": {}}, + {"slurm": {}, "cw": {}}, ] :query user: (optional) any of the 3 kinds of usernames @@ -121,8 +120,7 @@ jobs "cw": { "cc_account_username": null, "mila_cluster_username": "milauser12", - "mila_email_username": null}, - "user": {} + "mila_email_username": null} } :query job_id: string containing the job_id as defined by Slurm diff --git a/scripts/insert_hardcoded_values.py b/scripts/insert_hardcoded_values.py index f44d3890..6a275c55 100644 --- a/scripts/insert_hardcoded_values.py +++ b/scripts/insert_hardcoded_values.py @@ -44,7 +44,6 @@ def get_jobs_hardcoded_values(): "cluster_name": "graham", }, "cw": {"mila_email_username": None}, - "user": {}, } ] diff --git a/slurm_state/mongo_update.py b/slurm_state/mongo_update.py index 317eb0e5..6499f432 100644 --- a/slurm_state/mongo_update.py +++ b/slurm_state/mongo_update.py @@ -46,7 +46,7 @@ def fetch_slurm_report(parser, report_path): def slurm_job_to_clockwork_job(slurm_job: dict): """ Takes the components returned from the slurm reports, - and turns it into a dict with 3 subcomponents. + and turns it into a dict with 2 subcomponents. That can later be committed to mongodb in the format that clockwork expects. """ @@ -55,7 +55,6 @@ def slurm_job_to_clockwork_job(slurm_job: dict): "cw": { "mila_email_username": None, }, - "user": {}, } return clockwork_job @@ -362,7 +361,7 @@ def get_jobs_updates_and_insertions( # which is a thing that D_job_sc wouldn't have. D_job_new = {} - for k in ["cw", "slurm", "user"]: + for k in ["cw", "slurm"]: D_job_new[k] = D_job_db.get(k, {}) | D_job_sacct.get(k, {}) # Add these field each time an entry is updated now = time.time() diff --git a/slurm_state_test/test_mongo_update.py b/slurm_state_test/test_mongo_update.py index 739c3757..2ded8a3c 100644 --- a/slurm_state_test/test_mongo_update.py +++ b/slurm_state_test/test_mongo_update.py @@ -154,7 +154,6 @@ def test_slurm_job_to_clockwork_job(): "cw": { "mila_email_username": None, }, - "user": {}, } diff --git a/test_common/fake_data.json b/test_common/fake_data.json index 0203c9b0..a94291e8 100644 --- a/test_common/fake_data.json +++ b/test_common/fake_data.json @@ -292,8 +292,7 @@ "mila_email_username": "student02@mila.quebec", "last_slurm_update": 1717097682.391458, "last_slurm_update_by_sacct": 1717097682.391458 - }, - "user": {} + } }, { "slurm": { @@ -325,8 +324,7 @@ "mila_email_username": "student10@mila.quebec", "last_slurm_update": 1717097682.391394, "last_slurm_update_by_sacct": 1717097682.391394 - }, - "user": {} + } }, { "slurm": { @@ -358,8 +356,7 @@ "mila_email_username": "student05@mila.quebec", "last_slurm_update": 1717097682.3914146, "last_slurm_update_by_sacct": 1717097682.3914146 - }, - "user": {} + } }, { "slurm": { @@ -391,8 +388,7 @@ "mila_email_username": "student13@mila.quebec", "last_slurm_update": 1717097682.3914065, "last_slurm_update_by_sacct": 1717097682.3914065 - }, - "user": {} + } }, { "slurm": { @@ -424,8 +420,7 @@ "mila_email_username": "student09@mila.quebec", "last_slurm_update": 1717097665.1685414, "last_slurm_update_by_sacct": 1717097665.1685414 - }, - "user": {} + } }, { "slurm": { @@ -464,8 +459,7 @@ "mila_email_username": "student17@mila.quebec", "last_slurm_update": 1717097678.699696, "last_slurm_update_by_sacct": 1717097678.699696 - }, - "user": {} + } }, { "slurm": { @@ -497,8 +491,7 @@ "mila_email_username": "student05@mila.quebec", "last_slurm_update": 1717097665.1685054, "last_slurm_update_by_sacct": 1717097665.1685054 - }, - "user": {} + } }, { "slurm": { @@ -530,8 +523,7 @@ "mila_email_username": "student03@mila.quebec", "last_slurm_update": 1717097665.1685302, "last_slurm_update_by_sacct": 1717097665.1685302 - }, - "user": {} + } }, { "slurm": { @@ -570,8 +562,7 @@ "mila_email_username": "student14@mila.quebec", "last_slurm_update": 1717097678.6997287, "last_slurm_update_by_sacct": 1717097678.6997287 - }, - "user": {} + } }, { "slurm": { @@ -603,8 +594,7 @@ "mila_email_username": "student09@mila.quebec", "last_slurm_update": 1717097665.1685266, "last_slurm_update_by_sacct": 1717097665.1685266 - }, - "user": {} + } }, { "slurm": { @@ -641,8 +631,7 @@ "mila_email_username": "student12@mila.quebec", "last_slurm_update": 1717097674.8202055, "last_slurm_update_by_sacct": 1717097674.8202055 - }, - "user": {} + } }, { "slurm": { @@ -674,8 +663,7 @@ "mila_email_username": "student09@mila.quebec", "last_slurm_update": 1717097682.3913713, "last_slurm_update_by_sacct": 1717097682.3913713 - }, - "user": {} + } }, { "slurm": { @@ -712,8 +700,7 @@ "mila_email_username": "student11@mila.quebec", "last_slurm_update": 1717097677.2555215, "last_slurm_update_by_sacct": 1717097677.2555215 - }, - "user": {} + } }, { "slurm": { @@ -745,8 +732,7 @@ "mila_email_username": "student18@mila.quebec", "last_slurm_update": 1717097682.3913608, "last_slurm_update_by_sacct": 1717097682.3913608 - }, - "user": {} + } }, { "slurm": { @@ -778,8 +764,7 @@ "mila_email_username": "student18@mila.quebec", "last_slurm_update": 1717097665.1684692, "last_slurm_update_by_sacct": 1717097665.1684692 - }, - "user": {} + } }, { "slurm": { @@ -816,8 +801,7 @@ "mila_email_username": "student02@mila.quebec", "last_slurm_update": 1717097674.820242, "last_slurm_update_by_sacct": 1717097674.820242 - }, - "user": {} + } }, { "slurm": { @@ -854,8 +838,7 @@ "mila_email_username": "student05@mila.quebec", "last_slurm_update": 1717097674.8203008, "last_slurm_update_by_sacct": 1717097674.8203008 - }, - "user": {} + } }, { "slurm": { @@ -888,8 +871,7 @@ "mila_email_username": "student08@mila.quebec", "last_slurm_update": 1717097678.6997225, "last_slurm_update_by_sacct": 1717097678.6997225 - }, - "user": {} + } }, { "slurm": { @@ -926,8 +908,7 @@ "mila_email_username": "student19@mila.quebec", "last_slurm_update": 1717097674.8201795, "last_slurm_update_by_sacct": 1717097674.8201795 - }, - "user": {} + } }, { "slurm": { @@ -960,8 +941,7 @@ "mila_email_username": "student11@mila.quebec", "last_slurm_update": 1717097674.8202617, "last_slurm_update_by_sacct": 1717097674.8202617 - }, - "user": {} + } }, { "slurm": { @@ -1000,8 +980,7 @@ "mila_email_username": "student09@mila.quebec", "last_slurm_update": 1717097678.6997504, "last_slurm_update_by_sacct": 1717097678.6997504 - }, - "user": {} + } }, { "slurm": { @@ -1033,8 +1012,7 @@ "mila_email_username": "student16@mila.quebec", "last_slurm_update": 1717097677.2554958, "last_slurm_update_by_sacct": 1717097677.2554958 - }, - "user": {} + } }, { "slurm": { @@ -1073,8 +1051,7 @@ "mila_email_username": "student19@mila.quebec", "last_slurm_update": 1717097674.8202205, "last_slurm_update_by_sacct": 1717097674.8202205 - }, - "user": {} + } }, { "slurm": { @@ -1106,8 +1083,7 @@ "mila_email_username": "student13@mila.quebec", "last_slurm_update": 1717097665.1685066, "last_slurm_update_by_sacct": 1717097665.1685066 - }, - "user": {} + } }, { "slurm": { @@ -1139,8 +1115,7 @@ "mila_email_username": "student01@mila.quebec", "last_slurm_update": 1717097682.3914437, "last_slurm_update_by_sacct": 1717097682.3914437 - }, - "user": {} + } }, { "slurm": { @@ -1172,8 +1147,7 @@ "mila_email_username": "student19@mila.quebec", "last_slurm_update": 1717097665.1685388, "last_slurm_update_by_sacct": 1717097665.1685388 - }, - "user": {} + } }, { "slurm": { @@ -1205,8 +1179,7 @@ "mila_email_username": "student13@mila.quebec", "last_slurm_update": 1717097665.1684446, "last_slurm_update_by_sacct": 1717097665.1684446 - }, - "user": {} + } }, { "slurm": { @@ -1239,8 +1212,7 @@ "mila_email_username": "student19@mila.quebec", "last_slurm_update": 1717097678.6996684, "last_slurm_update_by_sacct": 1717097678.6996684 - }, - "user": {} + } }, { "slurm": { @@ -1272,8 +1244,7 @@ "mila_email_username": "student14@mila.quebec", "last_slurm_update": 1717097665.168519, "last_slurm_update_by_sacct": 1717097665.168519 - }, - "user": {} + } }, { "slurm": { @@ -1312,8 +1283,7 @@ "mila_email_username": "student08@mila.quebec", "last_slurm_update": 1717097678.6997335, "last_slurm_update_by_sacct": 1717097678.6997335 - }, - "user": {} + } }, { "slurm": { @@ -1346,8 +1316,7 @@ "mila_email_username": "student16@mila.quebec", "last_slurm_update": 1717097674.820229, "last_slurm_update_by_sacct": 1717097674.820229 - }, - "user": {} + } }, { "slurm": { @@ -1381,8 +1350,7 @@ "mila_email_username": "student17@mila.quebec", "last_slurm_update": 1717097677.2554283, "last_slurm_update_by_sacct": 1717097677.2554283 - }, - "user": {} + } }, { "slurm": { @@ -1414,8 +1382,7 @@ "mila_email_username": "student16@mila.quebec", "last_slurm_update": 1717097677.2554383, "last_slurm_update_by_sacct": 1717097677.2554383 - }, - "user": {} + } }, { "slurm": { @@ -1454,8 +1421,7 @@ "mila_email_username": "student15@mila.quebec", "last_slurm_update": 1717097678.6997478, "last_slurm_update_by_sacct": 1717097678.6997478 - }, - "user": {} + } }, { "slurm": { @@ -1487,8 +1453,7 @@ "mila_email_username": "student09@mila.quebec", "last_slurm_update": 1717097677.2554705, "last_slurm_update_by_sacct": 1717097677.2554705 - }, - "user": {} + } }, { "slurm": { @@ -1527,8 +1492,7 @@ "mila_email_username": "student14@mila.quebec", "last_slurm_update": 1717097678.699645, "last_slurm_update_by_sacct": 1717097678.699645 - }, - "user": {} + } }, { "slurm": { @@ -1560,8 +1524,7 @@ "mila_email_username": "student08@mila.quebec", "last_slurm_update": 1717097677.2554934, "last_slurm_update_by_sacct": 1717097677.2554934 - }, - "user": {} + } }, { "slurm": { @@ -1598,8 +1561,7 @@ "mila_email_username": "student06@mila.quebec", "last_slurm_update": 1717097678.6996698, "last_slurm_update_by_sacct": 1717097678.6996698 - }, - "user": {} + } }, { "slurm": { @@ -1631,8 +1593,7 @@ "mila_email_username": "student17@mila.quebec", "last_slurm_update": 1717097677.2555242, "last_slurm_update_by_sacct": 1717097677.2555242 - }, - "user": {} + } }, { "slurm": { @@ -1664,8 +1625,7 @@ "mila_email_username": "student14@mila.quebec", "last_slurm_update": 1717097665.1684592, "last_slurm_update_by_sacct": 1717097665.1684592 - }, - "user": {} + } }, { "slurm": { @@ -1697,8 +1657,7 @@ "mila_email_username": "student15@mila.quebec", "last_slurm_update": 1717097665.1684644, "last_slurm_update_by_sacct": 1717097665.1684644 - }, - "user": {} + } }, { "slurm": { @@ -1730,8 +1689,7 @@ "mila_email_username": "student11@mila.quebec", "last_slurm_update": 1717097665.1684313, "last_slurm_update_by_sacct": 1717097665.1684313 - }, - "user": {} + } }, { "slurm": { @@ -1763,8 +1721,7 @@ "mila_email_username": "student02@mila.quebec", "last_slurm_update": 1717097665.16854, "last_slurm_update_by_sacct": 1717097665.16854 - }, - "user": {} + } }, { "slurm": { @@ -1803,8 +1760,7 @@ "mila_email_username": "student14@mila.quebec", "last_slurm_update": 1717097678.6997044, "last_slurm_update_by_sacct": 1717097678.6997044 - }, - "user": {} + } }, { "slurm": { @@ -1841,8 +1797,7 @@ "mila_email_username": "student03@mila.quebec", "last_slurm_update": 1717097674.8202772, "last_slurm_update_by_sacct": 1717097674.8202772 - }, - "user": {} + } }, { "slurm": { @@ -1874,8 +1829,7 @@ "mila_email_username": "student08@mila.quebec", "last_slurm_update": 1717097682.391462, "last_slurm_update_by_sacct": 1717097682.391462 - }, - "user": {} + } }, { "slurm": { @@ -1908,8 +1862,7 @@ "mila_email_username": "student18@mila.quebec", "last_slurm_update": 1717097678.6996672, "last_slurm_update_by_sacct": 1717097678.6996672 - }, - "user": {} + } }, { "slurm": { @@ -1941,8 +1894,7 @@ "mila_email_username": "student12@mila.quebec", "last_slurm_update": 1717097665.1685107, "last_slurm_update_by_sacct": 1717097665.1685107 - }, - "user": {} + } }, { "slurm": { @@ -1979,8 +1931,7 @@ "mila_email_username": "student11@mila.quebec", "last_slurm_update": 1717097674.8202279, "last_slurm_update_by_sacct": 1717097674.8202279 - }, - "user": {} + } }, { "slurm": { @@ -2012,8 +1963,7 @@ "mila_email_username": "student12@mila.quebec", "last_slurm_update": 1717097677.2554731, "last_slurm_update_by_sacct": 1717097677.2554731 - }, - "user": {} + } }, { "slurm": { @@ -2045,8 +1995,7 @@ "mila_email_username": "student13@mila.quebec", "last_slurm_update": 1717097665.1684434, "last_slurm_update_by_sacct": 1717097665.1684434 - }, - "user": {} + } }, { "slurm": { @@ -2078,8 +2027,7 @@ "mila_email_username": "student16@mila.quebec", "last_slurm_update": 1717097677.2555165, "last_slurm_update_by_sacct": 1717097677.2555165 - }, - "user": {} + } }, { "slurm": { @@ -2116,8 +2064,7 @@ "mila_email_username": "student01@mila.quebec", "last_slurm_update": 1717097674.8202913, "last_slurm_update_by_sacct": 1717097674.8202913 - }, - "user": {} + } }, { "slurm": { @@ -2154,8 +2101,7 @@ "mila_email_username": "student08@mila.quebec", "last_slurm_update": 1717097677.255415, "last_slurm_update_by_sacct": 1717097677.255415 - }, - "user": {} + } }, { "slurm": { @@ -2187,8 +2133,7 @@ "mila_email_username": "student13@mila.quebec", "last_slurm_update": 1717097665.1685314, "last_slurm_update_by_sacct": 1717097665.1685314 - }, - "user": {} + } }, { "slurm": { @@ -2220,8 +2165,7 @@ "mila_email_username": "student19@mila.quebec", "last_slurm_update": 1717097665.1685007, "last_slurm_update_by_sacct": 1717097665.1685007 - }, - "user": {} + } }, { "slurm": { @@ -2258,8 +2202,7 @@ "mila_email_username": "student00@mila.quebec", "last_slurm_update": 1717097678.6997237, "last_slurm_update_by_sacct": 1717097678.6997237 - }, - "user": {} + } }, { "slurm": { @@ -2292,8 +2235,7 @@ "mila_email_username": "student04@mila.quebec", "last_slurm_update": 1717097674.8202257, "last_slurm_update_by_sacct": 1717097674.8202257 - }, - "user": {} + } }, { "slurm": { @@ -2330,8 +2272,7 @@ "mila_email_username": "student17@mila.quebec", "last_slurm_update": 1717097674.8202217, "last_slurm_update_by_sacct": 1717097674.8202217 - }, - "user": {} + } }, { "slurm": { @@ -2363,8 +2304,7 @@ "mila_email_username": "student10@mila.quebec", "last_slurm_update": 1717097677.2555177, "last_slurm_update_by_sacct": 1717097677.2555177 - }, - "user": {} + } }, { "slurm": { @@ -2397,8 +2337,7 @@ "mila_email_username": "student16@mila.quebec", "last_slurm_update": 1717097674.8201983, "last_slurm_update_by_sacct": 1717097674.8201983 - }, - "user": {} + } }, { "slurm": { @@ -2437,8 +2376,7 @@ "mila_email_username": "student11@mila.quebec", "last_slurm_update": 1717097678.699718, "last_slurm_update_by_sacct": 1717097678.699718 - }, - "user": {} + } }, { "slurm": { @@ -2470,8 +2408,7 @@ "mila_email_username": "student14@mila.quebec", "last_slurm_update": 1717097682.3913584, "last_slurm_update_by_sacct": 1717097682.3913584 - }, - "user": {} + } }, { "slurm": { @@ -2508,8 +2445,7 @@ "mila_email_username": "student15@mila.quebec", "last_slurm_update": 1717097674.8202112, "last_slurm_update_by_sacct": 1717097674.8202112 - }, - "user": {} + } }, { "slurm": { @@ -2546,8 +2482,7 @@ "mila_email_username": "student18@mila.quebec", "last_slurm_update": 1717097677.255442, "last_slurm_update_by_sacct": 1717097677.255442 - }, - "user": {} + } }, { "slurm": { @@ -2586,8 +2521,7 @@ "mila_email_username": "student04@mila.quebec", "last_slurm_update": 1717097678.6996343, "last_slurm_update_by_sacct": 1717097678.6996343 - }, - "user": {} + } }, { "slurm": { @@ -2624,8 +2558,7 @@ "mila_email_username": "student07@mila.quebec", "last_slurm_update": 1717097665.1685328, "last_slurm_update_by_sacct": 1717097665.1685328 - }, - "user": {} + } }, { "slurm": { @@ -2657,8 +2590,7 @@ "mila_email_username": "student00@mila.quebec", "last_slurm_update": 1717097677.25542, "last_slurm_update_by_sacct": 1717097677.25542 - }, - "user": {} + } }, { "slurm": { @@ -2690,8 +2622,7 @@ "mila_email_username": "student14@mila.quebec", "last_slurm_update": 1717097682.3914182, "last_slurm_update_by_sacct": 1717097682.3914182 - }, - "user": {} + } }, { "slurm": { @@ -2723,8 +2654,7 @@ "mila_email_username": "student13@mila.quebec", "last_slurm_update": 1717097665.1685255, "last_slurm_update_by_sacct": 1717097665.1685255 - }, - "user": {} + } }, { "slurm": { @@ -2761,8 +2691,7 @@ "mila_email_username": "student09@mila.quebec", "last_slurm_update": 1717097674.8202877, "last_slurm_update_by_sacct": 1717097674.8202877 - }, - "user": {} + } }, { "slurm": { @@ -2794,8 +2723,7 @@ "mila_email_username": "student18@mila.quebec", "last_slurm_update": 1717097682.3913758, "last_slurm_update_by_sacct": 1717097682.3913758 - }, - "user": {} + } }, { "slurm": { @@ -2827,8 +2755,7 @@ "mila_email_username": "student19@mila.quebec", "last_slurm_update": 1717097682.3914044, "last_slurm_update_by_sacct": 1717097682.3914044 - }, - "user": {} + } }, { "slurm": { @@ -2867,8 +2794,7 @@ "mila_email_username": "student00@mila.quebec", "last_slurm_update": 1717097678.6997032, "last_slurm_update_by_sacct": 1717097678.6997032 - }, - "user": {} + } }, { "slurm": { @@ -2900,8 +2826,7 @@ "mila_email_username": "student17@mila.quebec", "last_slurm_update": 1717097682.391401, "last_slurm_update_by_sacct": 1717097682.391401 - }, - "user": {} + } }, { "slurm": { @@ -2933,8 +2858,7 @@ "mila_email_username": "student03@mila.quebec", "last_slurm_update": 1717097682.3914473, "last_slurm_update_by_sacct": 1717097682.3914473 - }, - "user": {} + } }, { "slurm": { @@ -2966,8 +2890,7 @@ "mila_email_username": "student13@mila.quebec", "last_slurm_update": 1717097682.3913808, "last_slurm_update_by_sacct": 1717097682.3913808 - }, - "user": {} + } }, { "slurm": { @@ -2999,8 +2922,7 @@ "mila_email_username": "student09@mila.quebec", "last_slurm_update": 1717097665.1684573, "last_slurm_update_by_sacct": 1717097665.1684573 - }, - "user": {} + } }, { "slurm": { @@ -3032,8 +2954,7 @@ "mila_email_username": "student03@mila.quebec", "last_slurm_update": 1717097677.2554767, "last_slurm_update_by_sacct": 1717097677.2554767 - }, - "user": {} + } }, { "slurm": { @@ -3065,8 +2986,7 @@ "mila_email_username": "student11@mila.quebec", "last_slurm_update": 1717097682.3913617, "last_slurm_update_by_sacct": 1717097682.3913617 - }, - "user": {} + } }, { "slurm": { @@ -3098,8 +3018,7 @@ "mila_email_username": "student14@mila.quebec", "last_slurm_update": 1717097682.3913703, "last_slurm_update_by_sacct": 1717097682.3913703 - }, - "user": {} + } }, { "slurm": { @@ -3132,8 +3051,7 @@ "mila_email_username": "student00@mila.quebec", "last_slurm_update": 1717097674.8202565, "last_slurm_update_by_sacct": 1717097674.8202565 - }, - "user": {} + } }, { "slurm": { @@ -3170,8 +3088,7 @@ "mila_email_username": "student18@mila.quebec", "last_slurm_update": 1717097674.8202007, "last_slurm_update_by_sacct": 1717097674.8202007 - }, - "user": {} + } }, { "slurm": { @@ -3211,8 +3128,7 @@ "mila_email_username": "student01@mila.quebec", "last_slurm_update": 1717097677.2554877, "last_slurm_update_by_sacct": 1717097677.2554877 - }, - "user": {} + } }, { "slurm": { @@ -3244,8 +3160,7 @@ "mila_email_username": "student05@mila.quebec", "last_slurm_update": 1717097682.391461, "last_slurm_update_by_sacct": 1717097682.391461 - }, - "user": {} + } }, { "slurm": { @@ -3282,8 +3197,7 @@ "mila_email_username": "student17@mila.quebec", "last_slurm_update": 1717097674.8202727, "last_slurm_update_by_sacct": 1717097674.8202727 - }, - "user": {} + } }, { "slurm": { @@ -3315,8 +3229,7 @@ "mila_email_username": "student01@mila.quebec", "last_slurm_update": 1717097682.3914113, "last_slurm_update_by_sacct": 1717097682.3914113 - }, - "user": {} + } }, { "slurm": { @@ -3355,8 +3268,7 @@ "mila_email_username": "student08@mila.quebec", "last_slurm_update": 1717097678.6996558, "last_slurm_update_by_sacct": 1717097678.6996558 - }, - "user": {} + } }, { "slurm": { @@ -3393,8 +3305,7 @@ "mila_email_username": "student18@mila.quebec", "last_slurm_update": 1717097674.8202302, "last_slurm_update_by_sacct": 1717097674.8202302 - }, - "user": {} + } }, { "slurm": { @@ -3427,8 +3338,7 @@ "mila_email_username": "student15@mila.quebec", "last_slurm_update": 1717097674.8202627, "last_slurm_update_by_sacct": 1717097674.8202627 - }, - "user": {} + } }, { "slurm": { @@ -3467,8 +3377,7 @@ "mila_email_username": "student17@mila.quebec", "last_slurm_update": 1717097678.6996856, "last_slurm_update_by_sacct": 1717097678.6996856 - }, - "user": {} + } }, { "slurm": { @@ -3500,8 +3409,7 @@ "mila_email_username": "student02@mila.quebec", "last_slurm_update": 1717097682.3913949, "last_slurm_update_by_sacct": 1717097682.3913949 - }, - "user": {} + } }, { "slurm": { @@ -3533,8 +3441,7 @@ "mila_email_username": "student18@mila.quebec", "last_slurm_update": 1717097677.2554803, "last_slurm_update_by_sacct": 1717097677.2554803 - }, - "user": {} + } }, { "slurm": { @@ -3571,8 +3478,7 @@ "mila_email_username": "student17@mila.quebec", "last_slurm_update": 1717097677.255498, "last_slurm_update_by_sacct": 1717097677.255498 - }, - "user": {} + } }, { "slurm": { @@ -3604,8 +3510,7 @@ "mila_email_username": "student15@mila.quebec", "last_slurm_update": 1717097682.3914237, "last_slurm_update_by_sacct": 1717097682.3914237 - }, - "user": {} + } }, { "slurm": { @@ -3642,8 +3547,7 @@ "mila_email_username": "student07@mila.quebec", "last_slurm_update": 1717097677.2554562, "last_slurm_update_by_sacct": 1717097677.2554562 - }, - "user": {} + } }, { "slurm": { @@ -3682,8 +3586,7 @@ "mila_email_username": "student18@mila.quebec", "last_slurm_update": 1717097678.699688, "last_slurm_update_by_sacct": 1717097678.699688 - }, - "user": {} + } }, { "slurm": { @@ -3723,8 +3626,7 @@ "mila_email_username": "student12@mila.quebec", "last_slurm_update": 1717097677.2555022, "last_slurm_update_by_sacct": 1717097677.2555022 - }, - "user": {} + } }, { "slurm": { @@ -3758,8 +3660,7 @@ "mila_email_username": "student10@mila.quebec", "last_slurm_update": 1717097677.2554743, "last_slurm_update_by_sacct": 1717097677.2554743 - }, - "user": {} + } }, { "slurm": { @@ -3791,8 +3692,7 @@ "mila_email_username": "student00@mila.quebec", "last_slurm_update": 1717097665.1684344, "last_slurm_update_by_sacct": 1717097665.1684344 - }, - "user": {} + } }, { "slurm": { @@ -3825,8 +3725,7 @@ }, "cw": { "mila_email_username": null - }, - "user": {} + } } ], "nodes": [ diff --git a/test_common/jobs_test_helpers.py b/test_common/jobs_test_helpers.py index a1f81872..8fda22c5 100644 --- a/test_common/jobs_test_helpers.py +++ b/test_common/jobs_test_helpers.py @@ -34,7 +34,7 @@ def helper_single_job_at_random(fake_data, cluster_name): def validator(D_job): for k1 in original_D_job: - assert k1 in ["slurm", "cw", "user", "job_user_props"] + assert k1 in ["slurm", "cw", "job_user_props"] assert D_job[k1] == original_D_job[k1], f"{D_job}\n{original_D_job}" return validator, job_id @@ -164,7 +164,7 @@ def validator(LD_jobs): # compare all the dicts one by one for (D_job, D_original_job) in zip(LD_jobs, LD_original_jobs): for k1 in D_original_job: - assert k1 in ["slurm", "cw", "user", "job_user_props"] + assert k1 in ["slurm", "cw", "job_user_props"] assert D_job[k1] == D_original_job[k1] return validator