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] util/helpers: return on empty path #106

Closed
wants to merge 1 commit into from

Conversation

aj-fuentes
Copy link
Contributor

Avoid issues if the caller pass a None object.

@aj-fuentes aj-fuentes requested a review from KangOl July 5, 2024 15:11
@robodoo
Copy link
Contributor

robodoo commented Jul 5, 2024

Pull request status dashboard

Avoid issues if the caller pass a `None` object.
@aj-fuentes aj-fuentes force-pushed the master-fix_empty_path-afu branch from 2fcb773 to 1ad7d6b Compare July 5, 2024 15:27
@KangOl
Copy link
Contributor

KangOl commented Jul 5, 2024

upgradeci retry with always only hr

@KangOl
Copy link
Contributor

KangOl commented Jul 5, 2024

@robodoo r+ p=1

@robodoo
Copy link
Contributor

robodoo commented Jul 5, 2024

@KangOl unknown command 'p'.

For your own safety I've ignored everything in your entire comment.

Currently available commands:

command
help displays this help
r(eview)+ approves the PR, if it's a forwardport also approves all non-detached parents
r(eview)=<number> only approves the specified parents
fw=no does not forward-port this PR
fw=default forward-ports this PR normally
fw=skipci does not wait for a forward-port's statuses to succeed before creating the next one
up to <branch> only ports this PR forward to the specified branch (included)
merge integrate the PR with a simple merge commit, using the PR description as message
rebase-merge rebases the PR on top of the target branch the integrates with a merge commit, using the PR description as message
rebase-ff rebases the PR on top of the target branch, then fast-forwards
squash squashes the PR as a single commit on the target branch, using the PR description as message
delegate+ grants approval rights to the PR author
delegate=<...> grants approval rights on this PR to the specified github users
default stages the PR normally
priority tries to stage this PR first, then adds default PRs if the staging has room
alone stages this PR only with other PRs of the same priority
cancel=staging automatically cancels the current staging when this PR becomes ready
check fetches or refreshes PR metadata, resets mergebot state

Note: this help text is dynamic and will change with the state of the PR.

@KangOl
Copy link
Contributor

KangOl commented Jul 5, 2024

@robodoo r+ priority

@KangOl
Copy link
Contributor

KangOl commented Jul 5, 2024

@robodoo r+ priority cancel=staging

@robodoo
Copy link
Contributor

robodoo commented Jul 5, 2024

This PR is already reviewed, reviewing it again is useless.

robodoo pushed a commit that referenced this pull request Jul 5, 2024
Avoid issues if the caller pass a `None` object.

closes #106

Signed-off-by: Christophe Simonis (chs) <[email protected]>
@robodoo robodoo closed this in a05df66 Jul 5, 2024
@robodoo robodoo added the 17.4 label Jul 5, 2024
@desdelinux
Copy link

desdelinux commented Jul 5, 2024

@aj-fuentes @KangOl

These changes have apparently caused migration issues.

We had a production release that is now failing due to this, this needs to be resolved quickly please.

Ticket Odoo: https://www.odoo.com/es_ES/my/tasks/4033742

Traceback:

2024-07-05 21:29:21,347 25 ERROR db_1790778 odoo.sql_db: bad query:
SELECT id,
res_model,
STRING_TO_ARRAY(field_name, '/')
FROM base_import_mapping
WHERE field_name ~ '\ypassword_crypt\y'
ERROR: relation "base_import_mapping" does not exist
LINE 5: FROM base_import_mapping
^

2024-07-05 21:29:21,349 25 WARNING db_1790778 odoo.modules.loading: Transient module states were reset
2024-07-05 21:29:21,350 25 ERROR db_1790778 odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/home/odoo/src/odoo/12.0/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/odoo/src/odoo/12.0/odoo/modules/loading.py", line 362, in load_modules
report=report, models_to_check=models_to_check)
File "/home/odoo/src/odoo/12.0/odoo/modules/loading.py", line 177, in load_module_graph
migrations.migrate_module(package, 'pre')
File "/home/odoo/src/odoo/12.0/odoo/modules/migration.py", line 202, in migrate_module
migrate(self.cr, installed_version)
File "/home/odoo/src/odoo/12.0/odoo/addons/base/maintenance/migrations/base/0.0.0/pre-user-crypt-password.py", line 12, in migrate
util.remove_field(cr, "res.users", "password_crypt")
File "/home/odoo/src/odoo/12.0/odoo/addons/base/maintenance/migrations/util/fields.py", line 206, in remove_field
_remove_import_export_paths(cr, model, fieldname)
File "/home/odoo/src/odoo/12.0/odoo/addons/base/maintenance/migrations/util/records.py", line 506, in _remove_import_export_paths
cr.execute(query)
File "/home/odoo/src/odoo/12.0/odoo/sql_db.py", line 148, in wrapper
return f(self, *args, **kwargs)
File "/home/odoo/src/odoo/12.0/odoo/sql_db.py", line 225, in execute
res = self._obj.execute(query, params)
psycopg2.errors.UndefinedTable: relation "base_import_mapping" does not exist
LINE 5: FROM base_import_mapping

help me, please @pauloamed @andreabak

@augustoPerez
Copy link

Hello @desdelinux

I appologise for the inconvenience.

It seems like you found a workaround to avoid the traceback and your production upgrade in progress.

Could you confirm us if everything okay with this at the moment or if you need our intervention on the matter?
If at the moment there are more issues arising from this new changes, we will investigate it on Monday.

Have a nice day!

@aj-fuentes aj-fuentes deleted the master-fix_empty_path-afu branch July 9, 2024 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants