Skip to content

using an action option via mode configuration does not work #3424

Closed
@dmargala

Description

@dmargala

A colleague noticed that some of our execution mode configurations are no longer working as expected after upgrading to reframe 4.7 and pinpointed the specific commit where the behavior seemed to change:

After some manual bisection on git tag -l I found that this seems to have started breaking between 4.6.4 and 4.7.0. It looks like commit aa75c37 was the one where it started failing.

It seems like maybe an initial parsing of the cli arguments is failing before the options for the specified mode are added.

Here's a minimal reproducer:

> cat test-config.py
site_configuration = {
    'modes': [
        {
            'name': 'run',
            'options': ['--run']
        }
    ]
}
> reframe --version
4.7.1
> reframe -C test-config.py --mode=run
usage: reframe [-h] [--compress-report] [--dont-restage] [--keep-stage-files]
               [-o DIR] [--perflogdir DIR] [--prefix DIR] [--report-file FILE]
               [--report-junit FILE] [-s DIR] [--save-log-files]
               [--timestamp [TIMEFMT]] [-c PATH] [-R] [--cpu-only] [--failed]
               [--gpu-only] [--maintainer PATTERN] [-n PATTERN] [-p PATTERN]
               [-T PATTERN] [-t PATTERN] [-x PATTERN] [-E EXPR]
               (--ci-generate FILE | --delete-stored-sessions QUERY | --describe | --describe-stored-sessions QUERY | --describe-stored-testcases QUERY | --detect-host-topology [FILE] | --dry-run | -L [{C,T}] | --list-stored-sessions [QUERY] | --list-stored-testcases QUERY | -l [{C,T}] | --list-tags | --performance-compare CMPSPEC | -r | --show-config [PARAM] | -V)
               [--disable-hook NAME] [--duration TIMEOUT] [--exec-order ORDER]
               [--exec-policy POLICY] [--flex-alloc-nodes {all|STATE|NUM}]
               [--flex-alloc-strict] [-J OPT] [--max-retries NUM]
               [--maxfail NUM] [--mode MODE] [--reruns N]
               [--restore-session [REPORT]] [--retries-threshold VALUE[%]]
               [-S [TEST.]VAR=VAL] [--skip-performance-check]
               [--skip-prgenv-check] [--skip-sanity-check]
               [--skip-system-check] [-M MAPPING] [-m MOD]
               [--module-mappings FILE] [--module-path PATH]
               [--non-default-craype] [--purge-env] [-u MOD]
               [--distribute [{all|avail|STATE}]] [-P VAR:VAL0,VAL1,...]
               [--repeat N] [--performance-report [PERFORMANCE_REPORT]]
               [--session-extras KV_DATA] [-C FILE] [--failure-stats]
               [--nocolor] [--system SYSTEM]
               [--table-format {csv,pretty,plain}] [-v] [-q]
reframe: error: one of the arguments --ci-generate --delete-stored-sessions --describe --describe-stored-sessions --describe-stored-testcases --detect-host-topology --dry-run -L/--list-detailed --list-stored-sessions --list-stored-testcases -l/--list --list-tags --performance-compare -r/--run --show-config -V/--version is required

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions