Skip to content

[24451] Add Topic-Name Profile Lookup for Endpoint Creation#184

Open
ZakariaTalbi wants to merge 8 commits into
mainfrom
feature/topic-name-profile-lookup
Open

[24451] Add Topic-Name Profile Lookup for Endpoint Creation#184
ZakariaTalbi wants to merge 8 commits into
mainfrom
feature/topic-name-profile-lookup

Conversation

@ZakariaTalbi

@ZakariaTalbi ZakariaTalbi commented May 13, 2026

Copy link
Copy Markdown

Included support for topic-name profile lookup by adding create_datawriter_with_profile() as the default path in CommonWriter.cpp, with fallback to create_datawriter() when needed.

Added a new test, writer_topic_profile_lookup(), in ParticipantsCreationgTest.cpp to validate the feature, and registered it in CMakeLists.txt.

@codecov-commenter

codecov-commenter commented May 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 61.84211% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.57%. Comparing base (2d1ed3f) to head (503947b).

Files with missing lines Patch % Lines
ddspipe_yaml/src/cpp/YamlReader_participants.cpp 0.00% 9 Missing ⚠️
...e_participants/src/cpp/reader/dds/CommonReader.cpp 72.72% 1 Missing and 5 partials ⚠️
...e_participants/src/cpp/writer/dds/CommonWriter.cpp 81.81% 1 Missing and 3 partials ⚠️
...ants/src/cpp/participant/dds/CommonParticipant.cpp 57.14% 0 Missing and 3 partials ⚠️
...ticipants/src/cpp/writer/dds/QoSSpecificWriter.cpp 0.00% 3 Missing ⚠️
...participants/participant/dds/CommonParticipant.hpp 0.00% 2 Missing ⚠️
...pe_participants/src/cpp/writer/dds/MultiWriter.cpp 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #184      +/-   ##
==========================================
+ Coverage   36.09%   36.57%   +0.48%     
==========================================
  Files         174      159      -15     
  Lines       12329     7559    -4770     
  Branches     5634     3002    -2632     
==========================================
- Hits         4450     2765    -1685     
+ Misses       5023     3335    -1688     
+ Partials     2856     1459    -1397     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Zakaria Talbi Lalmi <zakariatalbi@eprosima.com>
@ZakariaTalbi ZakariaTalbi force-pushed the feature/topic-name-profile-lookup branch from ad3731a to 2d92e48 Compare May 14, 2026 12:52
@ZakariaTalbi ZakariaTalbi requested review from richiprosima and removed request for richiprosima May 14, 2026 12:52
Signed-off-by: Zakaria Talbi Lalmi <zakariatalbi@eprosima.com>
Signed-off-by: Zakaria Talbi Lalmi <zakariatalbi@eprosima.com>
@ZakariaTalbi ZakariaTalbi force-pushed the feature/topic-name-profile-lookup branch from 2d92e48 to 696de7d Compare May 19, 2026 07:33

@juanlofer-eprosima juanlofer-eprosima left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good job! 🥇 We mostly need to decide if XML > YAML or the other way around, we could even add a configuration option to the YAML so we can keep both possibilities and let the user decide.

It is pending to update the documentation of tools using DDS-Pipe.

Comment on lines +281 to +283
fastdds::dds::ReturnCode_t ret_xml_qos = dds_subscriber_->get_datareader_qos_from_profile(topic_name, qos);

if (ret_xml_qos != fastdds::dds::RETCODE_OK)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
fastdds::dds::ReturnCode_t ret_xml_qos = dds_subscriber_->get_datareader_qos_from_profile(topic_name, qos);
if (ret_xml_qos != fastdds::dds::RETCODE_OK)
if (fastdds::dds::RETCODE_OK != dds_subscriber_->get_datareader_qos_from_profile(topic_name, qos))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am now thinking maybe we should already return here if the profile is found. There might be scenarios in which a user wants to force a specific durability/reliability or history QoS, and if we override with the YAML configuration values, we would be forcing the user to configure through both XML and YAML. However, it would be beneficial to automatically add QoS such as expect_inline_qos for keyed topics.

{
fastdds::dds::DataWriterQos qos = dds_publisher_->get_default_datawriter_qos();
fastdds::dds::DataWriterQos qos;
fastdds::dds::ReturnCode_t ret_xml_qos = dds_publisher_->get_datawriter_qos_from_profile(topic_name, qos);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same suggestion as in reader.


if (ret_xml_qos != fastdds::dds::RETCODE_OK)
{
qos = dds_publisher_->get_default_datawriter_qos();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same comment as in the reader, in this case writer_data_lifecycle and deadline might need special treatment. Note that in this case overriding the deadline via YAML is not possible.

@juanlofer-eprosima juanlofer-eprosima changed the title Feature/topic name profile lookup [24451] Add Topic-Name Profile Lookup for Endpoint Creation May 22, 2026
Signed-off-by: Zakaria Talbi Lalmi <zakariatalbi@eprosima.com>
Signed-off-by: Zakaria Talbi Lalmi <zakariatalbi@eprosima.com>
Signed-off-by: Zakaria Talbi Lalmi <zakariatalbi@eprosima.com>
core::types::IgnoreParticipantFlags ignore_participant_flags {core::types::IgnoreParticipantFlags::no_filter};

// XML override
bool xml_override {false};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please move this to XMLParticipantConfiguration, then you can get its value through a CommonParticipant virtual method overriden in the XML one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And I suggest changing its name, maybe something like "endpoint_qos_extraction" or "endpoint_qos_derivation", and make it an enumeration so it's more flexible in case we need to add more modes (its values could be "XML_OVERRIDABLE", "XML_STANDALONE", for example, not feeling inspired).

bool xml_profile_found =
(fastdds::dds::RETCODE_OK == dds_subscriber_->get_datareader_qos_from_profile(topic_name, qos));

if (!xml_profile_found || xml_override_)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please change it so that the default behaviour is to enforce YAML/discovery configuration.

fastdds::dds::DataReaderQos
reckon_reader_qos_() const;
reckon_reader_qos_(
const std::string& topic_name) const;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
const std::string& topic_name) const;
const std::string& profile_name) const;

Signed-off-by: Zakaria Talbi Lalmi <zakariatalbi@eprosima.com>
Signed-off-by: Zakaria Talbi Lalmi <zakariatalbi@eprosima.com>
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.

3 participants