Skip to content

[foxy] Backport parser fixes and type_utils refactor#530

Merged
jacobperron merged 4 commits intofoxyfrom
jacob/backport_438
Nov 11, 2021
Merged

[foxy] Backport parser fixes and type_utils refactor#530
jacobperron merged 4 commits intofoxyfrom
jacob/backport_438

Conversation

@jacobperron
Copy link
Copy Markdown
Member

@jacobperron jacobperron commented Sep 10, 2021

Backport #414 (prerequisite for #438) (6fd0e83)
Backport #438 (175c466)
Add back functions removed in #438 for backwards compatibility (7ce628f)

For context, this is part of an effort to fix ros2/launch_ros#214 for Foxy.
This PR will enable us to easily backport ros2/launch_ros#137

I don't think there are any significant changes to API, but it's a large change so I may be mistaken.

rotu and others added 2 commits September 10, 2021 08:45
Signed-off-by: Dan Rose <dan@digilabs.io>
…sults that need to be coerced to a specific type (#438)

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Part of backporting #438 to Foxy.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Copy link
Copy Markdown

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

Only skimmed through the PR. API compatibility holds.

LGTM pending green Foxy CI

@ivanpauno
Copy link
Copy Markdown
Member

Only skimmed through the PR. API compatibility holds.

It does change behavior though, there are values that are parsed different after this PR.
It doesn't affect the most common launch files, but it might break some uncommon ones.

@wjwwood
Copy link
Copy Markdown
Member

wjwwood commented Sep 13, 2021

It doesn't affect the most common launch files, but it might break some uncommon ones.

Question is, do we consider the old behavior a bug or valid but different? I was leaning towards this is a bugfix (correction to intended behavior), but I don't know.

@ivanpauno
Copy link
Copy Markdown
Member

#443 also needs to be backport (#438 was causing issues in CI).

Question is, do we consider the old behavior a bug or valid but different? I was leaning towards this is a bugfix (correction to intended behavior), but I don't know.

I don't remember exactly, I think that some cases were valid but different (some cases were maybe a bug).
e.g.

<param name="asd" value="''3''"/>

was a parameter with a value '3', using double single quotes was valid and the outer ones were eliminated.
Now that string isn't valid, you have to instead use:

<param name="asd" value="3" type="str"/>

@hidmic
Copy link
Copy Markdown

hidmic commented Sep 14, 2021

#443 also needs to be backport (#438 was causing issues in CI).

Good catch.

Now that string isn't valid

Good point, and this is indeed breaking behavior @jacobperron. We may have to reconsider.

Having said that, it's also true that quoting was a bit of an obscure corner of launch frontends.
I mean, we knew that:

using double single quotes was valid and the outer ones were eliminated.

but I don't think we ever documented that behavior. Or at least I don't remember seeing it written anywhere.

@ivanpauno
Copy link
Copy Markdown
Member

Having said that, it's also true that quoting was a bit of an obscure corner of launch frontends.

True. I'm ok with backporting this, but it's a potentially breaking change.

@jacobperron
Copy link
Copy Markdown
Member Author

jacobperron commented Sep 21, 2021

This is primarily an attempt to fix ros2/launch_ros#214 (which is a bug in the parser), but it seemed not trivial to fix. I hadn't considered the behavior change. It would be good to know what corner cases this breaks exactly before proceeding. If we decide to merge this, then hopefully we can enumerate the cases this breaks (and show the preferred syntax).

@ivanpauno
Copy link
Copy Markdown
Member

This is primarily an attempt to fix ros2/launch_ros#214 (which is a bug in the parser), but it seemed not trivial to fix. I hadn't considered the behavior change. It would be good to know what corner cases this breaks exactly before proceeding. If we decide to merge this, then hopefully we can enumerate the cases this breaks (and show the preferred syntax).

The only one I remember is the one commented before #530 (comment), I'm not aware of other corner cases but there might be.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
@jacobperron
Copy link
Copy Markdown
Member Author

Added backport of #443 (85f01b9).

The only one I remember is the one commented before #530 (comment), I'm not aware of other corner cases but there might be.

<param name="asd" value="''3''"/>

IMO, this was a workaround because of a bug. I think it's worth fixing this with a release note that folks no longer need to do this extra quoting. If everyone agrees with this, I can add a note to the Foxy release page (for the upcoming patch release).

@jacobperron
Copy link
Copy Markdown
Member Author

jacobperron commented Sep 30, 2021

CI together with ros2/launch_ros#265:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Edit: Test failures are unrelated to this change.

jacobperron added a commit to ros2/ros2_documentation that referenced this pull request Oct 26, 2021
Related to ros2/launch#530 and ros2/launch_ros#265

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron
Copy link
Copy Markdown
Member Author

I've added a release note for the next patch release: ros2/ros2_documentation#2074

clalancette pushed a commit to ros2/ros2_documentation that referenced this pull request Oct 27, 2021
Related to ros2/launch#530 and ros2/launch_ros#265

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron jacobperron merged commit 2686b24 into foxy Nov 11, 2021
@delete-merged-branch delete-merged-branch bot deleted the jacob/backport_438 branch November 11, 2021 18:20
@Blast545
Copy link
Copy Markdown
Contributor

👨‍🌾 I think this backport caused a test regression in all the foxy jobs.
Reference: https://build.ros2.org/view/Fci/job/Fci__nightly-release_ubuntu_focal_amd64/335/

This is the test is failing: https://github.com/ros2/launch_ros/blob/c9b6b7057d19b3cba67072818d499370cb14f163/test_launch_ros/test/test_launch_ros/frontend/test_node_frontend.py#L167
Should the test be updated to match the PR or is this an unexpected side effect?

PTAL @jacobperron

@jacobperron
Copy link
Copy Markdown
Member Author

@Blast545 My mistake, I forgot to merge the connected PR ros2/launch_ros#265, which I think should resolve the issue.

@Blast545
Copy link
Copy Markdown
Contributor

No prob, thanks for taking a look!

jacobperron added a commit to ros2/ros2_documentation that referenced this pull request Feb 7, 2022
* Note launch behavior change in Foxy Patch 7

Related to ros2/launch#530 and ros2/launch_ros#265

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Fix link syntax

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Minor fixes.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>

Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
mergify bot pushed a commit to ros2/ros2_documentation that referenced this pull request Feb 7, 2022
* Note launch behavior change in Foxy Patch 7

Related to ros2/launch#530 and ros2/launch_ros#265

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Fix link syntax

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Minor fixes.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>

Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
(cherry picked from commit dc0ddb4)
mergify bot pushed a commit to ros2/ros2_documentation that referenced this pull request Feb 7, 2022
* Note launch behavior change in Foxy Patch 7

Related to ros2/launch#530 and ros2/launch_ros#265

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Fix link syntax

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Minor fixes.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>

Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
(cherry picked from commit dc0ddb4)
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.

6 participants