Skip to content

[22592] Fix windows example tests in Debug and mitigate rtps example flakiness #5744

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

Merged
merged 7 commits into from
Apr 7, 2025

Conversation

Mario-DL
Copy link
Member

@Mario-DL Mario-DL commented Apr 2, 2025

Description

This PR:

  • Makes the example tests in Windows Debug to properly execute by including the corresponding installation of debug runtime libraries in the docker image.
  • Repairs the rtps example by adding a mechanism to the writers to ensure that the first sample is acked by all the matched readers (which, in other words mean to ensure that the readers have already matched us) to prevent the next sample to piss it.

@Mergifyio backport 3.1.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • N/A Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • N/A Any new/modified methods have been properly documented using Doxygen.
  • N/A Any new configuration API has an equivalent XML API (with the corresponding XSD extension)
  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.
  • Changes are API compatible.
  • N/A New feature has been added to the versions.md file (if applicable).
  • N/A New feature has been documented/Current behavior is correctly described in the documentation.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

Mario-DL added 3 commits April 2, 2025 08:34
… first sample is acked by all the matched readers and to prevent the next sample to piss it

Signed-off-by: Mario Dominguez <[email protected]>
@Mario-DL Mario-DL added this to the v3.2.1 milestone Apr 2, 2025
@Mario-DL Mario-DL requested review from richiprosima and removed request for richiprosima April 2, 2025 09:25
@Mario-DL Mario-DL requested review from richiprosima and removed request for richiprosima April 2, 2025 09:35
@Mario-DL Mario-DL requested review from richiprosima and removed request for richiprosima April 2, 2025 09:37
…esting"

This reverts commit 7c4b08c.

Signed-off-by: Mario Dominguez <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
MiguelCompany
MiguelCompany previously approved these changes Apr 4, 2025
@MiguelCompany MiguelCompany requested review from richiprosima and removed request for richiprosima April 4, 2025 09:23
@github-actions github-actions bot added the ci-pending PR which CI is running label Apr 4, 2025
@cferreiragonz
Copy link
Contributor

cferreiragonz commented Apr 7, 2025

@Mario-DL xtypes_complete and xtypes_minimal tests also fail locally after changes. It seems that only 81 samples are being reported as received when 90 are expected. The xtype subscriber running along the xtype publisher is killed when the publisher finishes sending its samples. It does not have time to receive the helloworld publisher samples which is taking longer to send after the modification.

@Mario-DL
Copy link
Member Author

Mario-DL commented Apr 7, 2025

@cferreiragonz, yes, I could reproduce the failure in local.
After analysis, I found that the wait_for_acknowledgements() in the HW publisher was lasting for 3+ seconds (due to the heartbead period) and other services running publishers and a subscriber finish too early without the subscriber having received all samples making the test fail because only one sample will be received. Decreasing the hb period should be enough to tackle the situation

@Mario-DL Mario-DL requested review from richiprosima and removed request for richiprosima April 7, 2025 09:40
@cferreiragonz
Copy link
Contributor

@cferreiragonz, yes, I could reproduce the failure in local. After analysis, I found that the wait_for_acknowledgements() in the HW publisher was lasting for 3+ seconds (due to the heartbead period) and other services running publishers and a subscriber finish too early without the subscriber having received all samples making the test fail because only one sample will be received. Decreasing the hb period should be enough to tackle the situation

That managed to fix the failing tests in Ubuntu.

@rsanchez15 rsanchez15 merged commit a7f2258 into master Apr 7, 2025
16 of 17 checks passed
@rsanchez15 rsanchez15 deleted the fix/22592 branch April 7, 2025 14:48
@Mario-DL
Copy link
Member Author

Mario-DL commented Apr 8, 2025

@Mergifyio backport 3.1.x

Copy link
Contributor

mergify bot commented Apr 8, 2025

backport 3.1.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Apr 8, 2025
…iness (#5744)

* Refs #22592: Fix windows Debug example tests

Signed-off-by: Mario-DL <[email protected]>

* Refs #22592: Initialize samples_received_ in rtps example ReaderApp

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #22592: fix rtps example: Include a mechanism to ensure that the first sample is acked by all the matched readers and to prevent the next sample to piss it

Signed-off-by: Mario Dominguez <[email protected]>

* TODO: REMOVE THIS COMMIT. (Dis)Enable workflows for windows testing

Signed-off-by: Mario Dominguez <[email protected]>

* Revert "TODO: REMOVE THIS COMMIT. (Dis)Enable workflows for windows testing"

This reverts commit 7c4b08c.

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #22592: Apply Miguels rev

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #22592: Decrease HB period for hello_world publisher

Signed-off-by: Mario Dominguez <[email protected]>

---------

Signed-off-by: Mario-DL <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
(cherry picked from commit a7f2258)
Mario-DL added a commit that referenced this pull request May 13, 2025
…iness (#5744)

* Refs #22592: Fix windows Debug example tests

Signed-off-by: Mario-DL <[email protected]>

* Refs #22592: Initialize samples_received_ in rtps example ReaderApp

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #22592: fix rtps example: Include a mechanism to ensure that the first sample is acked by all the matched readers and to prevent the next sample to piss it

Signed-off-by: Mario Dominguez <[email protected]>

* TODO: REMOVE THIS COMMIT. (Dis)Enable workflows for windows testing

Signed-off-by: Mario Dominguez <[email protected]>

* Revert "TODO: REMOVE THIS COMMIT. (Dis)Enable workflows for windows testing"

This reverts commit 7c4b08c.

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #22592: Apply Miguels rev

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #22592: Decrease HB period for hello_world publisher

Signed-off-by: Mario Dominguez <[email protected]>

---------

Signed-off-by: Mario-DL <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
(cherry picked from commit a7f2258)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-pending PR which CI is running
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants