Skip to content

Conversation

@StefanRijnhart
Copy link

Tentative patch that I'm now running the migration with.

@StefanRijnhart StefanRijnhart requested a review from hbrunn May 22, 2021 06:39
try:
record._compute_func_string()
except KeyError: # unknown model or non-compliant arguments
error += 1
Copy link

Choose a reason for hiding this comment

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

please log the error so that I see what's going wrong here

Copy link
Author

@StefanRijnhart StefanRijnhart May 23, 2021

Choose a reason for hiding this comment

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

It's this one OCA#341 (comment) but I've pushed a logging commit. Restarting the migration now with this code.

Copy link
Author

Choose a reason for hiding this comment

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

I'm attaching the relevant logging to the ticket.

@StefanRijnhart
Copy link
Author

Applying the operation on all 200000 jobs takes about 6 minutes, so that is alright. I made a big hooha about operations on larger amounts of jobs, but removing the jobrunner trigger from the table solved that later on.

@StefanRijnhart StefanRijnhart force-pushed the 10.0-migrate-args_kwargs_sr branch from 9ec557e to 8ef593b Compare May 25, 2021 18:44
@StefanRijnhart
Copy link
Author

Replaced deprecated logger.warn by logger.warning

@StefanRijnhart
Copy link
Author

Can you please complete your review? Or are you not considering merging this at all?

Copy link

@hbrunn hbrunn left a comment

Choose a reason for hiding this comment

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

I thought this was meant just for debugging as you PRed on the private repo, but this will probably be useful for other people too.

I still don't really get it why we care for done jobs at all, but then I don't have much experience with things you might want to do with old jobs.

@StefanRijnhart
Copy link
Author

We care for done jobs because of code like https://github.com/VanMoof/odoo-addons/blob/12.0/vanmoof_magento/models/magento_sale_order.py#L27-L34.

I will be proposing to override this code again with a custom change that defers recomputing func_string here. So for general usefulness I would change this PR to remove the logging of the tracebacks on every KeyError, and if you want I can restore the filter on non-done jobs. Please let me know if that has your preference.

@hbrunn
Copy link

hbrunn commented Jun 4, 2021

ah, I see. No worries about non-done jobs, I've no claims here

@StefanRijnhart StefanRijnhart force-pushed the 10.0-migrate-args_kwargs_sr branch from 8ef593b to 89d5fc9 Compare June 4, 2021 15:32
@StefanRijnhart
Copy link
Author

Removed exc_info=True from the debug log, so whenever you are ready you can cherry-pick or rebase this to make it show up in your public OCA PR.

@hbrunn
Copy link

hbrunn commented Jun 8, 2021

thanks, as it's now a part of OCA#341 I'll close this

@hbrunn hbrunn closed this Jun 8, 2021
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.

3 participants