Skip to content

Fix field type validation for actions - #993

Open
vpfkfl753 wants to merge 1 commit into
ros2:rollingfrom
vpfkfl753:fix-action-field-validation
Open

Fix field type validation for actions#993
vpfkfl753 wants to merge 1 commit into
ros2:rollingfrom
vpfkfl753:fix-action-field-validation

Conversation

@vpfkfl753

Copy link
Copy Markdown

Description

Fixes #829.

validate_field_types() raises AttributeError for parsed actions because ActionSpecification has no goal_service or result_service. Read the goal, result and feedback fields directly, and remove the unused service annotations.

Is this user-facing behavior change?

Action validation now accepts valid fields and raises UnknownMessageType for unknown message types in any of the three sections.

Did you use Generative AI?

Yes, OpenAI Codex (GPT-6), for the code change and tests.

Additional Information

Added five regression cases for empty actions, primitive fields and unknown message types in each section. All five fail before the fix. The adapter's 46 Python tests pass in a ROS 2 Rolling container.

colcon build and colcon test --packages-select rosidl_adapter also pass, including mypy and the package's lint checks.

Signed-off-by: vpfkfl753 <vpfkfl753@gmail.com>

@fujitatomoya fujitatomoya 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.

lgtm with green CI.

@ahcorde

ahcorde commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Pulls: #993
Gist: https://gist.githubusercontent.com/ahcorde/532874aec5328a718400d107ff3c0169/raw/8f04a18c03d43996c538a550951d5106262719a3/ros2.repos
BUILD args: --packages-above-and-dependencies rosidl_adapter
TEST args: --packages-above rosidl_adapter
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/20411

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@vpfkfl753

Copy link
Copy Markdown
Author

Linux, Linux-aarch64 and RHEL passed. The Windows build stopped before tests while compiling rviz_default_plugins:

error C1083: Cannot open include file: 'rclcpp/macros.hpp': No such file or directory

rosidl_adapter built successfully. The missing header is also present in the rclcpp revision used by the job, so this looks unrelated to the changes here. Could the Windows job be rerun?

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.

ActionSpecification in rosidl_adapter.parser missing attributes.

3 participants