Closed ap-wtioit closed 2 years ago
I intend to investigate this further and provide a fix. Currently i guess that we need to import flanker once during install (when we still have enough permissions for flanker to do its post install stuff).
Possibly related (could also be a flanker issue):
Flanker version installed:
docker run --rm tecnativa/doodba:15.0 pip freeze | grep flanker
shows flanker==0.9.11
Seems to match: https://github.com/mailgun/flanker/issues/208#issuecomment-579873411
Thanks for checking it. Yeah, I was aware of this yesterday, but didn't investigate further. It's ugly all the log, but the system is working at the end. @Yajo you introduced this library in #472. Any thought?
Yes, I saw these warnings and indeed are annoying. However I didn't have any more time to investigate. Odoo added it as a lazy dependency, but there are no docs whatsoever about how to configure it, or which version to install. 🙄
i tested the fix in #487 yesterday on our systems, and now the permission error is gone, and the other flanker warning only appear during build of doodba 15.0 base image not on every start of the container
There's no way to avoid such warnings at all?
I guess there would be running python3 -c 'from flanker.addresslib import address' >/dev/null
instead of python3 -c 'from flanker.addresslib import address'
. For me the [Errno 13] Permission denied
is the main reason for the fix.
2022-03-04 10:11:01,038 1 WARNING prod flanker.addresslib._parser.parser: Couldn't create 'flanker.addresslib._parser.addr_spec_parsetab'. [Errno 13] Permission denied: '/usr/local/lib/python3.8/site-packages/flanker/addresslib/_parser/addr_spec_parsetab.py'
It pops up a lot in our logs and i try to detect the more successful hacking attempts early. A lot of false positive Errno 13 are a bit annoying for that.
Yeah, I agree. I wonder if there's a runnable in the library for pre-creating such entries instead of being created on first import with the warning.
Well strictly speaking it's (the warnings) a flanker issue https://github.com/mailgun/flanker/issues/231 and should be fixed there, but as it did not get fixed within a few years, i think the workaround in doodba is justified. (The permission errors are a different flanker issue)
OK, seems weird that nobody attends such issue, but let's workaround it here silencing the warning output in the build as you have said.
Solved here: https://github.com/Tecnativa/doodba/pull/487
Describe the bug
When running
docker-compose -f devel.yaml run --rm odoo odoo -i mail --stop-after-init
during installation of mail addon it seems that on the first import of flanker it tries to create some stuff that is forbidden to be created at this time:To Reproduce
Affected versions:
Steps to reproduce the behavior:
Expected behavior
Flanker should work without permission errors in doodba