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

Odoo 15.0 flanker installation seems incomplete #486

Closed
ap-wtioit opened this issue Mar 8, 2022 · 10 comments
Closed

Odoo 15.0 flanker installation seems incomplete #486

ap-wtioit opened this issue Mar 8, 2022 · 10 comments
Labels

Comments

@ap-wtioit
Copy link
Contributor

ap-wtioit commented Mar 8, 2022

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:

odoo_1                        | 2022-03-08 15:05:44,678 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'mailbox_or_url_list' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,678 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'delim' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,678 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'mailbox_or_url' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,678 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'url' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,682 1 WARNING devel flanker.addresslib._parser.parser: Couldn't create 'flanker.addresslib._parser.mailbox_parsetab'. [Errno 13] Permission denied: '/usr/local/lib/python3.8/site-packages/flanker/addresslib/_parser/mailbox_parsetab.py' 
odoo_1                        | 2022-03-08 15:05:44,684 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'mailbox_or_url_list' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,684 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'delim' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,684 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'mailbox_or_url' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,685 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'mailbox' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,685 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'url' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,685 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'angle_addr' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,685 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'name_addr' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,685 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'phrase' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,687 1 WARNING devel 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' 
odoo_1                        | 2022-03-08 15:05:44,689 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'mailbox_or_url_list' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,689 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'delim' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,689 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'mailbox_or_url' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,689 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'mailbox' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,689 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'addr_spec' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,689 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'angle_addr' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,690 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'name_addr' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,690 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'phrase' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,690 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'local_part' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,690 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'domain' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,690 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'quoted_string' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,690 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'domain_literal' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,690 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'quoted_string_text' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,690 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'domain_literal_text' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,691 1 WARNING devel flanker.addresslib._parser.parser: Couldn't create 'flanker.addresslib._parser.url_parsetab'. [Errno 13] Permission denied: '/usr/local/lib/python3.8/site-packages/flanker/addresslib/_parser/url_parsetab.py' 
odoo_1                        | 2022-03-08 15:05:44,694 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'mailbox_or_url_list' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,694 1 WARNING devel flanker.addresslib._parser.parser: Symbol 'delim' is unreachable 
odoo_1                        | 2022-03-08 15:05:44,698 1 WARNING devel flanker.addresslib._parser.parser: Couldn't create 'flanker.addresslib._parser.mailbox_or_url_parsetab'. [Errno 13] Permission denied: '/usr/local/lib/python3.8/site-packages/flanker/addresslib/_parser/mailbox_or_url_parsetab.py' 
odoo_1                        | 2022-03-08 15:05:44,706 1 WARNING devel flanker.addresslib._parser.parser: Couldn't create 'flanker.addresslib._parser.mailbox_or_url_list_parsetab'. [Errno 13] Permission denied: '/usr/local/lib/python3.8/site-packages/flanker/addresslib/_parser/mailbox_or_url_list_parsetab.py' 
odoo_1                        | 2022-03-08 15:05:44,921 1 INFO devel odoo.modules.registry: module mail: creating or updating database tables 

To Reproduce

Affected versions:

Steps to reproduce the behavior:

  1. Use doodba with version 15.0
  2. install base module

Expected behavior

Flanker should work without permission errors in doodba

@ap-wtioit ap-wtioit added the bug label Mar 8, 2022
@ap-wtioit
Copy link
Contributor Author

ap-wtioit commented Mar 8, 2022

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: mailgun/flanker#208 (comment)

@pedrobaeza
Copy link
Member

pedrobaeza commented Mar 8, 2022

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?

@yajo
Copy link
Contributor

yajo commented Mar 9, 2022

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. 🙄

@ap-wtioit
Copy link
Contributor Author

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

@pedrobaeza
Copy link
Member

There's no way to avoid such warnings at all?

@ap-wtioit
Copy link
Contributor Author

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.

@pedrobaeza
Copy link
Member

pedrobaeza commented Mar 9, 2022

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.

@ap-wtioit
Copy link
Contributor Author

ap-wtioit commented Mar 9, 2022

Well strictly speaking it's (the warnings) a flanker issue mailgun/flanker#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)

@pedrobaeza
Copy link
Member

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.

@carlosdauden
Copy link
Member

Solved here: #487

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants