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

Fix provisioning script #1031

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Conversation

jesperhodge
Copy link
Member

@jesperhodge jesperhodge commented Jan 30, 2025

Description

This is a fix for the provision script.

Concerns, please address in review:

I do not know whether the provision script is only used for local development. If it's used for production deployments, for instance, changing the paths here may break things. Can you tell me where this script is used and where not?

Previous state:

  • After creating a fresh install and going to localhost:18160/admin, you cannot log in with "edx": "edx" because
  • The "edx" staff user is not created.
  • Provision produces two errors (even when the command finishes successfully):
    bash: line 0: cd: /edx/app/enterprise_catalog/enterprise_catalog/: No such file or directory
    python: can't open file '/edx/app/enterprise_catalog/enterprise_catalog/manage.py': [Errno 2] No such file or directory.
  • Migrations are not applied.
  • The provision script goes through, making it non-obvious that these errors are in the log output.

The recent changes to docker images have caused the provision script to contain incorrect paths, which this fixes.

Testing Instructions

  • Run make dev.provision in this repository
  • It should run through successfully
  • Verify that there are no "No such file or directory" errors in the terminal stdout output
  • In the log output, you should see migrations running without error (broken state: you see the line ...Running migrations for enterprise_catalog... but it's followed by an error)
  • You should see no error after creating super-user
  • Go to http://localhost:18160/admin/. Try to log in with user: "edx", password: "edx". This should succeed even on a fresh repo setup.

Post-review

  • Squash commits into discrete sets of changes
  • Ensure that once the changes have been deployed to stage, prod is manually deployed

@jesperhodge jesperhodge merged commit 548a9d5 into master Jan 30, 2025
6 checks passed
@jesperhodge jesperhodge deleted the fix--docker-paths-in-provision-script branch January 30, 2025 18:59
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

Successfully merging this pull request may close these issues.

2 participants