Skip to content

Conversation

@gfcapalbo
Copy link
Contributor

Before building we run an update_depth script.

This is made to keep depths in waft updated.
If build is on it's first run the check will not happen.

Deployed and testing on our internal nightly instance.

@gfcapalbo gfcapalbo force-pushed the master-depth-calculation branch 2 times, most recently from e07355d to 1202cec Compare September 8, 2023 15:51
@gfcapalbo gfcapalbo force-pushed the master-depth-calculation branch from 1202cec to a321bab Compare September 8, 2023 16:07
return int(mindepth)


def main():
Copy link
Member

Choose a reason for hiding this comment

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

@gfcapalbo somewhere along the way the merge depth script seems to be deleting the empty lines in our repos.yaml file, messing with human readability:

image

Copy link
Contributor Author

@gfcapalbo gfcapalbo Sep 25, 2023

Choose a reason for hiding this comment

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

@gjotten Done. now all top level lines have a space before, with the happy side effect of removing duplicate lines . looks like this:

odoo:
  defaults:
    depth: 108
  remotes:
    origin: https://github.com/OCA/OCB.git
    gfcapalbo: https://github.com/gfcapalbo/Odoo
  target: origin ${ODOO_VERSION}
  merges:
  - origin ${ODOO_VERSION}
  - gfcapalbo 14.0-backport-null-first-query-from-master
  - gfcapalbo 14.0-compute_notify_recipients-query-fix

therp/oe_bvtherp:
  defaults:
    depth: ${WAFT_DEPTH_MERGE}
  remotes:
    origin: git@gitlab.therp.nl:therp/oe_bvtherp.git
  merges:
  - origin ${ODOO_VERSION}
  - origin 14.0-#9929-portal_from_draft_to_discuss
  - origin 14.0-9964-use-web_widget_html_markdown

OCA/account-analytic:
  defaults:
    depth: ${WAFT_DEPTH_MERGE}
  remotes:
    origin: https://github.com/OCA/account-analytic
  merges:
  - origin ${ODOO_VERSION}

OCA/account-financial-reporting:
  defaults:
    depth: ${WAFT_DEPTH_MERGE}
  remotes:
    origin: https://github.com/OCA/account-financial-reporting
  merges:
  - origin ${ODOO_VERSION}

OCA/account-financial-tools:
  defaults:
    depth: 971
  remotes:
    origin: https://github.com/OCA/account-financial-tools
    ddejong: https://github.com/ddejong-therp/account-financial-tools
    gfcapalbo: https://github.com/gfcapalbo/account-financial-tools
  merges:
  - origin ${ODOO_VERSION}
  - ddejong ${ODOO_VERSION}-account_move_default_journal
  - gfcapalbo ${ODOO_VERSION}-error_management_chart_update

OCA/account-fiscal-rule:
  defaults:
    depth: ${WAFT_DEPTH_MERGE}
                                       

@gfcapalbo gfcapalbo force-pushed the master-depth-calculation branch from 2556b69 to 1066c75 Compare September 25, 2023 14:08
Hussam-Suleiman added a commit that referenced this pull request Sep 28, 2023
@gfcapalbo
Copy link
Contributor Author

@gjotten @Hussam-Suleiman requested changes done

@Hussam-Suleiman
Copy link
Member

for now, I will merge the changes to master, and in same time I am working to upgrade it to the new version https://github.com/sunflowerit/waftlib/blob/v.23.08.03/.python-files/waft-update-depths .

@Hussam-Suleiman Hussam-Suleiman merged commit ea3e3ab into master Sep 28, 2023
@Hussam-Suleiman Hussam-Suleiman deleted the master-depth-calculation branch September 28, 2023 15:49
Hussam-Suleiman added a commit that referenced this pull request Sep 28, 2023
@Hussam-Suleiman Hussam-Suleiman restored the master-depth-calculation branch September 28, 2023 16:16
@Hussam-Suleiman
Copy link
Member

@gfcapalbo it does not work for odoo 8 with python 2.7, did you test it with all odoo versions?
image

@Hussam-Suleiman
Copy link
Member

after I merged this changes and then removed it from master again, I can't open this pull request again, @gfcapalbo do you have any idea?

@Hussam-Suleiman
Copy link
Member

@gfcapalbo @gjotten @NL66278 sorry for destroyed this pull request, we will continue on #40

args = parser.parse_args()


all_commits = {}
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that this is never set?

@gfcapalbo
Copy link
Contributor Author

@Hussam-Suleiman replaced with MR: #41

I have added an exit , if python version is not >= 3.5.
Script will just add a line "Depth update not supported for python < 3.5".

it was easier to manage it this way instead of writing a lot of different code to support python 2.7 wich is deprecated.

@gfcapalbo
Copy link
Contributor Author

@Hussam-Suleiman re-tested. now script will exit when python is < 3.5 and the depth calculation will not be supported for older projects.... the error you had will not appear anymore.

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.

6 participants