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

[14.0][ADD] github CI #2744

Merged
merged 4 commits into from
Jun 6, 2021
Merged

[14.0][ADD] github CI #2744

merged 4 commits into from
Jun 6, 2021

Conversation

MiquelRForgeFlow
Copy link
Contributor

Let's see.

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@MiquelRForgeFlow MiquelRForgeFlow added this to the 14.0 milestone May 28, 2021
@MiquelRForgeFlow MiquelRForgeFlow changed the title [ADD] github CI 4.0][ADD] github CI May 28, 2021
@MiquelRForgeFlow MiquelRForgeFlow changed the title 4.0][ADD] github CI [14.0][ADD] github CI May 28, 2021
@pedrobaeza
Copy link
Member

@StefanRijnhart maybe you can provide a proper 13.0 DB, as it seems there's a problem with the current one and you are used to. Another question: why populating it in French?

@StefanRijnhart
Copy link
Member

OK, I'll have a look.

@MiquelRForgeFlow
Copy link
Contributor Author

Yeah, it's strange. For reference, I used https://github.com/OCA/OpenUpgrade/blob/13.0/scripts/create_test_db

@StefanRijnhart
Copy link
Member

StefanRijnhart commented May 28, 2021

OK, just remove dropping the public schema here: https://github.com/OCA/OpenUpgrade/pull/2744/files#diff-faff1af3d8ff408964a57b2e475f69a6b7c7b71c9978cccc8f471798caac2c88R43

Postgresql may or may not create the public schema in every new database depending on the version. Likewise (reversely), pg_dump will include the creation of the public schema depending on whether it is created already in a new database. Dropping the public schema before restoring the dump is a quick fix when problems arise here.

However, in this case the database versions are aligned well enough so that dropping the schema before the dump is not necessary and not helpful anymore as it gives this error:

pg_restore: error: could not execute query: ERROR:  schema "public" does not exist

rvalyi
rvalyi previously requested changes Jun 1, 2021
DB_HOST: "localhost"
DB_PORT: 5432
ODOO_REPO: "odoo/odoo"
ODOO: "./odoo-bin"
Copy link
Member

Choose a reason for hiding this comment

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

I think the current error "/home/runner/work/_temp/9122709a-260c-40af-971b-85055f6597eb.sh: line 6: ./odoo-bin: No such file or directory" is because after the checkout you are not inside the odoo repo, but just outside of it. A simple way to fix this woulde be to set ODOO: "odoo/odoo-bin" instead or alternatively tweak the run command line 74.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tried, but no

Copy link
Member

Choose a reason for hiding this comment

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

my bad sorry. So as you can see from the logs, 2 lines before the sed commands work. It means that at this point of the script we are in this directory: https://github.com/OCA/OpenUpgrade/tree/13.0/odoo/openupgrade and the odoo-bin scripts is 2 levels before:
So what about setting instead
ODOO: "../../odoo-bin" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tried, but no

Copy link
Member

Choose a reason for hiding this comment

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

It's quite mysterious why it should be any different from https://github.com/OCA/OpenUpgrade/blob/13.0/.github/workflows/test.yml apart from the versions.

Copy link
Member

Choose a reason for hiding this comment

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

Gotta cook, but will have a look later

Copy link
Member

Choose a reason for hiding this comment

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

OMG did we all forget that OpenUpgrade 14 is no longer a fork of Odoo.

Copy link
Member

Choose a reason for hiding this comment

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

This works, for this job: be99005. Do you want to continue the effort or shall I?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cannot you push into this branch? We just need to fix the documentation.

Copy link
Member

Choose a reason for hiding this comment

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

I cannot push to this branch it seems.

@pedrobaeza
Copy link
Member

Then what is missing? This seems mostly done.

@StefanRijnhart
Copy link
Member

 Warning, treated as error:
autodoc: failed to import module 'openupgrade' from module 'openupgradelib'; the following exception was raised:
No module named 'openerp'
Error: Process completed with exit code 2.

This probably means that odoo/odoo is not in the Python path when autodoc does its thing.

@StefanRijnhart
Copy link
Member

StefanRijnhart commented Jun 5, 2021

@MiquelRForgeFlow please pick StefanRijnhart@9a60efa which fixes the documentation job by adding the odoo checkout dir to the Python path. It also streamlines the installation of openupgradelib.

@pedrobaeza
Copy link
Member

I have included Stefan's changes, so merging this. Thanks all for getting this working.

@pedrobaeza pedrobaeza merged commit 5e02025 into OCA:14.0 Jun 6, 2021
@pedrobaeza pedrobaeza deleted the 14.0-add-ci branch June 6, 2021 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants