PrestaShop / TopTranslators

Top translators tribute page
https://translators.prestashop-project.org/
0 stars 3 forks source link

Degraded Mode #65

Closed matks closed 9 months ago

matks commented 10 months ago

As of today, September 2023, this project is in Degraded Mode

Broken because of outdated code that does not build anymore

2 weeks ago, I realized this website was not working.

The GitHub Action that was supposed to deploy the website was failing. After a few easy fixes, the main problem was found: this project is running very outdated Node scripts.

A broad upgrade of NPM and Webpack scripts is needed. The GitHub Action was running npm 8 and failed to download some very old dependencies.

Workaround

As the website was not even browsable, I found a workaround.

The /public directory actually contains the static files that can no longer be computed. They were hardversioned in Git at some point in time. Rather than keeping the whole website down, I submitted a Pull Request that simply skips the building of static files

So the standard workflow of the website is:

  1. It fetches up-to-date Crowdin data
  2. It formats data into statistics.json file
  3. It builds the website static files
  4. It deploys the website

I have modified the CI to skip step 3. Currently the GitHub Action workflow does not build the static files anymore: we keep reusing the same, the ones in /public.

Long term solution

The right thing to do, but it needs more time, is to update the NPM dependencies in /front application to be able to run in the CI, which can then be piped in again inside the worklow. And resume step 3 instead of skipping it.

Until step 3 is not re-enabled, any change in the code of /front will not be active in production environment.

matks commented 10 months ago

Example of a PR to restore step 3 https://github.com/PrestaShop/TopTranslators/pull/67

To be done when outdated NPM dependencies have been updated

matks commented 9 months ago

Fixed by https://github.com/PrestaShop/TopTranslators/pull/68