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

Log step currently processed #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jojoob
Copy link

@jojoob jojoob commented Nov 11, 2022

Extend the workflow log with the sub-plugin name of the step currently being processed and the course ID.

Beyond that, there are probably additional ways to improve logging.

@NinaHerrmann
Copy link
Contributor

Hey @jojoob to be honest I think is is quiet a lot of logging - I could image logging number of courses processed by a step does that work for you?

@jojoob
Copy link
Author

jojoob commented Nov 30, 2022

A lot of logging, maybe. But not very useful, for me at least. (edit: I misread your comment) I had the problem that some courses could not be deleted due to an error caused by an activity. Without the additional logging of the course ID I was not able to find the problematic course.

Or have I missed something?

@NinaHerrmann
Copy link
Contributor

AH we had the same problem, which version of the plugin are you using?
approximately a year a ago, we merged a feature having a error page #136.
Does this help you? :)

@jojoob
Copy link
Author

jojoob commented Dec 16, 2022

We are using v3.11-r2 on Moodle 3.9. The error page did not show anything when we had this specific problem.

PS: Sorry for the late reply.

@NinaHerrmann
Copy link
Contributor

I am also sorry for the late reply! what kind of problem did you have? I think this is something which should be covered by it!

@jojoob
Copy link
Author

jojoob commented Feb 21, 2023

what kind of problem did you have?

The course deletion (even when done manually) resulted in an error caused by a 3rd party activity module. Most likely the plugin instance in that course throw an exception within its _delete_instance() function that was not handled and therefore interrupted the course deletion. This problem was not reported on the error page. From the tool_lifecycle perspective the initial error was somewhere inside delete_course()

I can't tell you exact details anymore since we uninstalled the problematic plugin from our production environment and it now has not enough priority to invest time to reproduce.

@jojoob
Copy link
Author

jojoob commented Feb 21, 2023

PS: Since the process_course() call is wrapped in try/catch the error that caused the abort must have been 'silent' in some way. ¯_(ツ)_/¯

@NinaHerrmann
Copy link
Contributor

PS: Since the process_course() call is wrapped in try/catch the error that caused the abort must have been 'silent' in some way. ¯_(ツ)_/¯

do you mean https://github.com/learnweb/moodle-tool_lifecycle/blob/master/classes/processor.php#L125 this is certainly not the case as this is exactly the call which inserts the course in the error table. Or did you mean another statement 🤔

@NinaHerrmann
Copy link
Contributor

Anyway I would prefer to find the reason for not inserting and fix that instead of logging the course, sorry for the inconvenience 😞

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.

None yet

2 participants