Skip to content

Fix job_config_init profile wiring and legacy version default - #1685

Merged
mvdbeek merged 2 commits into
galaxyproject:masterfrom
jmchilton:job-config-init-fixes
Aug 25, 2026
Merged

Fix job_config_init profile wiring and legacy version default#1685
mvdbeek merged 2 commits into
galaxyproject:masterfrom
jmchilton:job-config-init-fixes

Conversation

@jmchilton

Copy link
Copy Markdown
Member

Two independent bugs in job_config_init / profile_job_config_init, both found while addressing review comments on #1683.

profile_job_config_init records the wrong file

initialize_job_config writes job_conf.yml into the profile directory and then stores the profile's own planemo_profile_options.json path as job_config_file:

config["job_config_file"] = os.path.abspath(profile_config_path)

A profile set up this way hands Galaxy its options JSON as a job configuration, so the generated runner configuration never takes effect. Before:

$ planemo profile_create slurm_cluster
$ planemo profile_job_config_init slurm_cluster --runner slurm
$ jq -r .job_config_file ~/.planemo/profiles/slurm_cluster/planemo_profile_options.json
.../profiles/slurm_cluster/planemo_profile_options.json

tests/test_cmd_profile_job_config_init.py only asserted exit codes, which is why this survived. It now asserts the recorded path and parses the config it points at.

--galaxy_version defaults to the legacy layout

galaxy_version_option() pins the click default to "24.2", while gxjobconfinit defaults to "25.0" when the value is None and branches on galaxy_version < "25.0". Omitting the flag therefore selects the legacy configuration rather than a modern one.

For --runner slurm --singularity the output is byte-identical either way. For --tpv it is not:

with --galaxy_version 25.0 default (24.2)
runner dynamic_tpv dynamic + type: python + rules_module: tpv.rules
TPV config inline tpv_configs external tpv.yml the user must create
tpvdb_slurm destination generated commented-out template only

Passing None through lets the library's default apply and move with it. Callers that want the old layout still pass --galaxy_version 24.2 explicitly, which the existing test_job_config_init_24_2 covers.

Validation

  • pytest tests/test_cmd_job_config_init.py tests/test_cmd_profile_job_config_init.py — 8 passed; both new tests confirmed red before the fixes
  • flake8, black --check, isort --check-only clean on all changed files
  • docs/commands/{job_config_init,profile_job_config_init}.rst regenerated with scripts/commands_to_rst.py. The generator also rewrites eleven unrelated command docs that have drifted from merged PRs; those are left alone here.
  • End-to-end: profile_create + profile_job_config_init --runner slurm --tpv --singularity now yields dynamic_tpv, an uncommented tpvdb_slurm destination, https://gxy.io/tpv/db.yml, singularity_cmd: singularity, a commented drmaa_library_path, native_specification, tmp_dir: true, and a profile recording the real job_conf.yml.

Relationship to #1683

#1683 drops --galaxy_version 25.0 from its examples and recommends profile_job_config_init, per review there. Both of those are only correct once this lands, so this should merge first.

🤖 Generated with Claude Code

https://claude.ai/code/session_01C5F4LLXH1Rpt2MCLQCgwgU

jmchilton and others added 2 commits August 24, 2026 14:19
profile_job_config_init wrote job_conf.yml into the profile and then stored
the profile's own planemo_profile_options.json path as job_config_file, so
runs against the profile never saw the generated configuration.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C5F4LLXH1Rpt2MCLQCgwgU
The click default pinned 24.2, so omitting --galaxy_version produced the
legacy TPV layout - dynamic runner, rules_module, and a tpv.yml the user has
to write - while gxjobconfinit's own default is 25.0. Passing None through
lets that default apply and move with the library.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C5F4LLXH1Rpt2MCLQCgwgU
@mvdbeek
mvdbeek merged commit 8e80d9f into galaxyproject:master Aug 25, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants