The repository has not been cloned yet. Run the following command first
to clone the repo, check out the target commit, and install dependencies:
bash
bash /setup_files/setup.sh
The code will then be available at /testbed.
You are working on the repository AgnostiqHQ/covalent (instance: AgnostiqHQ__covalent-1622).
The code is located in /testbed.
##1621 Running any CLI command will fail on a new machine
Environment
Covalent version: 0.222.0rc0
Python version: 3.8.15
Operating system: Ubuntu 20.04
What is happening?
Executing any CLI command throws an error now since it is unable to find the non-existent directory for the database, which it is looking for when because we are executing code during import time. This is why the tests are currently failing on develop branch.
How can we reproduce the issue?
After doing a covalent purge -Hy and deleting the ~/.local/share/covalent directory if we run any command like covalent db migrate command, which is usually done as part of the test pipeline it will throw a long traceback with the final error being:
python
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
This happens because the database directory now only gets created after covalent start command is run.
What should happen?
No error should be thrown when running a CLI command.
Any suggestions?
Ideally, we should not be executing anything during import time (which happens to be the case for this issue), but resolving that might open up a different can of worms. So an alternative solution is to move the following line back to ConfigManager class' definition from its current place in _graceful_start():