Skip to content

[23624] Allow empty partition list to match against "*"#5989

Merged
MiguelCompany merged 5 commits intomasterfrom
bugfix/23623
Sep 3, 2025
Merged

[23624] Allow empty partition list to match against "*"#5989
MiguelCompany merged 5 commits intomasterfrom
bugfix/23623

Conversation

@MiguelCompany
Copy link
Member

@MiguelCompany MiguelCompany commented Sep 1, 2025

Description

A partition with value "*" should match with a partition with value "".
An empty partition list should be treated as a list with a single partition with value "".
This should also match with a partition with value "*".

This PR refactors the matching of partitions to always use the StringMatching class, and makes the behavior of that class with respect to empty strings consistent between platforms.

@Mergifyio backport 3.3.x 3.2.x 2.14.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • 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.
  • N/A 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.

@MiguelCompany MiguelCompany requested review from richiprosima and removed request for richiprosima September 1, 2025 10:53
@github-actions github-actions bot added the ci-pending PR which CI is running label Sep 1, 2025
@MiguelCompany MiguelCompany changed the title [23623] Allow empty partition list to match against "*" [23624] Allow empty partition list to match against "*" Sep 1, 2025
@mergify
Copy link
Contributor

mergify bot commented Sep 1, 2025

🧪 CI Insights

Here's what we observed from your CI run for 82f47b6.

❌ Failed Jobs

Pipeline Job Health on master Retries 🔍 CI Insights 📄 Logs
Fast DDS MacOS CI mac-ci / reusable-mac-ci (RelWithDebInfo) Unknown 0 View View

@MiguelCompany MiguelCompany added this to the v3.4.0 milestone Sep 2, 2025
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
@MiguelCompany MiguelCompany requested review from richiprosima and removed request for richiprosima September 2, 2025 09:46
@MiguelCompany MiguelCompany marked this pull request as ready for review September 2, 2025 10:10
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
@MiguelCompany MiguelCompany merged commit 27ce90d into master Sep 3, 2025
35 of 39 checks passed
@MiguelCompany MiguelCompany deleted the bugfix/23623 branch September 3, 2025 12:12
@MiguelCompany
Copy link
Member Author

@Mergifyio backport 3.3.x 3.2.x 2.14.x

@mergify
Copy link
Contributor

mergify bot commented Sep 3, 2025

backport 3.3.x 3.2.x 2.14.x

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Sep 3, 2025
* Refs #23623. Always use StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Refactor StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Regression unit test..

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Fix StringMatching on Windows.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23624. Avoid unnecessary conditionals.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 27ce90d)

# Conflicts:
#	src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp
#	src/cpp/utils/StringMatching.cpp
mergify bot pushed a commit that referenced this pull request Sep 3, 2025
* Refs #23623. Always use StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Refactor StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Regression unit test..

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Fix StringMatching on Windows.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23624. Avoid unnecessary conditionals.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 27ce90d)
mergify bot pushed a commit that referenced this pull request Sep 3, 2025
* Refs #23623. Always use StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Refactor StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Regression unit test..

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Fix StringMatching on Windows.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23624. Avoid unnecessary conditionals.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 27ce90d)
MiguelCompany added a commit that referenced this pull request Sep 4, 2025
* Refs #23623. Always use StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Refactor StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Regression unit test..

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Fix StringMatching on Windows.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23624. Avoid unnecessary conditionals.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany added a commit that referenced this pull request Oct 1, 2025
* Refs #23623. Always use StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Refactor StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Regression unit test..

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Fix StringMatching on Windows.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23624. Avoid unnecessary conditionals.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 27ce90d)
MiguelCompany added a commit that referenced this pull request Oct 2, 2025
* Refs #23623. Always use StringMatching.



* Refs #23623. Refactor StringMatching.



* Refs #23623. Regression unit test..



* Refs #23623. Fix StringMatching on Windows.



* Refs #23624. Avoid unnecessary conditionals.



---------


(cherry picked from commit 27ce90d)

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
emiliocuestaf pushed a commit that referenced this pull request Oct 23, 2025
* Refs #23623. Always use StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Refactor StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Regression unit test..

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Fix StringMatching on Windows.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23624. Avoid unnecessary conditionals.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 27ce90d)

# Conflicts:
#	src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp
#	src/cpp/utils/StringMatching.cpp
MiguelCompany added a commit that referenced this pull request Oct 27, 2025
* Allow empty partition list to match against `"*"` (#5989)

* Refs #23623. Always use StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Refactor StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Regression unit test..

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Fix StringMatching on Windows.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23624. Avoid unnecessary conditionals.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 27ce90d)

# Conflicts:
#	src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp
#	src/cpp/utils/StringMatching.cpp

* Fix backport issues

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Update src/cpp/utils/StringMatching.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Emilio Cuesta Fernandez <emiliocuesta@eprosima.com>

---------

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
Signed-off-by: Emilio Cuesta Fernandez <emiliocuesta@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: Emilio Cuesta <emiliocuesta@eprosima.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
cferreiragonz pushed a commit that referenced this pull request Nov 5, 2025
* Refs #23623. Always use StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Refactor StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Regression unit test..

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Fix StringMatching on Windows.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23624. Avoid unnecessary conditionals.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 27ce90d)
cferreiragonz pushed a commit that referenced this pull request Nov 6, 2025
* Refs #23623. Always use StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Refactor StringMatching.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Regression unit test..

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23623. Fix StringMatching on Windows.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #23624. Avoid unnecessary conditionals.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 27ce90d)
MiguelCompany added a commit that referenced this pull request Nov 12, 2025
* Refs #23623. Always use StringMatching.



* Refs #23623. Refactor StringMatching.



* Refs #23623. Regression unit test..



* Refs #23623. Fix StringMatching on Windows.



* Refs #23624. Avoid unnecessary conditionals.



---------


(cherry picked from commit 27ce90d)

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
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.

2 participants