Skip to content

[humble] Fix for failing throws_on_invalid_pragma_in_config_file test on Windows (backport #1742)#1748

Merged
MichaelOrlov merged 2 commits intohumblefrom
mergify/bp/humble/pr-1742
Jul 16, 2024
Merged

[humble] Fix for failing throws_on_invalid_pragma_in_config_file test on Windows (backport #1742)#1748
MichaelOrlov merged 2 commits intohumblefrom
mergify/bp/humble/pr-1742

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify bot commented Jul 13, 2024

RCA (Root Cause Analysis)

The failure was because the database file was not properly closed after throwing an exception from the SqliteWrapper constructor, and std::filesystem::remove_all(..) failed to delete a temporary folder in the test fixture destructor.

Fixes

  • I added a reset for the prepared SQL statement before throwing the exception.
  • Try to close the database in the constructor if we get an exception after opening the database since the destructor will not be called in this case.

This is an automatic backport of pull request #1742 done by [Mergify](https://mergify.com).

…1742)

- The failure was because database file was not properly closed after
throwing exception from the SqliteWrapper constructor and
std::filesystem::remove_all(..) failed to delete temporary folder in the
test fixture destructor.
- Added reset for prepared sql statement before throwing exception.
- Try to close database in constructor if we got exception after
opening it since destructor will not be called in this case.

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
(cherry picked from commit 055935d)

# Conflicts:
#	rosbag2_storage_default_plugins/src/rosbag2_storage_default_plugins/sqlite/sqlite_wrapper.cpp
@mergify mergify bot requested a review from a team as a code owner July 13, 2024 00:09
@mergify mergify bot added the conflicts label Jul 13, 2024
@mergify mergify bot removed the request for review from a team July 13, 2024 00:09
@mergify
Copy link
Copy Markdown
Author

mergify bot commented Jul 13, 2024

Cherry-pick of 055935d has failed:

On branch mergify/bp/humble/pr-1742
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit 055935d3.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   rosbag2_storage_default_plugins/src/rosbag2_storage_default_plugins/sqlite/sqlite_statement_wrapper.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   rosbag2_storage_default_plugins/src/rosbag2_storage_default_plugins/sqlite/sqlite_wrapper.cpp

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

@mergify mergify bot requested review from gbiggs and jhdcs July 13, 2024 00:09
@MichaelOrlov MichaelOrlov changed the title Fix for failing throws_on_invalid_pragma_in_config_file test on Windows (backport #1742) [humble] Fix for failing throws_on_invalid_pragma_in_config_file test on Windows (backport #1742) Jul 13, 2024
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
@MichaelOrlov
Copy link
Copy Markdown
Contributor

Pulls: #1748
Gist: https://gist.githubusercontent.com/MichaelOrlov/375f3cbf24357792bc640a003f09b05d/raw/dfa63bb941b086207657e45c8281f625cc1b7195/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_storage_default_plugins rosbag2_tests
TEST args: --packages-above rosbag2_storage_default_plugins rosbag2_tests
ROS Distro: humble
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14233

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

@MichaelOrlov
Copy link
Copy Markdown
Contributor

Re-run CI since previous CI failures were due to the failures in the CI infrastructure.
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14242

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

@MichaelOrlov MichaelOrlov merged commit 70434fc into humble Jul 16, 2024
@mergify mergify bot deleted the mergify/bp/humble/pr-1742 branch July 16, 2024 04:35
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.

2 participants