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

Aggregator: publish diagnostics_toplevel_state immediately on every degradation #324

Merged
merged 4 commits into from
Jun 27, 2024

Conversation

Timple
Copy link
Contributor

@Timple Timple commented Dec 21, 2023

Enhancement to: #317

Notes

  • This change is backward compatible with the state before 2023-12-05.
  • This state is not backward compatible with the changes since then.
    I chose this option as there has not been a release since then. And yet another backward compatible parameter seemed overdone.

@outrider-jhulas does this work for your situation as well?

@outrider-jhulas I could not get your test to work. colcon test always succeeds but launch_test diagnostic_aggregator/test/test_critical_pub.py always fails.

Rationale: we respond quickly to warnings as well as errors. So for consistency all degradation should be published quickly i.m.o.

@Timple
Copy link
Contributor Author

Timple commented Dec 21, 2023

I took the liberty of mimicking this implementation: #197, as that has proven itself in production for a few years now.
As a bonus, it re-uses the publishData function such that the actual diagnostics are available for analysis.

@Timple
Copy link
Contributor Author

Timple commented Jan 12, 2024

Happy new year everyone!

As this PR is not backwards compatible with changes as of 2023-12-05, I guess it might be preferred to get this in quickly?

@outrider-jhulas
Copy link
Contributor

Hi, Sorry for the slow answer, your MR looks good to me.

I couldn't really replicate the test issue

Copy link
Collaborator

@ct2034 ct2034 left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution

@Timple
Copy link
Contributor Author

Timple commented Jan 22, 2024

You're welcome!

Copy link
Collaborator

@ct2034 ct2034 left a comment

Choose a reason for hiding this comment

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

Sorry, I have to correct my previous review.

@@ -182,8 +165,17 @@ void Aggregator::diagCallback(const DiagnosticArray::SharedPtr diag_msg)
if (!analyzed) {
other_analyzer_->analyze(item);
}

// In case there is a degraded state, publish immediately
if (critical_ && item->getLevel() > last_top_level_state_) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This could lead to problems, because stale is larger than everything else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes? Would it be bad to publish immediately if items become stale?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ct2034 is this a problem if we publish immediately on stale?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, I guess you are right

@ct2034 ct2034 added enhancement This tackles a new feature of the code (and not a bug) ros2 PR tackling a ROS2 branch needs more work Someone has worked on this but more work is needed labels Jan 25, 2024
@Timple
Copy link
Contributor Author

Timple commented Mar 1, 2024

I've added the test, ready for a re-review

@Timple
Copy link
Contributor Author

Timple commented Mar 19, 2024

Subtle ping 🙂

@Timple
Copy link
Contributor Author

Timple commented Apr 8, 2024

Since this is technically a breaking change, I would like to have this in rolling before Jade is split off.

@ct2034 are you happy with the added test?

@Timple
Copy link
Contributor Author

Timple commented Apr 30, 2024

Aaaand we missed Jazzy 😿

Can we please get some traction on this now? Or have at least some comments on what needs to be changed?

@Timple
Copy link
Contributor Author

Timple commented May 28, 2024

Monthly ping?

@Timple Timple requested a review from ct2034 June 27, 2024 05:45
@@ -182,8 +165,17 @@ void Aggregator::diagCallback(const DiagnosticArray::SharedPtr diag_msg)
if (!analyzed) {
other_analyzer_->analyze(item);
}

// In case there is a degraded state, publish immediately
if (critical_ && item->getLevel() > last_top_level_state_) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

No, I guess you are right

@ct2034 ct2034 merged commit dbaec04 into ros:ros2 Jun 27, 2024
23 of 24 checks passed
ct2034 pushed a commit to ct2034/diagnostics that referenced this pull request Jun 27, 2024
…egradation (ros#324)

* Aggregator: publish diagnostics_toplevel_state immediately on every degradation
* Update docs
* Re-use the publishData function such that also the actual diagnostics are available
* Expand test with more degradation cases

(cherry picked from commit dbaec04)
ct2034 pushed a commit to ct2034/diagnostics that referenced this pull request Jun 27, 2024
…egradation (ros#324)

* Aggregator: publish diagnostics_toplevel_state immediately on every degradation
* Update docs
* Re-use the publishData function such that also the actual diagnostics are available
* Expand test with more degradation cases

(cherry picked from commit dbaec04)
ct2034 pushed a commit to ct2034/diagnostics that referenced this pull request Jun 27, 2024
…egradation (ros#324)

* Aggregator: publish diagnostics_toplevel_state immediately on every degradation
* Update docs
* Re-use the publishData function such that also the actual diagnostics are available
* Expand test with more degradation cases

(cherry picked from commit dbaec04)
@ct2034
Copy link
Collaborator

ct2034 commented Jun 27, 2024

💚 All backports created successfully

Status Branch Result
ros2-humble
ros2-iron
ros2-jazzy

Questions ?

Please refer to the Backport tool documentation

@Timple
Copy link
Contributor Author

Timple commented Jun 27, 2024

Great, thank you!

ct2034 added a commit that referenced this pull request Jun 27, 2024
…egradation (#324) (#355)

* Aggregator: publish diagnostics_toplevel_state immediately on every degradation
* Update docs
* Re-use the publishData function such that also the actual diagnostics are available
* Expand test with more degradation cases

(cherry picked from commit dbaec04)

Co-authored-by: Tim Clephas <[email protected]>
ct2034 added a commit that referenced this pull request Jun 27, 2024
…egradation (#324) (#356)

* Aggregator: publish diagnostics_toplevel_state immediately on every degradation
* Update docs
* Re-use the publishData function such that also the actual diagnostics are available
* Expand test with more degradation cases

(cherry picked from commit dbaec04)

Co-authored-by: Tim Clephas <[email protected]>
ct2034 added a commit that referenced this pull request Jun 27, 2024
…egradation (#324) (#357)

* Aggregator: publish diagnostics_toplevel_state immediately on every degradation
* Update docs
* Re-use the publishData function such that also the actual diagnostics are available
* Expand test with more degradation cases

(cherry picked from commit dbaec04)

Co-authored-by: Tim Clephas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This tackles a new feature of the code (and not a bug) needs more work Someone has worked on this but more work is needed ros2 PR tackling a ROS2 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants