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

[FIX] CI: dot files and add xmlsec1 apt package #109

Merged
merged 2 commits into from
Apr 27, 2022

Conversation

ivantodorovich
Copy link
Contributor

@ivantodorovich ivantodorovich commented Apr 27, 2022

It seems xmlsec1 is an apt requirement for auth_saml module: https://github.com/OCA/server-auth/blob/667f2e597fe883d4335da589cf8148aa525100be/auth_saml/__manifest__.py#L15-L17

It is hosted on https://github.com/OCA/server-auth, but we're installing it here because it's a dependency of auth_saml_environment.

On server-auth, we have this: https://github.com/OCA/server-auth/blob/667f2e597fe883d4335da589cf8148aa525100be/.travis.yml#L15


NB: Testing to see if it fixes the issue

The apt package is required to install auth_saml, dependency
of auth_saml_environment.
.travis.yml Outdated
@@ -12,6 +12,7 @@ addons:
apt:
packages:
- expect-dev # provides unbuffer utility
- "xmlsec1"
Copy link
Contributor

Choose a reason for hiding this comment

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

could you get rid of travis here if you have time? 🙏 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we add apt dependencies on github actions? 👀

Copy link
Contributor

Choose a reason for hiding this comment

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

sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

allright, it's done!

@ivantodorovich
Copy link
Contributor Author

This PR seems to solve one issue, but there's another one in runboat

odoo.exceptions.ValidationError: No 'encryption_key_test' entry found in config file. Use a key similar to: b'lUMc38soCfqymcvsJdsXYAB_DQGZozQQYPYHOZ2PZik='

Seems related to server_environment_data_encryption module. Do you have any idea what could be wrong?
@florian-dacosta @sebastienbeau

Full traceback
2022-04-27 11:56:32,531 77 INFO b7b3579b4-0fcf-4ca0-8b98-4b272b74d91e odoo.modules.loading: loading payment_transfer/data/payment_acquirer_data.xml 
2022-04-27 11:56:32,541 77 WARNING b7b3579b4-0fcf-4ca0-8b98-4b272b74d91e odoo.modules.loading: Transient module states were reset 
2022-04-27 11:56:32,541 77 ERROR b7b3579b4-0fcf-4ca0-8b98-4b272b74d91e odoo.modules.registry: Failed to load registry 
2022-04-27 11:56:32,541 77 CRITICAL b7b3579b4-0fcf-4ca0-8b98-4b272b74d91e odoo.service.server: Failed to initialize database `b7b3579b4-0fcf-4ca0-8b98-4b272b74d91e`. 
Traceback (most recent call last):
  File "/opt/odoo/odoo/tools/convert.py", line 677, in _tag_root
    f(rec)
  File "/opt/odoo/odoo/tools/convert.py", line 580, in _tag_record
    record = model._load_records([data], self.mode == 'update')
  File "/opt/odoo/odoo/models.py", line 4220, in _load_records
    data['record']._load_records_write(data['values'])
  File "/opt/odoo/odoo/models.py", line 4149, in _load_records_write
    self.write(values)
  File "/opt/odoo/addons/payment_transfer/models/payment.py", line 68, in write
    return super(TransferPaymentAcquirer, self).write(values)
  File "/opt/odoo/addons/payment/models/payment_acquirer.py", line 335, in write
    result = super(PaymentAcquirer, self).write(vals)
  File "/mnt/data/odoo-addons-dir/server_environment/models/server_env_tech_name_mixin.py", line 66, in write
    return super().write(vals)
  File "/opt/odoo/odoo/models.py", line 3703, in write
    fields[0].determine_inverse(real_recs)
  File "/opt/odoo/odoo/fields.py", line 1187, in determine_inverse
    getattr(records, self.inverse)()
  File "/mnt/data/odoo-addons-dir/server_environment_data_encryption/models/server_env_mixin.py", line 50, in _inverse_server_env
    encrypted_data_name, values, env=env
  File "/mnt/data/odoo-addons-dir/data_encryption/models/encrypted_data.py", line 145, in _encrypted_store_json
    return self._encrypted_store(name, json.dumps(json_data), env=env)
  File "/mnt/data/odoo-addons-dir/data_encryption/models/encrypted_data.py", line 132, in _encrypted_store
    encrypted_data = self._encrypt_data(data, env)
  File "/mnt/data/odoo-addons-dir/data_encryption/models/encrypted_data.py", line 119, in _encrypt_data
    cipher = self._get_cipher(env)
  File "/mnt/data/odoo-addons-dir/data_encryption/models/encrypted_data.py", line 111, in _get_cipher
    % (key_name, Fernet.generate_key())
odoo.exceptions.ValidationError: No 'encryption_key_test' entry found in config file. Use a key similar to: b'lUMc38soCfqymcvsJdsXYAB_DQGZozQQYPYHOZ2PZik='

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo/odoo/service/server.py", line 1199, in preload_registries
    registry = Registry.new(dbname, update_module=update_module)
  File "/opt/odoo/odoo/modules/registry.py", line 89, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/opt/odoo/odoo/modules/loading.py", line 461, in load_modules
    loaded_modules, update_module, models_to_check)
  File "/opt/odoo/odoo/modules/loading.py", line 349, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/opt/odoo/odoo/modules/loading.py", line 222, in load_module_graph
    load_data(cr, idref, mode, kind='data', package=package)
  File "/opt/odoo/odoo/modules/loading.py", line 69, in load_data
    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
  File "/opt/odoo/odoo/tools/convert.py", line 733, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate)
  File "/opt/odoo/odoo/tools/convert.py", line 799, in convert_xml_import
    obj.parse(doc.getroot())
  File "/opt/odoo/odoo/tools/convert.py", line 719, in parse
    self._tag_root(de)
  File "/opt/odoo/odoo/tools/convert.py", line 677, in _tag_root
    f(rec)
  File "/opt/odoo/odoo/tools/convert.py", line 685, in _tag_root
    )) from e
odoo.tools.convert.ParseError: while parsing /opt/odoo/addons/payment_transfer/data/payment_acquirer_data.xml:5, near
<record id="payment.payment_acquirer_transfer" model="payment.acquirer">
            <field name="name">Wire Transfer</field>
            <field name="image_128" type="base64" file="payment_transfer/static/src/img/transfer_icon.png"/>
            <field name="provider">transfer</field>
            <field name="state">enabled</field>
            <field name="company_id" ref="base.main_company"/>
            <field name="view_template_id" ref="transfer_form"/>
            <field name="pending_msg">
              
              &lt;h3&gt;Please make a payment to: &lt;/h3&gt;
              &lt;ul&gt;
                &lt;li&gt;Bank:&amp;nbsp;&lt;/li&gt;
                &lt;li&gt;Account Number:&lt;/li&gt;
                &lt;li&gt;Account Holder: &lt;/li&gt;
              &lt;/ul&gt;
            </field>
        </record>

@ivantodorovich ivantodorovich changed the title [UPD] dot files and add xmlsec1 apt package [FIX] CI: dot files and add xmlsec1 apt package Apr 27, 2022
@simahawk simahawk merged commit 75db611 into OCA:14.0 Apr 27, 2022
@simahawk
Copy link
Contributor

created a specific issue for runboat

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

Successfully merging this pull request may close these issues.

None yet

2 participants