Repository navigation
Conversation
Signed-off-by: Barry Xu <barry.xu@sony.com>
There was a problem hiding this comment.
Pull request overview
This PR adds base64 encoding and decoding functionality to rcutils, which is needed for handling binary data in YAML configuration files (as referenced in ros2/rcl#1256).
Changes:
- Adds two new public functions:
decode_base64andencode_base64for converting between binary data and base64-encoded strings - Includes comprehensive test coverage with valid/invalid input cases, edge cases, and round-trip testing
- Updates CMakeLists.txt to include the new source file and test
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| include/rcutils/base64.h | Defines the public API for base64 encoding/decoding functions with documentation |
| src/base64.c | Implements the base64 encoding and decoding algorithms with error handling |
| test/test_base64.cpp | Provides comprehensive test coverage including valid inputs, error cases, and round-trip tests |
| CMakeLists.txt | Adds base64.c to the build and registers the test suite |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
|
Pulls: #533 |
|
The failure of Linux/Linux-rhel was due to an internal CI issue and needs to be re-executed. I will fix it. |
Signed-off-by: Barry Xu <barry.xu@sony.com>
|
Due to code changes, I re-run all the tests. |
|
https://github.com/Mergifyio backport kilted jazzy humble |
✅ Backports have been createdDetails
Cherry-pick of f322436 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Signed-off-by: Barry Xu <barry.xu@sony.com> Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> (cherry picked from commit f322436)
Signed-off-by: Barry Xu <barry.xu@sony.com> Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> (cherry picked from commit f322436)
Signed-off-by: Barry Xu <barry.xu@sony.com> Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> (cherry picked from commit f322436) # Conflicts: # CMakeLists.txt
fujitatomoya
left a comment
There was a problem hiding this comment.
@ahcorde i was doing review this, but one step behind... lgtm.
|
@Barry-Xu-2018 @ahcorde do we need to backport this function to downstream? i do not think downstream does not need this function. if that is not going to be used, maybe we do not need to backport this? i think the question is that are we going to backport tag support to the downstream? |
|
Feel free to close them, I thought we should backport this. |
|
@Barry-Xu-2018 what do you think? |
|
Yes. I don't think it's necessary to port it to the already released versions. This change was added to provide new support for the YAML binary tag. |
Description
Add base64 encode and decode functionality. This is necessary when configuring binary data in YAML files.
The related issue is ros2/rcl#1256.
Is this user-facing behavior change?
No.
Did you use Generative AI?
Yes. The GitHub Copilot (Claude Sonnet 4.5) is used to generate code comments, some parts of the code, and test code.
Additional Information