-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
DiagnosticLogs: Add CHIP_ERROR Parameter to Reset and EndLogCollection Methods #36775
Conversation
PR #36775: Size comparison from 5d42d92 to 6e17037 Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
@vivien-apple Please review |
6e17037
to
5f8b982
Compare
PR #36775: Size comparison from 5d42d92 to 5f8b982 Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
5f8b982
to
9e7dc2d
Compare
PR #36775: Size comparison from 8606290 to 9e7dc2d Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
src/app/clusters/diagnostic-logs-server/DiagnosticLogsProviderDelegate.h
Outdated
Show resolved
Hide resolved
src/app/clusters/diagnostic-logs-server/DiagnosticLogsProviderDelegate.h
Outdated
Show resolved
Hide resolved
acb0ac5
to
5ca918e
Compare
PR #36775: Size comparison from 2c11741 to 5ca918e Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
src/app/clusters/diagnostic-logs-server/BDXDiagnosticLogsProvider.h
Outdated
Show resolved
Hide resolved
PR #36775: Size comparison from 2c11741 to 2697dd9 Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
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.
@pimpalemahesh even though it is explained in the linked issue, please update the summary of the issue to explain WHY these changes are being made and how it makes life better.
The reason for asking this is that these messages make their way in git log, and I would much rather understand the changes from the log than needing to also open an issue to follow up.
src/app/clusters/diagnostic-logs-server/DiagnosticLogsProviderDelegate.h
Outdated
Show resolved
Hide resolved
Note: the PR description does not end up in the git log. The commit messages from the actual commits do.... Those should be describing why the change is being made. And they are not. |
2697dd9
to
38bf32b
Compare
PR #36775: Size comparison from 9e203e2 to 38bf32b Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
src/app/clusters/diagnostic-logs-server/DiagnosticLogsProviderDelegate.h
Show resolved
Hide resolved
@@ -65,7 +65,7 @@ CHIP_ERROR LogProvider::GetLogForIntent(IntentEnum intent, MutableByteSpan & out | |||
err = CollectLog(sessionHandle, outBuffer, unusedOutIsEndOfLog); | |||
VerifyOrReturnError(CHIP_NO_ERROR == err, err, outBuffer.reduce_size(0)); | |||
|
|||
err = EndLogCollection(sessionHandle); | |||
err = EndLogCollection(sessionHandle, err); |
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 just to be clear: this always passes CHIP_NO_ERROR for the second arg, 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.
Yes. this is redundant I will remove it.
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.
Well, shouldn't we EndLogCollection even of CollectLog errored? Followup to look into that, since that logic is pre-existing.
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 realized that the err parameter is indeed necessary in this context. However, CHIP_NO_ERROR was not the appropriate value, so I have updated it to pass the correct error instead. Thank you for pointing this out.
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.
@pimpalemahesh If this line is reached, err
is CHIP_NO_ERROR. If it were not, we would have returned on line 66.
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.
@bzbarsky-apple Apologies for the misunderstanding and for initially missing the changes. I've reviewed the issue and raised a PR with the necessary updates: Pull Request Please Review.
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.
@pimpalemahesh Great, thanks! Please see my comment on that PR, though.
src/app/clusters/diagnostic-logs-server/BDXDiagnosticLogsProvider.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/diagnostic-logs-server/BDXDiagnosticLogsProvider.cpp
Outdated
Show resolved
Hide resolved
3a7a394
to
4be99da
Compare
PR #36775: Size comparison from c1afc02 to 4be99da Full report (54 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
…tion overload - Provides a default implementation for the EndLogCollection method with an additional error parameter. - This ensures backward compatibility, reduces the need for overriding in derived classes, and supports scenarios requiring context for log collection termination.
…tion - The one-argument EndLogCollection method is retained for backward compatibility. - The new two-argument overloaded EndLogCollection method will serve as the primary method to be implemented in delegates.
4be99da
to
433b19d
Compare
PR #36775: Size comparison from c1afc02 to 433b19d Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #36775: Size comparison from c1afc02 to 109b743 Increases above 0.2%:
Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
109b743
to
54d0916
Compare
PR #36775: Size comparison from af336ec to 54d0916 Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Fixes #36776
Change Overview: