Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add setting to give all jobs a unique name #273

Merged
merged 6 commits into from
Aug 9, 2024
Merged

Conversation

trz42
Copy link
Contributor

@trz42 trz42 commented Jun 21, 2024

Until now all jobs are named after the job script. This PR adds a new configuration setting job_name that is used as the job's name. This is then also used by the job manager to list all jobs (with that name). Thus it is possible to have multiple bot instances running at the same cluster where each bot instance uses a different job name. Hence, each bot instance is able to only handle its "own" jobs. We can use this to run a separate bot instance, for example, for bot development and testing.

eessi_bot_job_manager.py Outdated Show resolved Hide resolved
eessi_bot_job_manager.py Outdated Show resolved Hide resolved
tasks/build.py Outdated
@@ -654,6 +662,7 @@ def submit_job(job, cfg):
build_env_cfg[config.BUILDENV_SETTING_SLURM_PARAMS],
time_limit,
job.slurm_opts,
f"--job-name='{job_name}'",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here, only use --job-name is the job_name is not None?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in c614a96

tasks/build.py Outdated
@@ -67,6 +67,10 @@ def get_build_env_cfg(cfg):

buildenv = cfg[config.SECTION_BUILDENV]

job_name = buildenv.get(config.BUILDENV_SETTING_JOB_NAME)
log(f"{fn}(): job_name '{job_name}'")
config_data = {config.BUILDENV_SETTING_JOB_NAME: job_name}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work, since config_data is overwritten below?

You should change the line 76 below to:

config_data[config.BUILDENV_SETTING_JOBS_BASE_DIR] = jobs_base_dir

This also shows this wasn't (re)tested?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Silly me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Tested. Should work. 😬

@boegel boegel merged commit b7ffe3b into EESSI:develop Aug 9, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants