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

[21136] Bugfix: Revert XML Flow controller names to const char* #4911

Merged
merged 4 commits into from
Jun 8, 2024

Conversation

Mario-DL
Copy link
Member

@Mario-DL Mario-DL commented Jun 7, 2024

Description

PR #4893 introduced an ABI break changing the flow controller descriptor names to std::string. This PR reverts that change and handles the flow controller names in a collection within XMLParser. It also defines a clear() method intended to clean the collection upon XMLProfileManager destruction.

Note I introduced a mutex but I dont think it is needed 100% since the XMLParser configuration may be something sequential, but I introduced it anyways.

Important A cherry pick of this PR should be merged in the following backports

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • NO 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
  • Any new/modified methods have been properly documented using Doxygen.
  • 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.
  • NO New feature has been added to the versions.md file (if applicable).
  • New feature has been documented/Current behavior is correctly described in the documentation.
  • NO (see PR description) 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.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

@Mario-DL Mario-DL added this to the v2.14.2 milestone Jun 7, 2024
@JesusPoderoso JesusPoderoso self-requested a review June 7, 2024 07:30
@JesusPoderoso
Copy link
Contributor

@richiprosima please test this

@github-actions github-actions bot added the ci-pending PR which CI is running label Jun 7, 2024
@MiguelCompany MiguelCompany changed the title [21054] Bugfix: Revert XML Flow controller names to const char* [21136] Bugfix: Revert XML Flow controller names to const char* Jun 7, 2024
Copy link
Member

@MiguelCompany MiguelCompany left a comment

Choose a reason for hiding this comment

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

LGTM with green CI

@JesusPoderoso
Copy link
Contributor

@richiprosima please test this

@EduPonz EduPonz added ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. and removed ci-pending PR which CI is running labels Jun 8, 2024
@EduPonz EduPonz merged commit a1d4cd9 into 2.14.x Jun 8, 2024
13 of 16 checks passed
@EduPonz EduPonz deleted the bugfix/2.x/21054 branch June 8, 2024 05:47
@EduPonz
Copy link

EduPonz commented Jun 8, 2024

@Mario-DL please remember to cherry-pick this onto the other backports

Mario-DL added a commit that referenced this pull request Jun 10, 2024
* Refs #21054: Revert to const char* for flow controller names

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

* Refs #21054: Handle flow controller names in a XMLParser collection

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

* Refs #21054: Apply Miguel suggestion

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

* Refs #21054: Apply second suggestion

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

---------

Signed-off-by: Mario Dominguez <[email protected]>
Mario-DL added a commit that referenced this pull request Jun 10, 2024
* Refs #21054: Revert to const char* for flow controller names

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

* Refs #21054: Handle flow controller names in a XMLParser collection

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

* Refs #21054: Apply Miguel suggestion

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

* Refs #21054: Apply second suggestion

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

---------

Signed-off-by: Mario Dominguez <[email protected]>
Mario-DL added a commit that referenced this pull request Jun 10, 2024
* Refs #21054: Revert to const char* for flow controller names

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

* Refs #21054: Handle flow controller names in a XMLParser collection

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

* Refs #21054: Apply Miguel suggestion

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

* Refs #21054: Apply second suggestion

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

---------

Signed-off-by: Mario Dominguez <[email protected]>
@Mario-DL
Copy link
Member Author

Cherry picks added 👍🏻

JesusPoderoso pushed a commit that referenced this pull request Jun 10, 2024
* Refs #21054: Revert to const char* for flow controller names

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

* Refs #21054: Handle flow controller names in a XMLParser collection

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

* Refs #21054: Apply Miguel suggestion

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

* Refs #21054: Apply second suggestion

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

---------

Signed-off-by: Mario Dominguez <[email protected]>
EduPonz pushed a commit that referenced this pull request Jun 27, 2024
)

* Add XML configuration for FlowControllerDescriptor to 2.x (#4893)

* Refs #21136: Replace const char* with string

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

* Refs #21136: Update fastRTPS_profiles.xsd

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

* Refs #21136: Implement flow controller descriptor list in XML related source files

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

* Refs #21136: Update tests

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

* Refs #21136: versions.md

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

* Refs #21136: Linter

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

* Refs #21136: Apply rev

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

---------

Signed-off-by: Mario Dominguez <[email protected]>
(cherry picked from commit e6044e0)

# Conflicts:
#	include/fastdds/rtps/flowcontrol/FlowControllerDescriptor.hpp
#	resources/xsd/fastRTPS_profiles.xsd
#	test/unittest/dds/profiles/test_xml_profiles.xml
#	test/unittest/dds/profiles/test_xml_profiles_for_string.xml
#	test/unittest/xmlparser/XMLParserTests.cpp
#	test/unittest/xmlparser/XMLProfileParserTests.cpp
#	test/unittest/xmlparser/test_xml_profile.xml
#	test/unittest/xmlparser/test_xml_profile_env_var.xml
#	versions.md

* Bugfix: Revert XML Flow controller names to `const char*` (#4911)

* Refs #21054: Revert to const char* for flow controller names

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

* Refs #21054: Handle flow controller names in a XMLParser collection

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

* Refs #21054: Apply Miguel suggestion

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

* Refs #21054: Apply second suggestion

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

---------

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

* Refs #21244: Solve conflicts and remove threadsettings from flow_controller_descriptor

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

---------

Signed-off-by: Mario Dominguez <[email protected]>
Co-authored-by: Mario Domínguez López <[email protected]>
Co-authored-by: Mario Dominguez <[email protected]>
EduPonz pushed a commit that referenced this pull request Jul 11, 2024
)

* Add XML configuration for FlowControllerDescriptor to 2.x (#4893)

* Refs #21136: Replace const char* with string

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

* Refs #21136: Update fastRTPS_profiles.xsd

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

* Refs #21136: Implement flow controller descriptor list in XML related source files

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

* Refs #21136: Update tests

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

* Refs #21136: versions.md

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

* Refs #21136: Linter

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

* Refs #21136: Apply rev

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

---------

Signed-off-by: Mario Dominguez <[email protected]>
(cherry picked from commit e6044e0)

# Conflicts:
#	test/unittest/xmlparser/XMLProfileParserTests.cpp
#	versions.md

* Bugfix: Revert XML Flow controller names to `const char*` (#4911)

* Refs #21054: Revert to const char* for flow controller names

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

* Refs #21054: Handle flow controller names in a XMLParser collection

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

* Refs #21054: Apply Miguel suggestion

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

* Refs #21054: Apply second suggestion

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

---------

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

* Refs #21310: Fix building

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

---------

Signed-off-by: Mario Dominguez <[email protected]>
Co-authored-by: Mario Domínguez López <[email protected]>
Co-authored-by: Mario Dominguez <[email protected]>
MiguelCompany pushed a commit that referenced this pull request Sep 6, 2024
)

* Add XML configuration for FlowControllerDescriptor to 2.x (#4893)

* Refs #21136: Replace const char* with string

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

* Refs #21136: Update fastRTPS_profiles.xsd

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

* Refs #21136: Implement flow controller descriptor list in XML related source files

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

* Refs #21136: Update tests

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

* Refs #21136: versions.md

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

* Refs #21136: Linter

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

* Refs #21136: Apply rev

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

---------

Signed-off-by: Mario Dominguez <[email protected]>
(cherry picked from commit e6044e0)

* Bugfix: Revert XML Flow controller names to `const char*` (#4911)

* Refs #21054: Revert to const char* for flow controller names

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

* Refs #21054: Handle flow controller names in a XMLParser collection

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

* Refs #21054: Apply Miguel suggestion

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

* Refs #21054: Apply second suggestion

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

---------

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

* Refs #21244: Solve conflicts and remove threadsettings from flow_controller_descriptor

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

---------

Signed-off-by: Mario Dominguez <[email protected]>
Co-authored-by: Mario Domínguez López <[email protected]>
Co-authored-by: Mario Dominguez <[email protected]>
MiguelCompany pushed a commit that referenced this pull request Sep 6, 2024
* Refs #21054: Revert to const char* for flow controller names

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

* Refs #21054: Handle flow controller names in a XMLParser collection

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

* Refs #21054: Apply Miguel suggestion

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

* Refs #21054: Apply second suggestion

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

---------

Signed-off-by: Mario Dominguez <[email protected]>
MiguelCompany pushed a commit that referenced this pull request Sep 6, 2024
* Refs #21054: Revert to const char* for flow controller names

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

* Refs #21054: Handle flow controller names in a XMLParser collection

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

* Refs #21054: Apply Miguel suggestion

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

* Refs #21054: Apply second suggestion

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

---------

Signed-off-by: Mario Dominguez <[email protected]>
MiguelCompany added a commit that referenced this pull request Sep 11, 2024
)

* Add XML configuration for FlowControllerDescriptor to 2.x (#4893)

* Refs #21136: Replace const char* with string

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

* Refs #21136: Update fastRTPS_profiles.xsd

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

* Refs #21136: Implement flow controller descriptor list in XML related source files

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

* Refs #21136: Update tests

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

* Refs #21136: versions.md

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

* Refs #21136: Linter

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

* Refs #21136: Apply rev

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

---------

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

* Bugfix: Revert XML Flow controller names to `const char*` (#4911)

* Refs #21054: Revert to const char* for flow controller names

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

* Refs #21054: Handle flow controller names in a XMLParser collection

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

* Refs #21054: Apply Miguel suggestion

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

* Refs #21054: Apply second suggestion

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

---------

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

* Fix build after rebase.

Signed-off-by: Miguel Company <[email protected]>

* Fix XSD schema.

Signed-off-by: Miguel Company <[email protected]>

* Fix XML files.

Signed-off-by: Miguel Company <[email protected]>

* Fix unit tests

Signed-off-by: Miguel Company <[email protected]>

* Fix xsd.

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Mario Dominguez <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Co-authored-by: Mario Domínguez López <[email protected]>
Co-authored-by: Miguel Company <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants