Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you think I need to wrap this in a try block. I didn't because this is only called if lms.env.json has
ENABLE_APPSEMBLER_REPORTINGas not FalseThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johnbaldwin I'm not sure what you mean by
Can you rephrase or clarify? Why would it fail? Isn't the point to have this work when
ENABLE_APPSEMBLER_REPORTINGis true?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably include a
tryblock, for cases whereENABLE_APPSEMBLER_REPORTINGis accidentally left set true but the package is missing.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bryanlandia if the
appsembler_reportingis not installed then the import will fail, but to make this happen you'd have to set:AND not pip install
appsembler_reportingDoes that help explain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little bit belt and suspenders, but I'll add a try block and log an error message, so there is at least a clue that something is not right if the installer enables reporting but forgets to add the package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bryanlandia Before I add a logger to lms/envs/appsembler.py, how would you suggest logging errors that might happen in envs/appsembler.py. Thing is, I don't want this to silently fail since the only way this can fali now is if the site is misconfigured
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just think to do a basic
so it shows up in the main /edx/var/log/lms/edx.log
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I'm less inclined to wrap this import in a try block considering the options wen the site is misconfigured (meaning appsembler_reporting NOT installed and
ENABLE_APPSEMBLER_REPORTINGis true:Or am I missing something fundamental?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just thinking more about it... yes, you're right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, thanks! One thing I'm thinking about as we've talked over this is some easy way to get an "App health report" when we start or restart the LMS/CMS That eschews noise and just logs any failures