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

feat: fix pull_translations for production deployment #34306

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

OmarIthawi
Copy link
Member

@OmarIthawi OmarIthawi commented Feb 28, 2024

This came up during discussion with @timmc-edx while trying to use atlas on 2U production:

Makefile paver usage replaced with manage.py.
This avoids running the production-unsuitable
pavelib.prereqs.install_prereqs step during deployments.

TODO

Seems to be working okay on devstack
....
processing language zh-hk
processing language zh-tw
python manage.py cms compilejsi18n
....

processing language en
processing language rtl
....
processing language zh-hk
processing language zh-tw

real	0m31.120s
user	0m0.016s
sys	0m0.028s
  • Test on production deployment at 2U (@timmc-edx)

This pull request is part of the FC-0012 project which implements the Translation Infrastructure update OEP-58.

Makefile paver usage replaced with manage.py.
This avoids running the production-unsuitable
`pavelib.prereqs.install_prereqs` step during deployments.
@openedx-webhooks
Copy link

Thanks for the pull request, @OmarIthawi! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Feb 28, 2024
@OmarIthawi
Copy link
Member Author

@timmc-edx @dianakhuang this works fine on my openedx/devstack local installation.

Please let me know if it looks good to you. We're likely to need Ansible to set the environment variables for production DJANGO_SETTINGS_MODULE or EDX_PLATFORM_SETTINGS depending on how the commands are being run.

timmc-edx added a commit to openedx-unsupported/configuration that referenced this pull request Feb 28, 2024
This reverts commit 70eb142
and makes the following changes:

- No need to install atlas directly -- the openedx-atlas package
  actually has what we need already.
- After openedx/edx-platform#34306 we
  shouldn't encounter npm issues.
@timmc-edx
Copy link
Contributor

Oh nice! I'll give this a shot.

timmc-edx added a commit to openedx-unsupported/configuration that referenced this pull request Feb 28, 2024
This reverts commit 70eb142
and makes the following changes:

- No need to install atlas directly -- the openedx-atlas package
  actually has what we need already.
- After openedx/edx-platform#34306 we
  shouldn't encounter npm issues, so move task above NPM installs.
- Try dropping the DSM and CFG vars and see if it still works.
timmc-edx added a commit to openedx-unsupported/configuration that referenced this pull request Feb 29, 2024
This reverts commit 70eb142
and makes the following changes:

- No need to install atlas directly -- the openedx-atlas package
  actually has what we need already.
- After openedx/edx-platform#34306 we
  shouldn't encounter npm issues, so move task above NPM installs.
- Try dropping the DSM and CFG vars and see if it still works.
Copy link
Contributor

@timmc-edx timmc-edx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, looks good! I've been able to use Atlas translations in a test build.

@feanil feanil merged commit 5a5947e into openedx:master Mar 1, 2024
47 checks passed
@openedx-webhooks
Copy link

@OmarIthawi 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

timmc-edx added a commit to openedx-unsupported/configuration that referenced this pull request Mar 1, 2024
This reverts commit 70eb142
and makes the following changes:

- No need to install atlas directly -- the openedx-atlas package
  actually has what we need already.
- After openedx/edx-platform#34306 we
  shouldn't encounter npm issues, so move task above NPM installs.
timmc-edx added a commit to openedx-unsupported/configuration that referenced this pull request Mar 1, 2024
This is to support OEP-58:
https://docs.openedx.org/projects/openedx-proposals/en/latest/architectural-decisions/oep-0058-arch-translations-management.html

Changes since the #7119 attempt:

- Move to just after main requirements are installed (just for faster feedback during testing, really)
- Use already-installed `openedx-atlas`
- Use variant-agnostic `EDX_PLATFORM_SETTINGS` rather than `DJANGO_SETTINGS_MODULE`
- Use Ansible `environment` field for env vars
- Drop `set -eu -o pipefail` since the script is now simple

Most importantly, openedx/edx-platform#34306 has since merged, so we don't have to worry about the NPM conflicts we were getting previously.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants