Make check fails after clean install

I have installed all prerequisites, plone 6 and volto on a clean ubuntu live server 24.04.1 installation.
Following the instructions in the deployment training at Create a new Project – Plone Deployment — Plone Training 2024 documentation, running the command "pipx run cookieplone project" first.
Everything works as expected and "make install" finishes succesfully.
The next step is to run "make check" to ensure the repo passes all tests.
The result of this command gives me errors:

  • dirname /var/plone/myproject/Makefile
  • echo 'Lint and Format codebase'
    Lint and Format codebase
  • pipx run --spec pre-commit==3.7.1 pre-commit run -a
    pre-commit for backend/..................................................Failed
  • hook id: sub-pre-commit
  • exit code: 1

Running pre-commit for backend:

pyupgrade................................................................Passed
isort....................................................................Passed
black....................................................................Passed
zpretty..................................................................Passed
flake8...................................................................Passed
codespell................................................................Passed
check-manifest...........................................................Failed

  • hook id: check-manifest
  • exit code: 1

lists of files in version control and sdist do not match!
missing from sdist:
.mrbob.ini
bobtemplate.cfg
suggested MANIFEST.in rules:
include .mrbob.ini
include bobtemplate.cfg

Check package with Pyroma................................................Passed
check-python-versions....................................................Passed
i18ndude.............................................(no files to check)Skipped


pre-commit for frontend..................................................Failed

  • hook id: sub-pre-commit
  • exit code: 1

Running pre-commit for frontend:

prettier.................................................................Passed
eslint...................................................................Passed
stylelint............................................(no files to check)Skipped
i18n.....................................................................Failed

  • hook id: i18n
  • exit code: 2

make[1]: Entering directory '/var/plone/myproject/frontend'

volto-myproject@1.0.0-alpha.0 i18n /var/plone/myproject/frontend/packages/volto-myproject
rm -rf build/messages && NODE_ENV=production i18n --addon

Extracting messages from source files...
Synchronizing messages to pot file...
Synchronizing messages to po files...
done!
diff --git a/frontend/packages/volto-myproject/src/index.js b/frontend/packages/volto-myproject/src/index.js
index 6318a60..9a023b4 100644
--- a/frontend/packages/volto-myproject/src/index.js
+++ b/frontend/packages/volto-myproject/src/index.js
@@ -8,4 +8,4 @@ const applyConfig = (config) => {
return config;
};

-export default applyConfig;
\ No newline at end of file
+export default applyConfig;
make[1]: *** [Makefile:66: ci-i18n] Error 1
make[1]: Leaving directory '/var/plone/myproject/frontend'


make: *** [Makefile:108: check] Error 1

Can anyone give me a hint of what is happening here?

check-manifest is a package that does exactly that.

You can either ignore the check, or...

  1. Follow its suggestions and run it again.
  2. Submit an issue in GitHub - plone/cookieplone: Create Plone projects, addons, documentation with ease!.
  3. If you're up to a challenge, submit a PR that fixes the issue. You would need to trace it down into one of its templates, specifically the backend, both because of pipx run --spec pre-commit==3.7.1 pre-commit run -a pre-commit for backend/..................................................Failed and MANIFEST.in is Python packaging thing. Source is at cookieplone-templates/backend_addon/{{ cookiecutter.__folder_name }}/MANIFEST.in at main · plone/cookieplone-templates · GitHub

There's also an error in the frontend template, when it attempts to run i18n. You can ignore that one as well, or...

  1. It fails on git diff -G'^[^\"POT]' --exit-code. After making the suggested changes to both frontend/packages/volto-project-title/src/index.js and backend/MANIFEST.in, run the following commands.
    git add .
    git commit -m "Initial commit"
    make check
    
  2. Submit an issue in GitHub - plone/cookieplone: Create Plone projects, addons, documentation with ease!.
  3. Submit a PR to fix the issue at cookieplone-templates/frontend_addon/{{ cookiecutter.__folder_name }}/packages/{{ cookiecutter.frontend_addon_name }}/src/index.js at main · plone/cookieplone-templates · GitHub.

Hi Steve,
Thank you for taking the time to respond.
I have been diving into Plone the last 3 weeks and it has been overwhelming. That was probably causing me to overlook the obvious clues that were given by the make check. I stopped thinking at the exit code statement.

I will try to debug this and post a PR to fix it.

Thanks again

/me trying Plone for my first 3 years:

1 Like

Isn't that also a big risk for the continuity of Plone? I can imagine that people in search of a CMS are attracted to Plone at first, but get scared away when they are confronted with the initial complexity / steep learning curve.

I almost got scared away several times during my 3 weeks of exploring and I see myself as pretty tech-savvy (though I am new to react).

Plone, in its recommended Volto/Plone combination, is great. I like the python/react combination alot. The default security functionality is also one of its top features.

Indeed, it is.

However, Plone is not a mere CMS. Plone includes things that attract me to it and that I haven't seen together in any other open source software system.

  • Volto's editor and developer experiences, especially with theming, is a pleasure
  • Flexible users, groups, and permissions
  • Content types, both default and custom via add-ons
  • Forms
  • Faceted search (if you don't want to have a custom search engine)
  • Workflows
  • Extensible through add-ons
  • Internationalization and localization
  • Accessibility standards

Back to that risk, I am not alone in my concern about this. However, let me say that when I first started using Python in 2011, I was looking for a replacement for a language that I knew was going to reach EOL in the near future. It was last updated in 2016. It's been dead for 8 years, and had only bug fixes for 5 years previous to that. Nonetheless, I still do a good chunk of $WORK in a dead language. The lesson here is that code does not stop working, and you can always slap a proxy server in front of it to keep TLS running.

So, I forked the repo, made the changes and created a PR for the backend MANIFEST.in issue.

For the frontend_addon, it is a bit trickier. The frontend addon index.js is changed after running pipx run cookieplone project.
The language settings are stored in it, which are variable.
So doing a diff during make check will always result in changes.

I am not that experienced with MAKE files to maybe address the issue within the MAKEFILE, but am willing to learn.

Made a bit of progress here. Backend issue is fixed.
Frontend issue is fixed when I modify

cookieplone-templates/frontend_addon/{{ cookiecutter.__folder_name }}/.pre-commit-config.yaml

and add an exclude for the index.js file in id i18n:

exclude: '^packages/.*/src/index.js'

After that, prettier is also complaining that the index.js does not meet standards.
When I do a make install and make sure the whitespace in index.js are all spaces and then run a make check, it all works.

Could it be that cookieplone is not formatting the index.js properly?

Ah, that's right.

I'm not sure whether make check barfing on the modification of the index.js file is a bug or incorrect assumption. I think the expectation should be to precede that command with the following.

git add .
git commit -m "Initial commit"
make check

If the latter, then we should update the Plone Deployment > Create a new Project step by moving Code Formatting and i18n after 5. Push to GitHub as a final thing. The usual workflow will be to:

  • Update your local repo (git pull)
  • Checkout a new branch
  • Edit files
  • make check for checks
  • Commit files
  • make check to make sure you committed all files
  • Push and create pull request

@davisagli @ericof can either of you provide some direction here?