Skip to content

Conversation

@mxgrey
Copy link

@mxgrey mxgrey commented Nov 2, 2024

This PR addresses two points of feedback:

  • Make sure that logging is only configured once and only fini-ed when all contexts are gone [1]
  • Use ENTITY_LIFECYCLE_MUTEX to protect against race conditions [2]

While making this PR I uncovered a fault in one of the tests which didn't show up because of the flawed teardown of logging: The empty graph tests should now show that a /rosout node exists and that it has one topic.

I also took the liberty of cleaning up the tests to make sure that each test creates a node with a unique name, because otherwise we get spammed with warnings which might mislead someone into thinking that something is wrong with rclrs or its tests.

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Copy link
Owner

@geoff-imdex geoff-imdex left a comment

Choose a reason for hiding this comment

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

Nice work! Appreciate the fix for the graph test - not sure why this didn't fail for me originally, but we started seeing it in some additional work we've been doing.

@geoff-imdex
Copy link
Owner

As with unboxed_logging, merging this in with the build failing to make it easier to spin up a new branch/pr to address.

@geoff-imdex geoff-imdex merged commit 09f5664 into geoff-imdex:main Nov 4, 2024
0 of 3 checks passed
@mxgrey mxgrey deleted the logging_lifecycle branch November 5, 2024 15:10
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.

2 participants