Skip to content

Catch ProcessLookupError on environment teardown#24174

Merged
sarah-witt merged 2 commits into
masterfrom
sarah/fix-process-lookup-error
Jun 25, 2026
Merged

Catch ProcessLookupError on environment teardown#24174
sarah-witt merged 2 commits into
masterfrom
sarah/fix-process-lookup-error

Conversation

@sarah-witt

@sarah-witt sarah-witt commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Catches ProcessLookupError when ddev tears down environments.

self = <datadog_checks.dev.ssh_tunnel.KillProcess object at 0x7f310ad87230>

    def __call__(self):
        with TempDir(self.temp_name) as temp_dir:
            with open(os.path.join(temp_dir, self.pid_file)) as pid_file:
                pid = int(pid_file.read())
>               os.kill(pid, signal.SIGKILL if os.name == 'posix' else signal.SIGTERM)
E               ProcessLookupError: [Errno 3] No such process

../datadog_checks_dev/datadog_checks/dev/ssh_tunnel.py:143: ProcessLookupError

Motivation

Strimzi flakes with this error: https://github.com/DataDog/integrations-core/actions/runs/27966488205/job/82761676780

I believe the main issue is that Strimzi only has one E2E test and it's marked as flakey so it doesn't run in CI, but ddev still spins up and down the environment.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Tests  Code Coverage

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 0.00%
Overall Coverage: 88.17%

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5cdf3bb | Docs | Datadog PR Page | Give us feedback!

@sarah-witt sarah-witt added the qa/skip-qa Automatically skip this PR for the next QA label Jun 25, 2026
@sarah-witt sarah-witt marked this pull request as ready for review June 25, 2026 18:24
@sarah-witt sarah-witt requested a review from a team as a code owner June 25, 2026 18:24
@dd-octo-sts

dd-octo-sts Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Validation Report

All 21 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
qa-label Validate the pull request declares whether it needs QA for the next Agent release
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

@sarah-witt sarah-witt added this pull request to the merge queue Jun 25, 2026
Merged via the queue into master with commit ea7afb2 Jun 25, 2026
644 of 646 checks passed
@sarah-witt sarah-witt deleted the sarah/fix-process-lookup-error branch June 25, 2026 19:44
@dd-octo-sts dd-octo-sts Bot added this to the 7.82.0 milestone Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev_package qa/skip-qa Automatically skip this PR for the next QA team/agent-integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants