Azure: refactor report ready code#422
Conversation
This PR refactors Azure report ready code to include more robust tests and telemetry.
|
Do I need to add my name to the lp-to-git-user file? My launchpad profile is https://launchpad.net/~johnsonshi |
|
Thanks @OddBloke. I've added my username to |
OddBloke
left a comment
There was a problem hiding this comment.
Hi @johnsonshi, thanks for the submission, I'm strongly in favour of making our codebase more robust!
In that vein, this is quite a large pull request, and it looks to me like it probably could be split into multiple, smaller ones. This would make it easier to review, and more likely that I will notice issues during the review, therefore also serving to make our codebase more robust.
I'll leave it to you as the author to decide what the best way of breaking this up is, but if you would like a suggestion: it seems to me that the changes to add more report_diagnostic_event and logging calls to existing code could quite easily be separated from the more complex goal state-related changes; that would at least give us two smaller chunks to work through.
Let me know if you have any questions!
| LOG.warning(msg) | ||
| report_diagnostic_event(msg) |
There was a problem hiding this comment.
It looks like we're logging alongside ~every report_diagnostic_event call; I wonder if it might make more sense to change the signature of the function to report_diagnostic_event(msg, log_func) and then have, for example, this call look like the below?
| LOG.warning(msg) | |
| report_diagnostic_event(msg) | |
| report_diagnostic_event(msg, LOG.warning) |
There was a problem hiding this comment.
That's a very good suggestion @OddBloke! I'll implement that in the separate PR that will focus on increased logging/diagnostic reports.
There was a problem hiding this comment.
Thanks for the suggestion on how to split up the PR. I'll split it up so that 1 is goal state related and the other one is logging/telemetry related.
|
On Tue, Jun 09, 2020 at 02:06:04PM -0700, Johnson Shi wrote:
Thanks for the suggestion on how to split up the PR. I'll split it up
so that 1 is goal state related and the other one is logging/telemetry
related.
Nice, thanks!
|
|
I'm going to close this out, as it's going to be reworked substantially (and I keep clicking on it to figure out if anything has changed 😁). Feel free to reopen it, or submit new PRs once you're ready. Thanks! |
This PR refactors Azure report ready code to
include more robust tests and telemetry.