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

Fix: Harden sig_term_handled test #2235

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Fix: Harden sig_term_handled test #2235

wants to merge 1 commit into from

Conversation

svteb
Copy link
Collaborator

@svteb svteb commented Mar 11, 2025

Description

  • Prior implementation of the test did not correctly handle strace failures, resulting in the task being fragile and failing on ephemeral/untracable processes.
  • Above issues were resolved by adding correct error handling on expected errors.
  • The code structure was also flattened for better readability.

After reading the prior implementation I decided to make some changes that may change the outcome of the task, the task would previously fail if the container to be checked was not ready/could not be found (really odd edge cases). These cases were considered skipped, but would still cause failure. I changed them to be true skips (not affecting the end result).

I would like to test this a little further, maybe add an additional spec test, so for now its in draft state.

Issues:

Refs: #2223

How has this been tested:

  • Covered by existing integration testing
  • Added integration testing to cover
  • Verified all A/C passes
    • develop
    • master
    • tag/other branch
  • Test environment
    • Shared Packet K8s cluster
    • New Packet K8s cluster
    • Kind cluster
  • Have not tested

Types of changes:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist:

Documentation

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • No updates required.

Code Review

  • Does the test handle fatal exceptions, ie. rescue block

Issue

  • Tasks in issue are checked off

Refs: #2223
- Prior implementation of the test did not correctly handle `strace`
  failures, resulting in the task being fragile and failing on
  ephemeral/untracable processes.
- Above issues were resolved by adding correct error handling on
  expected errors.
- The code structure was also flattened for better readability.

Signed-off-by: svteb <slavo.valko@tietoevry.com>
@svteb svteb marked this pull request as draft March 11, 2025 10:32
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.

1 participant