diff --git a/clockwork_web/about_queries.md b/clockwork_web/about_queries.md index df2cc581..dff68812 100644 --- a/clockwork_web/about_queries.md +++ b/clockwork_web/about_queries.md @@ -60,7 +60,7 @@ when it comes to being set to 0 to represent a missing value. There are three kinds of accounts that are relevant in our ecosystem. We try to include them in the following fields: -- mila_account_username +- mila_cluster_username - cc_account_username - mila_email_username @@ -73,7 +73,7 @@ When `query_filter` has the field "user", we are going to ignore it if - it's "*". Otherwise, we will try to match that "user" value against all of the four -fields "mila_account_username", "cc_account_username", "mila_email_username", +fields "mila_cluster_username", "cc_account_username", "mila_email_username", "mila_user_account", provided they exist. The nice thing about it is that we don't need to test for the presence of the fields using '$exists', because we're using an OR clause with the four tests. @@ -81,7 +81,7 @@ we're using an OR clause with the four tests. ## what this means for mongodb ```python -{'$or': [ {'mila_account_username': user}, +{'$or': [ {'mila_cluster_username': user}, {'cc_account_username': user}, {'mila_email_username': user} ]} diff --git a/clockwork_web/core/clusters_helper.py b/clockwork_web/core/clusters_helper.py index bc401241..3398315a 100644 --- a/clockwork_web/core/clusters_helper.py +++ b/clockwork_web/core/clusters_helper.py @@ -74,7 +74,7 @@ def get_account_fields(): example of the returned dictionary: { "cc_account_username": ["beluga", "cedar", "graham", "narval"], - "mila_account_username": ["mila"], + "mila_cluster_username": ["mila"], "test_cluster_username": ["test_cluster"] } """ diff --git a/clockwork_web/core/jobs_helper.py b/clockwork_web/core/jobs_helper.py index 59033b57..a9ef4c72 100644 --- a/clockwork_web/core/jobs_helper.py +++ b/clockwork_web/core/jobs_helper.py @@ -438,12 +438,12 @@ def get_jobs_properties_list_per_page(): # """ # # # create a table with one entry for each entry -# mila_account_usernames = set(e["cw"]["mila_account_username"] for e in L_entries) +# mila_cluster_usernames = set(e["cw"]["mila_cluster_username"] for e in L_entries) # DD_counts = dict( -# (mila_account_username, {"PENDING": 0, "RUNNING": 0, "COMPLETED": 0, "ERROR": 0}) -# for mila_account_username in mila_account_usernames +# (mila_cluster_username, {"PENDING": 0, "RUNNING": 0, "COMPLETED": 0, "ERROR": 0}) +# for mila_cluster_username in mila_cluster_usernames # ) # for e in L_entries: -# DD_counts[e["mila_account_username"]][mapping[e["job_state"]]] += 1 +# DD_counts[e["mila_cluster_username"]][mapping[e["job_state"]]] += 1 # # return DD_counts diff --git a/clockwork_web/core/users_helper.py b/clockwork_web/core/users_helper.py index f6ea2df2..86862e64 100644 --- a/clockwork_web/core/users_helper.py +++ b/clockwork_web/core/users_helper.py @@ -328,7 +328,7 @@ def get_available_clusters_from_user_dict(D_user): "mila_email_username": "student00@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa00", - "mila_account_username": "milauser00", + "mila_cluster_username": "milauser00", "cc_account_username": "ccuser00", "cc_account_update_key": null, "web_settings": { @@ -338,19 +338,19 @@ def get_available_clusters_from_user_dict(D_user): } } - In this example, the fields we are interested in are the "mila_account_username" + In this example, the fields we are interested in are the "mila_cluster_username" and the "cc_account_username". They are referred in the account fields (one of the two input sources mentioned previously). The latter is as follows: { "cc_account_username": ["beluga", "cedar", "graham", "narval"], - "mila_account_username": ["mila"], + "mila_cluster_username": ["mila"], "test_cluster_username": ["test_cluster"] } and is built from the cluster data provided by the configuration file. Considering this example, the user "student00@mila.quebec" has access to the clusters: "beluga", "cedar", "graham" and "narval" because of its field "cc_account_username", - and "mila" through the "mila_account_username". However, it does not have access to + and "mila" through the "mila_cluster_username". However, it does not have access to the cluster "test_cluster" because its user dictionary does not contain a field "test_cluster_username". @@ -393,7 +393,7 @@ def get_available_clusters_from_db(mila_email_username): "mila_email_username": "student00@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa00", - "mila_account_username": "milauser00", + "mila_cluster_username": "milauser00", "cc_account_username": "ccuser00", "cc_account_update_key": null, "web_settings": { diff --git a/clockwork_web/rest_routes/jobs.py b/clockwork_web/rest_routes/jobs.py index bb7d1fe3..382fc68f 100644 --- a/clockwork_web/rest_routes/jobs.py +++ b/clockwork_web/rest_routes/jobs.py @@ -224,7 +224,7 @@ def route_api_v1_jobs_user_dict_update(): # then we refuse the update and return an error # that describes the problem. - for key in ["mila_email_username", "mila_account_username", "cc_account_username"]: + for key in ["mila_email_username", "mila_cluster_username", "cc_account_username"]: # Be as strict as possible here. If the job entry # contains any of the three types of usernames (and it's not `None`), # than it must be matched against that of the user diff --git a/clockwork_web/user.py b/clockwork_web/user.py index d146939d..8261a0ab 100644 --- a/clockwork_web/user.py +++ b/clockwork_web/user.py @@ -52,7 +52,7 @@ def __init__( status, admin_access=False, clockwork_api_key=None, - mila_account_username=None, + mila_cluster_username=None, cc_account_username=None, cc_account_update_key=None, web_settings={}, @@ -77,7 +77,7 @@ def boolean(value): self.status = status self.admin_access = boolean(admin_access) self.clockwork_api_key = clockwork_api_key - self.mila_account_username = mila_account_username + self.mila_cluster_username = mila_cluster_username self.cc_account_username = cc_account_username self.cc_account_update_key = cc_account_update_key for k in ["nbr_items_per_page", "dark_mode", "language"]: @@ -138,7 +138,7 @@ def get(mila_email_username: str): status=e["status"], admin_access=e.get("admin_access", False), clockwork_api_key=e["clockwork_api_key"], - mila_account_username=e["mila_account_username"], + mila_cluster_username=e["mila_cluster_username"], cc_account_username=e["cc_account_username"], cc_account_update_key=e.get("cc_account_update_key", ""), web_settings=e.get("web_settings", {}), @@ -330,7 +330,7 @@ def __init__(self): self.admin_access = False self.clockwork_api_key = "deadbeef" self.cc_account_username = None - self.mila_account_username = None + self.mila_cluster_username = None self.cc_account_update_key = None self.web_settings = get_default_web_settings_values() self.web_settings["language"] = None diff --git a/clockwork_web_test/test_browser_jobs.py b/clockwork_web_test/test_browser_jobs.py index c22dc4ab..7815f45a 100644 --- a/clockwork_web_test/test_browser_jobs.py +++ b/clockwork_web_test/test_browser_jobs.py @@ -632,7 +632,7 @@ def test_cc_portal(client, fake_data): """ # Choose a user who have access to all the clusters user_dict = fake_data["users"][0] - assert user_dict["mila_account_username"] is not None + assert user_dict["mila_cluster_username"] is not None assert user_dict["cc_account_username"] is not None # Log in to Clockwork as this user diff --git a/clockwork_web_test/test_browser_status.py b/clockwork_web_test/test_browser_status.py index 3c90871d..4cd8481c 100644 --- a/clockwork_web_test/test_browser_status.py +++ b/clockwork_web_test/test_browser_status.py @@ -17,7 +17,7 @@ def test_status_nb_users(client, fake_data): """ # Choose a user who have access to all the clusters user_dict = fake_data["users"][0] - assert user_dict["mila_account_username"] is not None + assert user_dict["mila_cluster_username"] is not None assert user_dict["cc_account_username"] is not None # Log in to Clockwork as this user diff --git a/clockwork_web_test/test_browser_users.py b/clockwork_web_test/test_browser_users.py index 678a8c04..0ae4d613 100644 --- a/clockwork_web_test/test_browser_users.py +++ b/clockwork_web_test/test_browser_users.py @@ -25,8 +25,8 @@ def test_users_one_success(client, fake_data): # Check if the response is the expected one assert response.status_code == 200 # Success - if user["mila_account_username"]: - assert "{}".format(user["mila_account_username"]) in response.get_data( + if user["mila_cluster_username"]: + assert "{}".format(user["mila_cluster_username"]) in response.get_data( as_text=True ) if user["cc_account_username"]: diff --git a/clockwork_web_test/test_core_clusters.py b/clockwork_web_test/test_core_clusters.py index 9b40328e..91ed6fe0 100644 --- a/clockwork_web_test/test_core_clusters.py +++ b/clockwork_web_test/test_core_clusters.py @@ -14,7 +14,7 @@ def test_get_account_fields(): D_expected_account_fields = { "cc_account_username": ["beluga", "cedar", "graham", "narval"], - "mila_account_username": ["mila"], + "mila_cluster_username": ["mila"], } D_retrieved_account_fields = get_account_fields() diff --git a/clockwork_web_test/test_core_clusters_helper.py b/clockwork_web_test/test_core_clusters_helper.py index c104b42d..b95ea99f 100644 --- a/clockwork_web_test/test_core_clusters_helper.py +++ b/clockwork_web_test/test_core_clusters_helper.py @@ -76,7 +76,7 @@ def test_get_all_clusters(): "mila": { "organization": "Mila", "timezone": ZoneInfo(key="America/Montreal"), - "account_field": "mila_account_username", + "account_field": "mila_cluster_username", "allocations": "*", "nbr_cpus": 4860, # Number of CPUs on this cluster "nbr_gpus": 532, # Number of GPUs on this cluster @@ -119,7 +119,7 @@ def test_get_account_fields(): """ expected_clusters_for_account_fields = { "cc_account_username": ["beluga", "cedar", "graham", "narval"], - "mila_account_username": ["mila"], + "mila_cluster_username": ["mila"], } retrieved_clusters_for_accound_fields = get_account_fields() diff --git a/clockwork_web_test/test_core_users_helper.py b/clockwork_web_test/test_core_users_helper.py index 4f6cc647..6461ba64 100644 --- a/clockwork_web_test/test_core_users_helper.py +++ b/clockwork_web_test/test_core_users_helper.py @@ -1232,7 +1232,7 @@ def test_get_users_one_known_user(app, fake_data): "mila_email_username": "student1@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa01", - "mila_account_username": "milauser1", + "mila_cluster_username": "milauser1", "cc_account_username": "ccuser1", "cc_account_update_key": None, "web_settings": {"nbr_items_per_page": 40, "dark_mode": False}, @@ -1247,7 +1247,7 @@ def test_get_users_one_known_user(app, fake_data): "mila_email_username": "student1@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa01", - "mila_account_username": "milauser1", + "mila_cluster_username": "milauser1", "cc_account_username": None, "cc_account_update_key": None, "web_settings": {"nbr_items_per_page": 40, "dark_mode": False}, @@ -1263,7 +1263,7 @@ def test_get_users_one_known_user(app, fake_data): "mila_email_username": "student1@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa01", - "mila_account_username": None, + "mila_cluster_username": None, "cc_account_username": "ccuser1", "cc_account_update_key": None, "web_settings": {"nbr_items_per_page": 40, "dark_mode": False}, diff --git a/clockwork_web_test/test_rest_jobs.py b/clockwork_web_test/test_rest_jobs.py index d2bbb7e7..9557f38b 100644 --- a/clockwork_web_test/test_rest_jobs.py +++ b/clockwork_web_test/test_rest_jobs.py @@ -174,7 +174,7 @@ def test_jobs_user_dict_update_successful_update( }, "cw": { "cc_account_username": None, - "mila_account_username": None, + "mila_cluster_username": None, "mila_email_username": None, }, "user": { @@ -191,10 +191,10 @@ def test_jobs_user_dict_update_successful_update( ) elif cluster_name in ["mila"]: if update_allowed: - D_job["cw"]["mila_account_username"] = D_user["mila_account_username"] + D_job["cw"]["mila_cluster_username"] = D_user["mila_cluster_username"] else: - D_job["cw"]["mila_account_username"] = ( - "NOT_" + D_user["mila_account_username"] + D_job["cw"]["mila_cluster_username"] = ( + "NOT_" + D_user["mila_cluster_username"] ) else: raise Exception("You're not handling properly the cluster_name parameter.") diff --git a/docs/clockwork_dev_guide/slurm_state.md b/docs/clockwork_dev_guide/slurm_state.md index c74258e7..e7f83323 100644 --- a/docs/clockwork_dev_guide/slurm_state.md +++ b/docs/clockwork_dev_guide/slurm_state.md @@ -62,7 +62,7 @@ Jobs are stored in the database in the following format: }, "cw": { "cc_account_username": "ccuser02", - "mila_account_username": null, + "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 a8beee0d..1951e4f6 100644 --- a/docs/clockwork_user_guide/rest_api.rst +++ b/docs/clockwork_user_guide/rest_api.rst @@ -54,7 +54,7 @@ jobs "cluster_name": "beluga"}, "cw": { "cc_account_username": "ccuser01", - "mila_account_username": null, + "mila_cluster_username": null, "mila_email_username": null}, "user": {} }, @@ -100,7 +100,7 @@ jobs "slurm": { "job_id": "233874", "name": "somejobname_942640", - "mila_account_username": "milauser12", + "mila_cluster_username": "milauser12", "uid": "10012", "account": "mila", "job_state": "RUNNING", @@ -120,7 +120,7 @@ jobs "cluster_name": "mila"}, "cw": { "cc_account_username": null, - "mila_account_username": "milauser12", + "mila_cluster_username": "milauser12", "mila_email_username": null}, "user": {} } diff --git a/scripts/import_users_from_sarc.py b/scripts/import_users_from_sarc.py index 9675fd9b..328b0a8f 100644 --- a/scripts/import_users_from_sarc.py +++ b/scripts/import_users_from_sarc.py @@ -21,7 +21,7 @@ def process_user(D_sarc_user): user = { "mila_email_username": D_sarc_user["mila"]["email"], "display_name": D_sarc_user["mila_ldap"]["display_name"], - "mila_account_username": D_sarc_user["mila_ldap"]["mila_account_username"], + "mila_cluster_username": D_sarc_user["mila_ldap"]["mila_cluster_username"], "mila_cluster_uid": D_sarc_user["mila_ldap"]["mila_cluster_uid"], "mila_cluster_gid": D_sarc_user["mila_ldap"]["mila_cluster_gid"], "status": "enabled" if D_sarc_user["mila"]["active"] else "disabled", diff --git a/scripts/produce_fake_users.py b/scripts/produce_fake_users.py index 4b91a2b9..3c5d9749 100644 --- a/scripts/produce_fake_users.py +++ b/scripts/produce_fake_users.py @@ -18,7 +18,7 @@ "status": "enabled", "clockwork_api_key": "000aaa" "cc_account_username": "ccuser040", - "mila_account_username": milauser040", + "mila_cluster_username": milauser040", "cc_account_update_key": None }, { ... }, @@ -57,7 +57,7 @@ def gen_single_user(n): "mila_email_username": "student%0.2d@mila.quebec" % n, "status": status, "clockwork_api_key": "000aaa%0.2d" % n, - "mila_account_username": "milauser%0.2d" % n, + "mila_cluster_username": "milauser%0.2d" % n, "cc_account_username": cc_account_username, "_extra": { "mila": { diff --git a/scripts/read_mila_ldap.py b/scripts/read_mila_ldap.py index 970ad010..8e2778eb 100644 --- a/scripts/read_mila_ldap.py +++ b/scripts/read_mila_ldap.py @@ -240,7 +240,7 @@ def process_user(user_raw: dict) -> dict: them to contain only one element at [0]. mail[0] -> mila_email_username (includes the "@mila.quebec") - posixUid[0] -> mila_account_username + posixUid[0] -> mila_cluster_username uidNumber[0] -> mila_cluster_uid gidNumber[0] -> mila_cluster_gid displayName[0] -> display_name @@ -253,7 +253,7 @@ def process_user(user_raw: dict) -> dict: user = { # include the suffix "@mila.quebec" "mila_email_username": user_raw["mail"][0], - "mila_account_username": user_raw["posixUid"][0], + "mila_cluster_username": user_raw["posixUid"][0], "mila_cluster_uid": user_raw["uidNumber"][0], "mila_cluster_gid": user_raw["gidNumber"][0], "display_name": user_raw["displayName"][0], diff --git a/scripts_test/test_read_mila_ldap.py b/scripts_test/test_read_mila_ldap.py index 5f6296a5..0c3b1414 100644 --- a/scripts_test/test_read_mila_ldap.py +++ b/scripts_test/test_read_mila_ldap.py @@ -25,7 +25,7 @@ def test_database_update_users(): LD_users = [ { "mila_email_username": "johnsmith@mila.quebec", - "mila_account_username": "johnsmith", + "mila_cluster_username": "johnsmith", "mila_cluster_uid": "1500000001", "mila_cluster_gid": "1500000001", "display_name": "John Smith", @@ -33,7 +33,7 @@ def test_database_update_users(): }, { "mila_email_username": "grouchomarx@mila.quebec", - "mila_account_username": "grouchomarx", + "mila_cluster_username": "grouchomarx", "mila_cluster_uid": "1500000002", "mila_cluster_gid": "1500000002", "display_name": "Groucho Marx", @@ -44,7 +44,7 @@ def test_database_update_users(): LD_users_updates = [ { "mila_email_username": "johnsmith@mila.quebec", - "mila_account_username": "johnsmith", + "mila_cluster_username": "johnsmith", "mila_cluster_uid": "1500000001", "mila_cluster_gid": "1500000001", "display_name": "John Smith", @@ -52,7 +52,7 @@ def test_database_update_users(): }, { "mila_email_username": "grouchomarx@mila.quebec", - "mila_account_username": "grouchomarx", + "mila_cluster_username": "grouchomarx", "mila_cluster_uid": "1500000002", "mila_cluster_gid": "1500000002", "display_name": "Groucho Marx", @@ -158,7 +158,7 @@ def test_client_side_user_updates(): LD_users_DB = [ { "mila_email_username": name + "@mila.quebec", - "mila_account_username": name + "@mila.quebec", + "mila_cluster_username": name + "@mila.quebec", "mila_cluster_uid": "%d" % (1500000000 + i), "mila_cluster_gid": "%d" % (1500000000 + i), "display_name": name.upper(), # whatever @@ -237,7 +237,7 @@ def test_client_side_user_updates_web_settings_new_user(): LD_users_to_add = [ { "mila_email_username": "jamesbond@mila.quebec", - "mila_account_username": "jamesbond", + "mila_cluster_username": "jamesbond", "mila_cluster_uid": "1500000001", "mila_cluster_gid": "1500000001", "display_name": "James Bond", @@ -275,7 +275,7 @@ def test_client_side_user_updates_web_settings_updated_user(): LD_predefined_users = [ { "mila_email_username": "jamesbond@mila.quebec", - "mila_account_username": "jamesbond", + "mila_cluster_username": "jamesbond", "mila_cluster_uid": "1500000001", "mila_cluster_gid": "1500000001", "display_name": "James Bond", @@ -290,7 +290,7 @@ def test_client_side_user_updates_web_settings_updated_user(): LD_users_to_update = [ { "mila_email_username": "jamesbond@mila.quebec", - "mila_account_username": "agent007", # This is to check an update different from the web settings + "mila_cluster_username": "agent007", # This is to check an update different from the web settings "mila_cluster_uid": "1500000001", "mila_cluster_gid": "1500000001", "display_name": "James Bond", @@ -349,7 +349,7 @@ def test_process_user(): target = { "mila_email_username": "john.smith@mila.quebec", - "mila_account_username": "smithj", + "mila_cluster_username": "smithj", "mila_cluster_uid": "1500000001", "mila_cluster_gid": "1500000001", "display_name": "John Smith", diff --git a/slurm_state/cluster_desc/mila.json b/slurm_state/cluster_desc/mila.json index 16686cba..4093f847 100644 --- a/slurm_state/cluster_desc/mila.json +++ b/slurm_state/cluster_desc/mila.json @@ -10,5 +10,5 @@ "gcpV100x1Cloud", "gcpV100Xx1Cloud", "gcpV100x2Cloud", "gcpV100x4Cloud", "gcpK80x1Cloud", "gcpK80Xx1Cloud", "gcpK80x2Cloud", "gcpK80x4Cloud"], "timezone": "America/Montreal", - "local_username_referenced_by_parent_as": "mila_account_username" + "local_username_referenced_by_parent_as": "mila_cluster_username" } diff --git a/slurm_state/mongo_update.py b/slurm_state/mongo_update.py index 7f1fb666..ffdadab5 100644 --- a/slurm_state/mongo_update.py +++ b/slurm_state/mongo_update.py @@ -425,14 +425,14 @@ def associate_account(LD_sacct_jobs): # In theory, someone could have copy/pasted the special sbatch command # (that we gave them on the web site) on the Mila cluster instead of CC. # We really want to avoid that kind of problem whereby someone's - # "cc_account_username" will be set to their "mila_account_username" + # "cc_account_username" will be set to their "mila_cluster_username" # due to that. # # The way that we prevent this is by setting a particular value # in the cluster config. Here's a snippet from test_config.toml # that clearly shows `update_field=false`. # [clusters.mila] - # account_field="mila_account_username" + # account_field="mila_cluster_username" # update_field=false # Register accounts for external clusters (e.g. Compute Canada) @@ -460,7 +460,7 @@ def associate_account(LD_sacct_jobs): # "mila_email_username": "student00@mila.quebec", # "status": "enabled", # "clockwork_api_key": "000aaa00", - # "mila_account_username": "milauser00", + # "mila_cluster_username": "milauser00", # "cc_account_username": "ccuser00", # "cc_account_update_key": null, # "web_settings": { diff --git a/test_common/fake_data.json b/test_common/fake_data.json index 31088e31..b38bb1a2 100644 --- a/test_common/fake_data.json +++ b/test_common/fake_data.json @@ -4,7 +4,7 @@ "mila_email_username": "student00@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa00", - "mila_account_username": "milauser00", + "mila_cluster_username": "milauser00", "cc_account_username": "ccuser00", "cc_account_update_key": null, "web_settings": { @@ -17,7 +17,7 @@ "mila_email_username": "student01@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa01", - "mila_account_username": "milauser01", + "mila_cluster_username": "milauser01", "cc_account_username": "ccuser01", "cc_account_update_key": null, "web_settings": { @@ -30,7 +30,7 @@ "mila_email_username": "student02@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa02", - "mila_account_username": "milauser02", + "mila_cluster_username": "milauser02", "cc_account_username": "ccuser02", "cc_account_update_key": null, "web_settings": { @@ -43,7 +43,7 @@ "mila_email_username": "student03@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa03", - "mila_account_username": "milauser03", + "mila_cluster_username": "milauser03", "cc_account_username": "ccuser03", "cc_account_update_key": null, "web_settings": { @@ -56,7 +56,7 @@ "mila_email_username": "student04@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa04", - "mila_account_username": "milauser04", + "mila_cluster_username": "milauser04", "cc_account_username": "ccuser04", "cc_account_update_key": null, "web_settings": { @@ -69,7 +69,7 @@ "mila_email_username": "student05@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa05", - "mila_account_username": "milauser05", + "mila_cluster_username": "milauser05", "cc_account_username": "ccuser05", "cc_account_update_key": null, "web_settings": { @@ -82,7 +82,7 @@ "mila_email_username": "student06@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa06", - "mila_account_username": "milauser06", + "mila_cluster_username": "milauser06", "cc_account_username": null, "cc_account_update_key": null, "web_settings": { @@ -95,7 +95,7 @@ "mila_email_username": "student07@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa07", - "mila_account_username": "milauser07", + "mila_cluster_username": "milauser07", "cc_account_username": "ccuser07", "cc_account_update_key": null, "web_settings": { @@ -108,7 +108,7 @@ "mila_email_username": "student08@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa08", - "mila_account_username": "milauser08", + "mila_cluster_username": "milauser08", "cc_account_username": "ccuser08", "cc_account_update_key": null, "web_settings": { @@ -121,7 +121,7 @@ "mila_email_username": "student09@mila.quebec", "status": "disabled", "clockwork_api_key": "000aaa09", - "mila_account_username": "milauser09", + "mila_cluster_username": "milauser09", "cc_account_username": "ccuser09", "cc_account_update_key": null, "web_settings": { @@ -134,7 +134,7 @@ "mila_email_username": "student10@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa10", - "mila_account_username": "milauser10", + "mila_cluster_username": "milauser10", "cc_account_username": "ccuser10", "cc_account_update_key": null, "web_settings": { @@ -147,7 +147,7 @@ "mila_email_username": "student11@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa11", - "mila_account_username": "milauser11", + "mila_cluster_username": "milauser11", "cc_account_username": "ccuser11", "cc_account_update_key": null, "web_settings": { @@ -160,7 +160,7 @@ "mila_email_username": "student12@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa12", - "mila_account_username": "milauser12", + "mila_cluster_username": "milauser12", "cc_account_username": "ccuser12", "cc_account_update_key": null, "web_settings": { @@ -173,7 +173,7 @@ "mila_email_username": "student13@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa13", - "mila_account_username": "milauser13", + "mila_cluster_username": "milauser13", "cc_account_username": "ccuser13", "cc_account_update_key": null, "web_settings": { @@ -186,7 +186,7 @@ "mila_email_username": "student14@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa14", - "mila_account_username": "milauser14", + "mila_cluster_username": "milauser14", "cc_account_username": "ccuser14", "cc_account_update_key": null, "web_settings": { @@ -199,7 +199,7 @@ "mila_email_username": "student15@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa15", - "mila_account_username": "milauser15", + "mila_cluster_username": "milauser15", "cc_account_username": "ccuser15", "cc_account_update_key": null, "web_settings": { @@ -212,7 +212,7 @@ "mila_email_username": "student16@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa16", - "mila_account_username": "milauser16", + "mila_cluster_username": "milauser16", "cc_account_username": "ccuser16", "cc_account_update_key": null, "web_settings": { @@ -225,7 +225,7 @@ "mila_email_username": "student17@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa17", - "mila_account_username": "milauser17", + "mila_cluster_username": "milauser17", "cc_account_username": "ccuser17", "cc_account_update_key": null, "web_settings": { @@ -238,7 +238,7 @@ "mila_email_username": "student18@mila.quebec", "status": "enabled", "clockwork_api_key": "000aaa18", - "mila_account_username": "milauser18", + "mila_cluster_username": "milauser18", "cc_account_username": "ccuser18", "cc_account_update_key": null, "web_settings": { @@ -251,7 +251,7 @@ "mila_email_username": "student19@mila.quebec", "status": "disabled", "clockwork_api_key": "000aaa19", - "mila_account_username": "milauser19", + "mila_cluster_username": "milauser19", "cc_account_username": "ccuser19", "cc_account_update_key": null, "web_settings": { diff --git a/test_common/jobs_test_helpers.py b/test_common/jobs_test_helpers.py index b83dc59f..5804a2ec 100644 --- a/test_common/jobs_test_helpers.py +++ b/test_common/jobs_test_helpers.py @@ -124,7 +124,7 @@ def validator(LD_jobs): # make sure that every job returned has that username somewhere for D_job in LD_jobs: assert username in [ - D_job["cw"].get("mila_account_username", None), + D_job["cw"].get("mila_cluster_username", None), D_job["cw"].get("mila_email_username", None), D_job["cw"].get("cc_account_username", None), ] diff --git a/test_config.toml b/test_config.toml index 0a860e7d..dd7d239f 100644 --- a/test_config.toml +++ b/test_config.toml @@ -37,7 +37,7 @@ language="en" [clusters.mila] -account_field="mila_account_username" +account_field="mila_cluster_username" update_field=false allocations="*" timezone="America/Montreal"