You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
get_crontab_contents.py should be callable as a python script.
Current behavior
#1131 introduced a bug on line 227that misnames the ArgumentParser.parse_args method to _parse_args; likely as a copy-paste error when renaming our internal method of the same name.
Machines affected
All
Steps To Reproduce
Clone and build the code (technically only the conda part of the build is needed for reproducing this bug)
Load the workflow module for your machine, activate conda environment
Run python3 get_crontab_contents.py -m [your_platform] and observe the error:
Traceback (most recent call last):
File "/mnt/lfs5/BMC/gsd-fv3-test/kavulich/UFS/workdir/test_develop/2024-10-11/intel/ufs-srweather-app/ush/get_crontab_contents.py", line 237, in <module>
args = _parse_args(sys.argv[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/lfs5/BMC/gsd-fv3-test/kavulich/UFS/workdir/test_develop/2024-10-11/intel/ufs-srweather-app/ush/get_crontab_contents.py", line 227, in _parse_args
args = parser._parse_args(argv)
^^^^^^^^^^^^^^^^^^
AttributeError: 'ArgumentParser' object has no attribute '_parse_args'. Did you mean: 'parse_args'?
Detailed Description of Fix (optional)
Rename parser._parse_args back to the correct parser.parse_args
Additional Information
This problem was missed because the failure only occurs get_crontab_contents.py is called as a script for parsing arguments; imported calls to the function get_crontab_contents (which we have in both our unit test and in generate_FV3LAM_workflow.py) work just fine. The script is only called from ush/launch_FV3LAM_wflow.sh, and this is not covered in any of our automated or WE2E tests. We should consider adding tests for this script in the future.
The text was updated successfully, but these errors were encountered:
Expected behavior
get_crontab_contents.py
should be callable as a python script.Current behavior
#1131 introduced a bug on line 227that misnames the
ArgumentParser.parse_args
method to_parse_args
; likely as a copy-paste error when renaming our internal method of the same name.Machines affected
All
Steps To Reproduce
python3 get_crontab_contents.py -m [your_platform]
and observe the error:Detailed Description of Fix (optional)
Rename
parser._parse_args
back to the correctparser.parse_args
Additional Information
This problem was missed because the failure only occurs
get_crontab_contents.py
is called as a script for parsing arguments; imported calls to the functionget_crontab_contents
(which we have in both our unit test and ingenerate_FV3LAM_workflow.py
) work just fine. The script is only called fromush/launch_FV3LAM_wflow.sh
, and this is not covered in any of our automated or WE2E tests. We should consider adding tests for this script in the future.The text was updated successfully, but these errors were encountered: