Skip to content

Conversation

@gpauloski
Copy link
Collaborator

@gpauloski gpauloski commented Mar 20, 2024

Description

Uvicorn 0.29.0 no longer captures, handles, and then surpresses SIGINT. Rather, SIGINT is repropagated by Uvicorn so we need to capture it again and pass. It is safe to pass because we let Uvicorn handle clean up for the endpoint.

Fixes

  • Fixes #XX

Type of Change

  • Breaking Change (fix or enhancement which changes existing semantics of the public interface)
  • Enhancement (new features or improvements to existing functionality)
  • Bug (fixes for a bug or issue)
  • Internal (refactoring, style changes, testing, optimizations)
  • Documentation update (changes to documentation or examples)
  • Package (dependencies, versions, package metadata)
  • Development (CI workflows, pre-commit, linters, templates)
  • Security (security related changes)

Testing

I tested with this script on the old and new versions of uvicorn by starting the script and then sending each signal type with kill -s SIGTERM [PID].

import logging
import uuid

from proxystore.endpoint.config import EndpointConfig
from proxystore.endpoint.serve import serve

from testing.utils import open_port

logging.basicConfig()

config = EndpointConfig(
    name='test',
    uuid=str(uuid.uuid4()),
    host='localhost',
    port=open_port(),
)

serve(config, log_level='DEBUG')

Pull Request Checklist

Please confirm the PR meets the following requirements.

  • Tags added to PR (e.g., breaking, bug, enhancement, internal, documentation, package, development, security).
  • Code changes pass pre-commit (e.g., mypy, ruff, etc.).
  • Tests have been added to show the fix is effective or that the new feature works.
  • New and existing unit tests pass locally with the changes.
  • Docs have been updated and reviewed if relevant.

@gpauloski gpauloski added the bug Error, flaw, or fault that causes unexpected behavior label Mar 20, 2024
Uvicorn 0.29.0 no longer captures, handles, and then surpresses SIGINT.
Rather, SIGINT is repropagated by Uvicorn so we need to capture it again
and pass. It is safe to pass because we let Uvicorn handle clean up for
the endpoint.
@gpauloski gpauloski force-pushed the uvicorn-signal-prop branch from e0a1c50 to 906e17f Compare March 20, 2024 18:09
@gpauloski gpauloski merged commit 228904e into main Mar 20, 2024
@gpauloski gpauloski deleted the uvicorn-signal-prop branch March 20, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Error, flaw, or fault that causes unexpected behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants