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(backup): convert odoo regex extensions #424

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

yajo
Copy link
Contributor

@yajo yajo commented Nov 8, 2023

The backup image accepts a regexp on DBS_TO_INCLUDE. But Odoo uses a regexp with custom extensions (%h and %d).

If you use any of those extensions, the backup jobrunner will fail with CalledProcessError.

Additionally, regexps usually contain a $ symbol, which needs to be escaped for docker-compose.

BREAKING CHANGE: if your dbfilter contained $$ previously, to do that escaping yourself, you will have to convert it to a single $

@moduon MT-4191

@pedrobaeza
Copy link
Member

Puedes hacer rebase para ver si te sale ya CI en verde?

@pedrobaeza
Copy link
Member

Still with error. Maybe it's provoked by this PR.

@yajo
Copy link
Contributor Author

yajo commented Jul 17, 2024

Other builds pass green, and the one that fails says:

ERROR: for smtp  toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
Traceback (most recent call last):
  File "/usr/local/bin/build", line 26, in <module>
    subprocess.check_call(["docker-compose", "pull", *services_to_pull])
  File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker-compose', 'pull', 'db', 'smtp']' returned non-zero exit status 1.

So it seems like you'll have to add credentials to authenticate with docker hub and thus increase the free pull limits. Or just retry until it passes.

@josep-tecnativa
Copy link
Contributor

Please, rebase and let's see if the CI error gets fixed.

The backup image [accepts a regexp on `DBS_TO_INCLUDE`][1]. But [Odoo uses a regexp with custom extensions][2] (`%h` and `%d`).

If you use any of those extensions, the backup jobrunner will fail with `CalledProcessError`.

Additionally, regexps usually contain a `$` symbol, which [needs to be escaped for docker-compose][3].

[1]: https://github.com/Tecnativa/docker-duplicity#dbs_to_includeexclude
[2]: https://www.odoo.com/documentation/16.0/developer/reference/cli.html#cmdoption-odoo-bin-db-filter
[3]: https://docs.docker.com/compose/compose-file/compose-file-v2/#variable-substitution

BREAKING CHANGE: if your dbfilter contained `$$` previously, to do that escaping yourself, you will have to convert it to a single `$`

@moduon MT-4191
@josep-tecnativa
Copy link
Contributor

I think this is ready to merge @pedrobaeza

@pedrobaeza pedrobaeza merged commit acda9a8 into Tecnativa:main Oct 9, 2024
75 checks passed
@yajo yajo deleted the dbfilter-domain branch October 9, 2024 08:49
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.

4 participants