Commit Graph

315 Commits

Author SHA1 Message Date
Rémy Taymans
cd80fe1a72 [VER] Bump to version 0.7.0 2024-05-02 22:17:21 +02:00
Rémy Taymans
62f77499fb Merge branch 'allow-to-upgrade-multiple-databases-in-parallel' into 'main'
allow to upgrade multiple databases in parallel

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!69
2024-05-02 20:14:48 +00:00
hugues de keyzer
af1b6efce6 remove specific container instead of pruning 2024-04-30 15:11:20 +02:00
hugues de keyzer
f6f9c0ad80 add news fragments 2024-04-30 15:10:43 +02:00
hugues de keyzer
560f4f5485 publish docker ports only when needed 2024-04-30 15:10:43 +02:00
LE GAL SYLVAIN
4facd60e30 Merge branch 'lighter-ci-images' into 'main'
Change for lighter ci images

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!72
2024-04-12 12:10:16 +00:00
Rémy Taymans
d286f868ef Change for lighter ci images
Default python images are based on debian and are heavy (~1Go).

Using alpine version for smaller images (~100Mo).

This will save space on the runner and allow more container to be run at
same time.
2024-04-12 12:50:09 +02:00
Rémy Taymans
0a0c763a49 Merge branch 'allow-minus-in-database-names' into 'main'
allow hyphen-minus character in database names

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!70
2024-04-12 10:32:13 +00:00
LE GAL SYLVAIN
4804926c1e Merge branch 'add-config-file-cli-option-newsfragment' into 'main'
add news fragment for new cli options

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!71
2024-04-12 10:09:26 +00:00
hugues de keyzer
58efc7db37 add news fragment for new cli options 2024-04-12 11:48:53 +02:00
hugues de keyzer
bb2b3be3b4 allow hyphen-minus character in database names 2024-04-12 11:35:22 +02:00
LE GAL SYLVAIN
de0ea69f59 Merge branch 'add-config-file-cli-option' into 'main'
add config file and modules file cli options

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!68
2024-04-12 08:30:45 +00:00
hugues de keyzer
58bc87380d add database name to container name 2024-04-10 17:15:21 +02:00
hugues de keyzer
148aa5f89f add config file and modules file cli options
allow to provide a config file and a modules file option to use
different files than the default ones. this is useful when using the
same environment for different databases.
2024-04-10 15:32:29 +02:00
LE GAL SYLVAIN
93dc52ee5f Merge branch 'fix-dependencies' into 'main'
[FIX] dependencies between docker and requests

Closes #35

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!67
2024-03-25 17:55:22 +00:00
Rémy Taymans
2ae157988b [FIX] dependencies between docker and requests 2024-03-25 16:23:38 +01:00
Rémy Taymans
bd1190ab06 Merge branch 'cosmetic-changes' into 'main'
[REF] Cosmetic changes (remove useless comment + f-string everywhere)

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!61
2024-03-23 22:04:48 +00:00
Rémy Taymans
f1cf0dac23 Apply all suggestion made by Rémy Taymans. 2024-03-23 21:59:12 +01:00
Sylvain LE GAL
a73de5f240 [REF] apply f-string to improve readability 2024-03-23 20:53:57 +01:00
Sylvain LE GAL
7b5f922c61 [REF] remove useless commented code 2024-03-23 20:51:18 +01:00
Rémy Taymans
f04da743bb Merge branch 'ref-set-log-level-debug-default-in-cli_runner_invoke' into 'main'
[REF] factorize code : allways set --log-level=DEBUG in test framework

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!63
2024-03-23 16:09:32 +00:00
Rémy Taymans
6a2acce0ab Merge branch 'psql-refactor-code' into 'main'
[REF] Psql refactor code

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!65
2024-03-23 16:00:40 +00:00
Sylvain LE GAL
853f37889c [FIX] 'CREATE DATABASE' is a command, not a request that requires result 2024-03-23 10:23:54 +01:00
Sylvain LE GAL
4a874957ed [REF] move postgres code into dedicated tools file 2024-03-23 10:16:32 +01:00
Sylvain LE GAL
e124f3d27f [REF] factorize code : allways set --log-level=DEBUG in test framework 2024-03-22 23:49:52 +01:00
Rémy Taymans
e5b0ebe6e8 Merge branch 'main-add-postgresql-version-in-container-name' into 'main'
[IMP] oow init : new option --postgresql-version

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!62
2024-03-22 21:49:56 +00:00
Sylvain LE GAL
a11d137eed [IMP] oow init : new option --postgresql-version 2024-03-22 20:30:43 +01:00
LE GAL SYLVAIN
908a38ab81 Merge branch 'fix-36' into 'main'
[UPD] drop python < 3.9 support and update dependencies

