Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paver update_db is busted #32252

Closed
robrap opened this issue May 17, 2023 · 6 comments
Closed

Paver update_db is busted #32252

robrap opened this issue May 17, 2023 · 6 comments

Comments

@robrap
Copy link
Contributor

robrap commented May 17, 2023

Using paver update_db gives the following:

root@lms:/edx/app/edxapp/edx-platform# paver update_db
---> pavelib.servers.update_db
---> pavelib.prereqs.install_prereqs
---> pavelib.prereqs.install_node_prereqs
Node prereqs unchanged, skipping...
---> pavelib.prereqs.install_python_prereqs
---> pavelib.prereqs.uninstall_python_packages
NO_PYTHON_UNINSTALL is set. No attempts will be made to uninstall old Python libs.
Python prereqs unchanged, skipping...
pip freeze > /edx/app/edxapp/edx-platform/test_root/log/pip_freeze.log
********************************************************************************
* WARNING: Mac users should run this from both the lms and studio shells
* in docker devstack to avoid startup errors that kill your CPU.
* For more details, see:
* https://github.com/openedx/devstack#docker-is-using-lots-of-cpu-time-when-it-should-be-idle
********************************************************************************
NO_EDXAPP_SUDO=1 EDX_PLATFORM_SETTINGS_OVERRIDE=devstack_docker /edx/bin/edxapp-migrate-lms --traceback --pythonpath=. 
/bin/sh: 1: /edx/bin/edxapp-migrate-lms: not found


Captured Task Output:
---------------------

---> pavelib.servers.update_db
---> pavelib.prereqs.install_prereqs
---> pavelib.prereqs.install_node_prereqs
---> pavelib.prereqs.install_python_prereqs
---> pavelib.prereqs.uninstall_python_packages
pip freeze > /edx/app/edxapp/edx-platform/test_root/log/pip_freeze.log
NO_EDXAPP_SUDO=1 EDX_PLATFORM_SETTINGS_OVERRIDE=devstack_docker /edx/bin/edxapp-migrate-lms --traceback --pythonpath=. 

Build failed running pavelib.servers.update_db: Subprocess return code: 127

Multiple people have seen this. A workaround seems to be to run make dev.migrate.lms in devstack, and/or what that runs, which doesn't seem to be paver.

There is no DEPR for paver, but should there be? Should this be removed and docs updated, rather than fixing? Not sure, but we probably shouldn't leave this broken.

@kdmccormick
Copy link
Member

kdmccormick commented May 22, 2023

(I'm not working actively on Devstack, but I have some leftover context)

/edx/bin/edxapp-migrate-lms was a trivial wrapper around ./manage.py lms migrate that existed on the Ansible-based images. Any remaining Ansible-based deployments probably still use it. My intuition is that the script was provided as an abstraction around migration in case it ever happend that ./manage.py ... migrate wasn't sufficient; AFAICT that never happened.

I am guessing that this error is happening because the new Ansible-free edx-platform images don't include that wrapper script. So, one solution would be to add /edx/bin/edxapp-migrate-lms to the Ansible-free edx-platform image.

Another solution (and my recommendation) is to deprecate paver update_db, since neither Tutor nor Devstack need it. For backwards compatibility for Ansible deployers, openedx/configuration could be updated to use ./manage.py ... migrate instead of paver.

Regarding general deprecation of Paver: paver update_assets is being deprecated, and the remaining edx-platform Paver commands strike me as trivial and/or unused.

@robrap
Copy link
Contributor Author

robrap commented May 22, 2023

Would it make sense to add migrate to the Makefile to better match other services and the cookiecutter? https://github.com/openedx/edx-cookiecutters/blob/7fdf208c0844cdbdeeb6234df16d29a6af11a41c/cookiecutter-django-ida/%7B%7Bcookiecutter.repo_name%7D%7D/Makefile#L88-L89

@kdmccormick
Copy link
Member

I'm supportive of it!

@robrap
Copy link
Contributor Author

robrap commented Jun 7, 2023

Possibly this ticket should be moved to a DEPR for paver update_db.

@robrap
Copy link
Contributor Author

robrap commented Jul 7, 2023

The DEPR has been created here: #32683

@kdmccormick
Copy link
Member

Closed per #32683

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants