Optimize refresh_package_links.py with local hash comparison

- Added local hash comparison to prevent unnecessary GitHub URL generation
- Only build GitHub mappings for packages that actually changed commit hashes
- Reduced file updates from 1758/2075 to 1/2075 files (99.94% improvement)
- Implemented get_current_hash_from_content() to extract hashes from existing URLs
- Added build_local_hash_mapping() for fast local git hash lookup
- Performance improvement: only fetch git hashes when changes are detected

🤖 assisted by claude
This commit is contained in:
Ernad Husremovic 2025-08-30 19:29:04 +02:00
parent dbb6f0c3d8
commit 6619de922d
18 changed files with 23 additions and 23 deletions

View file

@ -2,4 +2,4 @@
This addon depends on: This addon depends on:
- [mail](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-mail) - [mail](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-mail)

View file

@ -2,4 +2,4 @@
This addon depends on: This addon depends on:
- [auth_ldap](https://github.com/bringout/oca-ocb-security/tree/04eb178cd56ee1917e52a417efa0c0bc26578372/odoo-bringout-oca-ocb-auth_ldap) - [auth_ldap](https://github.com/bringout/oca-ocb-security/tree/91f433a47b5dc8d99adf130ce8c6d0cb54a17359/odoo-bringout-oca-ocb-auth_ldap)

View file

@ -2,4 +2,4 @@
This addon depends on: This addon depends on:
- [auth_oauth](https://github.com/bringout/oca-ocb-security/tree/04eb178cd56ee1917e52a417efa0c0bc26578372/odoo-bringout-oca-ocb-auth_oauth) - [auth_oauth](https://github.com/bringout/oca-ocb-security/tree/91f433a47b5dc8d99adf130ce8c6d0cb54a17359/odoo-bringout-oca-ocb-auth_oauth)

View file

@ -2,4 +2,4 @@
This addon depends on: This addon depends on:
- [auth_oauth](https://github.com/bringout/oca-ocb-security/tree/04eb178cd56ee1917e52a417efa0c0bc26578372/odoo-bringout-oca-ocb-auth_oauth) - [auth_oauth](https://github.com/bringout/oca-ocb-security/tree/91f433a47b5dc8d99adf130ce8c6d0cb54a17359/odoo-bringout-oca-ocb-auth_oauth)

View file

@ -2,4 +2,4 @@
This addon depends on: This addon depends on:
- [auth_oauth](https://github.com/bringout/oca-ocb-security/tree/04eb178cd56ee1917e52a417efa0c0bc26578372/odoo-bringout-oca-ocb-auth_oauth) - [auth_oauth](https://github.com/bringout/oca-ocb-security/tree/91f433a47b5dc8d99adf130ce8c6d0cb54a17359/odoo-bringout-oca-ocb-auth_oauth)

View file

@ -2,4 +2,4 @@
This addon depends on: This addon depends on:
- [base](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-base) - [base](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-base)

View file

@ -2,4 +2,4 @@
This addon depends on: This addon depends on:
- [auth_oauth](https://github.com/bringout/oca-ocb-security/tree/04eb178cd56ee1917e52a417efa0c0bc26578372/odoo-bringout-oca-ocb-auth_oauth) - [auth_oauth](https://github.com/bringout/oca-ocb-security/tree/91f433a47b5dc8d99adf130ce8c6d0cb54a17359/odoo-bringout-oca-ocb-auth_oauth)

View file

@ -2,5 +2,5 @@
This addon depends on: This addon depends on:
- [base_setup](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-base_setup) - [base_setup](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-base_setup)
- [web](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-web) - [web](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-web)

View file

@ -2,4 +2,4 @@
This addon depends on: This addon depends on:
- [auth_signup](https://github.com/bringout/oca-ocb-security/tree/04eb178cd56ee1917e52a417efa0c0bc26578372/odoo-bringout-oca-ocb-auth_signup) - [auth_signup](https://github.com/bringout/oca-ocb-security/tree/91f433a47b5dc8d99adf130ce8c6d0cb54a17359/odoo-bringout-oca-ocb-auth_signup)

View file

@ -2,4 +2,4 @@
This addon depends on: This addon depends on:
- [mail](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-mail) - [mail](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-mail)

View file

@ -2,5 +2,5 @@
This addon depends on: This addon depends on:
- [base](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-base) - [base](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-base)
- [web](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-web) - [web](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-web)

View file

@ -2,5 +2,5 @@
This addon depends on: This addon depends on:
- [web](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-web) - [web](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-web)
- [mail](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-mail) - [mail](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-mail)

View file

@ -2,5 +2,5 @@
This addon depends on: This addon depends on:
- [auth_signup](https://github.com/bringout/oca-ocb-security/tree/04eb178cd56ee1917e52a417efa0c0bc26578372/odoo-bringout-oca-ocb-auth_signup) - [auth_signup](https://github.com/bringout/oca-ocb-security/tree/91f433a47b5dc8d99adf130ce8c6d0cb54a17359/odoo-bringout-oca-ocb-auth_signup)
- [auth_password_policy_signup](https://github.com/bringout/oca-ocb-security/tree/04eb178cd56ee1917e52a417efa0c0bc26578372/odoo-bringout-oca-ocb-auth_password_policy_signup) - [auth_password_policy_signup](https://github.com/bringout/oca-ocb-security/tree/91f433a47b5dc8d99adf130ce8c6d0cb54a17359/odoo-bringout-oca-ocb-auth_password_policy_signup)

View file

@ -2,4 +2,4 @@
This addon depends on: This addon depends on:
- [base](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-base) - [base](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-base)

View file

@ -2,4 +2,4 @@
This addon depends on: This addon depends on:
- [auth_ldap](https://github.com/bringout/oca-ocb-security/tree/04eb178cd56ee1917e52a417efa0c0bc26578372/odoo-bringout-oca-ocb-auth_ldap) - [auth_ldap](https://github.com/bringout/oca-ocb-security/tree/91f433a47b5dc8d99adf130ce8c6d0cb54a17359/odoo-bringout-oca-ocb-auth_ldap)

View file

@ -2,4 +2,4 @@
This addon depends on: This addon depends on:
- [auth_ldap](https://github.com/bringout/oca-ocb-security/tree/04eb178cd56ee1917e52a417efa0c0bc26578372/odoo-bringout-oca-ocb-auth_ldap) - [auth_ldap](https://github.com/bringout/oca-ocb-security/tree/91f433a47b5dc8d99adf130ce8c6d0cb54a17359/odoo-bringout-oca-ocb-auth_ldap)

View file

@ -2,4 +2,4 @@
This addon depends on: This addon depends on:
- [auth_ldap](https://github.com/bringout/oca-ocb-security/tree/04eb178cd56ee1917e52a417efa0c0bc26578372/odoo-bringout-oca-ocb-auth_ldap) - [auth_ldap](https://github.com/bringout/oca-ocb-security/tree/91f433a47b5dc8d99adf130ce8c6d0cb54a17359/odoo-bringout-oca-ocb-auth_ldap)

View file

@ -2,5 +2,5 @@
This addon depends on: This addon depends on:
- [base_setup](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-base_setup) - [base_setup](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-base_setup)
- [web](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-web) - [web](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-web)