From 8cdfddee183585a93422bc1fda83dbee3a2d51c6 Mon Sep 17 00:00:00 2001 From: Agrendalath Date: Mon, 4 May 2026 14:43:00 +0200 Subject: [PATCH] feat: allow excluding individual init jobs To use it, add a specific init job (e.g., `drydock-lms-job-29`) to the `DRYDOCK_INIT_JOBS_EXCLUDED` list in the Tutor config. --- ...3919_piotr_exclude_individual_init_jobs.md | 30 +++++++++++++++++++ drydock/plugin.py | 5 +++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 changelog.d/20260924_163919_piotr_exclude_individual_init_jobs.md diff --git a/changelog.d/20260924_163919_piotr_exclude_individual_init_jobs.md b/changelog.d/20260924_163919_piotr_exclude_individual_init_jobs.md new file mode 100644 index 0000000..9714be0 --- /dev/null +++ b/changelog.d/20260924_163919_piotr_exclude_individual_init_jobs.md @@ -0,0 +1,30 @@ + + + +### Added + +- Individual init jobs can now be excluded from execution. + + + + diff --git a/drydock/plugin.py b/drydock/plugin.py index e514e6d..6b81845 100644 --- a/drydock/plugin.py +++ b/drydock/plugin.py @@ -96,7 +96,10 @@ def get_init_tasks(): render_command = tutor_env.render_str(TUTOR_CONFIG, command) - template["metadata"]["name"] = "drydock-" + template["metadata"]["name"] + "-" + str(i) + template["metadata"]["name"] = f"drydock-{template['metadata']['name']}-{i}" + if template["metadata"]["name"] in excluded_init_jobs: + continue + template["metadata"]["labels"].update( { "app.kubernetes.io/component": "drydock-job",