Closes #35 et #36

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!60
2024-03-22 08:59:06 +00:00
Rémy Taymans
2fa52d4602 [UPD] drop python < 3.9 support
This also fixes dependencies issues.
2024-03-22 00:51:40 +01:00
Rémy Taymans
b54c865256 Merge branch 'add-towncrier' into 'main'
Add Towncrier and bump to version 0.6.0

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!59
2024-03-20 16:27:17 +00:00
Rémy Taymans
c960cf4f70 Bump to version 0.6.0 2024-03-20 15:14:04 +01:00
Rémy Taymans
4796e769f7 [ADD] news fragments for previous changes 2024-03-20 12:33:36 +01:00
Rémy Taymans
abefad1607 [ADD] towncrier support for building changlog 2024-03-20 12:33:36 +01:00
Sylvain LE GAL
c345d831bc [IMP] add new assert_database test function and harmonize tests for restoredb, copydb, dropdb 2024-03-20 12:15:59 +01:00
Sylvain LE GAL
8016b35624 [ADD] restoredb function 2024-03-20 12:15:59 +01:00
Rémy Taymans
567ffd4428 Merge branch 'ADD-restoredb' into 'main'
[ADD] restoredb function

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!40
2024-03-03 08:25:39 +00:00
Sylvain LE GAL
b7e3587767 [IMP] add new assert_database test function and harmonize tests for restoredb, copydb, dropdb 2024-03-02 23:59:36 +01:00
Sylvain LE GAL
748d5a54f6 [ADD] restoredb function 2024-03-02 23:59:36 +01:00
Rémy Taymans
e5a3861cde Merge branch 'ADD-option-execution-demo-etc' into 'main'
[IMP] New options in various cli commands. (with-demo, etc...)

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!57
2024-03-01 19:03:15 +00:00
Sylvain LE GAL
dbdf592990 [IMP] 'run' cli command. Add '--update-modules' option 2024-03-01 15:51:09 +01:00
Sylvain LE GAL
d890a460ea [IMP] Harmonize run and upgrade cli command. Allow to call command with argument --with-demo / --without-demo like in install-from-csv.
For that purpose, create a new decorator.
[REF] Change the default of install-from-csv to harmonize. (allways False)
2024-03-01 15:51:09 +01:00
Rémy Taymans
02c6fa48cf Merge branch 'FIX-prevent-error-empty-addon-path' into 'main'
[FIX] Do not crash silently, when a repos.yml file reference an empty addons folder.

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!56
2024-03-01 14:12:35 +00:00
Sylvain LE GAL
f75821c2bc [FIX] Do not crash silently, when a repos.yml file reference an empty addons folder.
Step to reproduce :
- run a V15 instance
- add a reference to 'OCA/geospatial' repo that doesn't contain any odoo module.
As a result, Odoo will exit with the following error:
    odoo-bin: error: option --addons-path: the path '/odoo_env/src/OCA/geospatial' is not a valid addons directory

To avoid such problem, and avoid to have to remove empty repository
(that could become non empty in the future, and contains some migrations scripts),
- we reimplement a version of the odoo function _is_addons_path (odoo/odoo/tools/config.py)
- we add an info log :
    Skipping addons path '.../src/env_15.0/src/OCA/geospatial'  because it doesn't contain any odoo module.
2024-03-01 13:47:26 +01:00
Rémy Taymans
52568cedc5 Merge branch '42-add-dropdb' into 'main'
[ADD] dropdb

Closes #42

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!55
2024-02-22 08:09:48 +00:00
Rémy Taymans
30198392c5 [ADD] dropdb 2024-02-22 08:53:45 +01:00
Rémy Taymans
e5921fe4c7 Merge branch 'update_ci' into 'main'
New CI to auto build and publish

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!51
2024-02-21 18:49:41 +00:00
Rémy Taymans
72a5dcf434 New CI to auto build and publish
Using a commit message to trigger the build does not work when merging a
PR because last commit is the merge commit and not the commit edited
with the right name.

Given that, the jobs that will run, are defined at the creation of the
pipeline, publishing and creating a release cannot be done based on the
sate of the code.

A way to trigger publication and release is the git tags.

So with theses changes:

- linting is done only on a merge request
- testing and building are performed on a merge request and on the main
  branch

When a tag is pushed:

- check are done to ensure that the tag is the same as the version of
  the program, in order to not publish and release someting that is not
  coherent.
- the program is published on pypi.
- a release is created, but only if the tag is for a major, minor or
  patch version. No release created for an alpha, beta or pre-release
  version.

So all versions of the program are published on PyPI, but only the
important ones are published via the release mechanism. Because the
release mechanism will warn user for a new version. Version that are not
major, minor or patch are not intended to be used by end users.

The idea of auto publishing and releasing every time a commit is pushed
on the main branch does not work with semantic versioning. For doing
that maybe a calversioning will be better.

The idea of using the CI to push a tag for a new release lead to
security risk. Because the CI will contains credential for writing to
the repository, any contributor can read this token by editing the
gitlab-ci file and use token for bad purposes. Gitlab does not provide
token for writing to a repository owned by the project.

So for now, we control the publication and release of a new version with
two actions:

- updating the version on the pyproject.toml file.
- creating a tag with the same version as in the pyproject.toml file.
2024-02-21 11:50:27 +01:00
LE GAL SYLVAIN
dea0bbd70c Merge branch 'fix-estimate-workload' into 'main'
[FIX] estimate-workload: wrong warning message

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!53
2024-02-08 09:51:34 +00:00
LE GAL SYLVAIN
717f396dc6 Merge branch 'fix-install-from-csv-demo' into 'main'
[FIX] install-from-csv: add with-demo option

Closes #41

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!54
2024-02-08 09:45:39 +00:00
Rémy Taymans
25655d4b7a [FIX] install-from-csv: add with-demo option
Add a flag to specify if the database created by install-from-csv should
install demo data or not.

Fix #41
2024-02-07 17:25:56 +01:00