redhat-performance / badfish

Vendor-agnostic tool for managing bare-metal systems via the Redfish API
https://quads.dev
GNU General Public License v3.0
93 stars 26 forks source link

`helpers` module error #216

Closed mukrishn closed 2 years ago

mukrishn commented 2 years ago

Your System Details

Describe the bug Running any badfish command lead to missing module failure, helpers modules not found.

To Reproduce / What were you Doing? Steps to reproduce the behavior:

  1. Download f068aa (current master branch) source code - git clone https://github.com/redhat-performance/badfish
  2. Ensure all required pip packages are installed - pip3 install -r requirements.txt
  3. Run any Badfish command - ./src/badfish/badfish.py -u quads -p password -i config/idrac_interfaces.yml -H mgmt-e26-h25-740xd.alias.bos.scalelab.redhat.com --clear-jobs --force
  4. It failed with this error
    Traceback (most recent call last):
    File "/root/badfish/./src/badfish/badfish.py", line 23, in <module>
    from helpers.async_lru import alru_cache
    ModuleNotFoundError: No module named 'helpers'
  5. Manually installed helpers module - pip3 install helpers
  6. Ran the same badfish command, got another error

Expected Behavior To work as normal :) (It was working last Wednesday) Logs / Screenshots

Traceback (most recent call last):
  File "/root/badfish/./src/badfish/badfish.py", line 23, in <module>
    from helpers.async_lru import alru_cache
ModuleNotFoundError: No module named 'helpers.async_lru'

Additional Details Add any other context or details about the problem here.

cc: @mkarg75

mukrishn commented 2 years ago

@grafuls could you take a look at this issue and guide me if I am doing something wrong here, it is affecting JetSki builds. Currently we are using an older 22b081c commit as workaround, but we want this to get fixed.

mordechai commented 2 years ago

@mukrishn I opened a similar issue on jetski thinking it was related to the virutal envs usage of badfish but grafuls reproduced then offered a symbolic link work around to fix this error.

ln -s {BADFISH_REPO_PATH}/src/helpers {VIRTUALENV_PATH}/lib/python3.10/site-packages/helpers

See Issue: https://github.com/redhat-performance/JetSki/issues/186#issuecomment-982666646

HTH

sadsfae commented 2 years ago

Thanks for filing this issue folks, we have a fix available now: https://github.com/redhat-performance/badfish/commit/c8116d7e0ca46d8714658e47bc1df6f19ec7f45e

Please pull a new image and let us know if you're sorted.

mukrishn commented 2 years ago

Thanks @sadsfae & @grafuls, it worked.

sadsfae commented 2 years ago

Excellent, thanks for letting us know about it in first place.