Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log any errors before cancel_init() #5530

Merged

Conversation

Santti4go
Copy link
Contributor

@Santti4go Santti4go commented Dec 30, 2024

This PR improves the debugging process by adding a proper logging right before running SecurityManager::cancel_init() in this catch block

Description

More details in this ticket #5531

@Mergifyio backport 3.1.x 3.0.x 2.14.x 2.10.x

Fixes #(issue)

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • NA Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • NA Any new/modified methods have been properly documented using Doxygen.
  • NA Any new configuration API has an equivalent XML API (with the corresponding XSD extension)
  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.
  • Changes are API compatible.
  • NA New feature has been added to the versions.md file (if applicable).
  • NA New feature has been documented/Current behavior is correctly described in the documentation.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • NA Check CI results: failing tests are unrelated with the changes.

@EugenioCollado EugenioCollado changed the base branch from 2.6.9 to master January 3, 2025 08:13
@EugenioCollado EugenioCollado changed the base branch from master to 2.6.9 January 3, 2025 08:13
@EugenioCollado
Copy link
Contributor

Hi @Santti4go, thank you for creating this PR. As this change is compatible with the latest version and this branch is out of its End of Standard Support Date, we would appreciate it if you could rebase your commits onto the branch master and then we would backport it to the supported branches.

Signed-off-by: Santti4go <santiaupi@gmail.com>
Signed-off-by: Santti4go <santiaupi@gmail.com>
@Santti4go Santti4go force-pushed the saupi/adds-logging-before-exit branch from 87837dc to c6c380c Compare January 3, 2025 15:12
@Santti4go Santti4go changed the base branch from 2.6.9 to master January 3, 2025 15:13
Signed-off-by: Santti4go <santiaupi@gmail.com>
@Santti4go
Copy link
Contributor Author

@EugenioCollado thanks for reviewing this.
I just made the requested changes.
Do you want me to add anything in the PR desc in order to enable backport?

Copy link
Contributor

@EugenioCollado EugenioCollado left a comment

Choose a reason for hiding this comment

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

LGTM

@EugenioCollado EugenioCollado added this to the v3.2.0 milestone Jan 8, 2025
@EugenioCollado EugenioCollado merged commit 165d64e into eProsima:master Jan 8, 2025
17 checks passed
@EugenioCollado
Copy link
Contributor

@Mergifyio backport 3.1.x 3.0.x 2.14.x 2.10.x

Copy link
Contributor

mergify bot commented Jan 8, 2025

backport 3.1.x 3.0.x 2.14.x 2.10.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jan 8, 2025
* Log any errors before cancel_init()

Signed-off-by: Santti4go <santiaupi@gmail.com>

* Code style

Signed-off-by: Santti4go <santiaupi@gmail.com>

* Apply suggestion

Signed-off-by: Santti4go <santiaupi@gmail.com>

---------

Signed-off-by: Santti4go <santiaupi@gmail.com>
(cherry picked from commit 165d64e)
mergify bot pushed a commit that referenced this pull request Jan 8, 2025
* Log any errors before cancel_init()

Signed-off-by: Santti4go <santiaupi@gmail.com>

* Code style

Signed-off-by: Santti4go <santiaupi@gmail.com>

* Apply suggestion

Signed-off-by: Santti4go <santiaupi@gmail.com>

---------

Signed-off-by: Santti4go <santiaupi@gmail.com>
(cherry picked from commit 165d64e)
mergify bot pushed a commit that referenced this pull request Jan 8, 2025
* Log any errors before cancel_init()

Signed-off-by: Santti4go <santiaupi@gmail.com>

* Code style

Signed-off-by: Santti4go <santiaupi@gmail.com>

* Apply suggestion

Signed-off-by: Santti4go <santiaupi@gmail.com>

---------

Signed-off-by: Santti4go <santiaupi@gmail.com>
(cherry picked from commit 165d64e)
mergify bot pushed a commit that referenced this pull request Jan 8, 2025
* Log any errors before cancel_init()

Signed-off-by: Santti4go <santiaupi@gmail.com>

* Code style

Signed-off-by: Santti4go <santiaupi@gmail.com>

* Apply suggestion

Signed-off-by: Santti4go <santiaupi@gmail.com>

---------

Signed-off-by: Santti4go <santiaupi@gmail.com>
(cherry picked from commit 165d64e)
@Mario-DL
Copy link
Member

Mario-DL commented Jan 8, 2025

I think that the log macro should have been changed to EPROSIMA_LOG_ERROR() instead of the old one logError in master, as this would only build if ENABLE_OLD_LOG_MACROS is ON (by default). In addition, a proper test would have also been interesting.

@EugenioCollado
Copy link
Contributor

I think that the log macro should have been changed to EPROSIMA_LOG_ERROR() instead of the old one logError in master, as this would only build if ENABLE_OLD_LOG_MACROS is ON (by default). In addition, a proper test would have also been interesting.

I will take care of the changes you mention in a new PR and will also include them in the already created backports

EugenioCollado added a commit that referenced this pull request Jan 14, 2025
* Log any errors before cancel_init() (#5530)

* Log any errors before cancel_init()

Signed-off-by: Santti4go <santiaupi@gmail.com>

* Code style

Signed-off-by: Santti4go <santiaupi@gmail.com>

* Apply suggestion

Signed-off-by: Santti4go <santiaupi@gmail.com>

---------

Signed-off-by: Santti4go <santiaupi@gmail.com>
(cherry picked from commit 165d64e)

* Add test for security initialization error (#5550)

* Regression tests

Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>

* Update log macro

Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>

* Uncrustify

Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>

* Fix CI log flush

Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>

---------

Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>

---------

Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>
Co-authored-by: Santiago <95138114+Santti4go@users.noreply.github.com>
Co-authored-by: EugenioCollado <121509066+EugenioCollado@users.noreply.github.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