-
Notifications
You must be signed in to change notification settings - Fork 6
Description
What happened?
Error arises at bundle build stage due to not being able to find the bundle.yml file when creating bundle with ecbundle create --src-dir $PWD/source. I think this is due to the relative symlink created for the bundle.yml within the source directory not being correct when link_name in symlink_force is a symbolic link. I locally resolved the issue by extracting the realpaths first before computing the relative path in line 109 of ecbundle/util.py, but it might be relevant to extract the realpath earlier than this.
What are the steps to reproduce the bug?
Problem occurred running in user home directory on ECMWF's HPC with the following bundle.yml
---
### Bundle
name : test-bundle
build_type: RelWithDebInfo
projects :
- ecbuild :
git : https://github.com/ecmwf/ecbuild
version : master
bundle : false
- eccodes :
git : https://github.com/ecmwf/eccodes
version : 2.44.0
cmake : >
ENABLE_ECCODES_THREADS=ON
ENABLE_NETCDF=OFF
ENABLE_MEMFS=ON
ENABLE_FORTRAN=OFF
ENABLE_INSTALL_ECCODES_DEFINITIONS=OFF
ENABLE_INSTALL_ECCODES_SAMPLES=OFF
Inside python virtual env where ecbundle was installed, I ran
ecbundle create --src-dir=$PWD/source
ecbundle build --src-dir=$PWD/source
Errors occurs when running ecbundle build, but the issue arises in the bundle creation stage. Note, the specification of --src-dir is important here even though the path is the same as where the default would be created.
Version
v2.3.0
Platform (OS and architecture)
x86_64 GNU/Linux
Relevant log output
$ ecbundle build --src-dir=$PWD/source
Traceback (most recent call last):
File ".../Documents/pproc-bundle/ecbundle_venv/bin/ecbundle-build", line 170, in <module>
sys.exit(main())
^^^^^^
File ".../Documents/pproc-bundle/ecbundle_venv/bin/ecbundle-build", line 167, in main
build.build()
File ".../Documents/pproc-bundle/ecbundle_venv/lib/python3.11/site-packages/ecbundle/build.py", line 606, in build
self.create_scripts()
File ".../Documents/pproc-bundle/ecbundle_venv/lib/python3.11/site-packages/ecbundle/build.py", line 519, in create_scripts
options = self.bundle().options()
^^^^^^^^^^^^^
File ".../Documents/pproc-bundle/ecbundle_venv/lib/python3.11/site-packages/ecbundle/build.py", line 386, in bundle
return Bundle(self.src_dir() + "/bundle.yml", env=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../Documents/pproc-bundle/ecbundle_venv/lib/python3.11/site-packages/ecbundle/bundle.py", line 25, in __init__
self.config = parse_yaml_file(self.filepath)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../Documents/pproc-bundle/ecbundle_venv/lib/python3.11/site-packages/ecbundle/parse.py", line 26, in parse_yaml_file
with open(filepath, "r") as ymlfile:
^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.../pproc-bundle/source/bundle.yml'Accompanying data
No response
Organisation
ECMWF