René's URL Explorer Experiment


Title: fix: handle sigterm by fernandezcuesta · Pull Request #130 · crossplane/function-sdk-python · GitHub

Open Graph Title: fix: handle sigterm by fernandezcuesta · Pull Request #130 · crossplane/function-sdk-python

X Title: fix: handle sigterm by fernandezcuesta · Pull Request #130 · crossplane/function-sdk-python

Description: Description of your changes Python based functions are not properly handling SIGTERM and as a consequence, are slow to shut down as raised in #109. This PR adds a handler for SIGTERM which essentially calls server.stop() to gracefully terminate connections with a given grace period (5 seconds). Fixes #109 I have: Read and followed Crossplane's contribution process. Added or updated unit tests for my change.

Open Graph Description: Description of your changes Python based functions are not properly handling SIGTERM and as a consequence, are slow to shut down as raised in #109. This PR adds a handler for SIGTERM which essentia...

X Description: Description of your changes Python based functions are not properly handling SIGTERM and as a consequence, are slow to shut down as raised in #109. This PR adds a handler for SIGTERM which essentia...

Opengraph URL: https://github.com/crossplane/function-sdk-python/pull/130

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:6495a43e-76db-9ee2-da7a-9bdc83f24b2d
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id91FC:3AEFAE:271DD9:34A29A:6A61A321
html-safe-nonce1449330729b815f3caee42d51321c50904274ed072303db4a4ceaf1d3ed9415d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUZDOjNBRUZBRToyNzFERDk6MzRBMjlBOjZBNjFBMzIxIiwidmlzaXRvcl9pZCI6IjIzOTM1NDI4OTMxMDgzMDY3MjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac8a60917a1346721836776895cd20f9f1fca2cd944fe25fc443460a0fa9f937a9
hovercard-subject-tagpull_request:2338492450
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/crossplane/function-sdk-python/pull/130/files
twitter:imagehttps://avatars.githubusercontent.com/u/7312236?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/7312236?s=400&v=4
og:image:altDescription of your changes Python based functions are not properly handling SIGTERM and as a consequence, are slow to shut down as raised in #109. This PR adds a handler for SIGTERM which essentia...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None6f4633bcf01c1ad14b73fd07dd39ac31d61f3d3c2578ee08ec1792b7b351eeb9
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/crossplane/function-sdk-python git https://github.com/crossplane/function-sdk-python.git
octolytics-dimension-user_id45158470
octolytics-dimension-user_logincrossplane
octolytics-dimension-repository_id721365259
octolytics-dimension-repository_nwocrossplane/function-sdk-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id721365259
octolytics-dimension-repository_network_root_nwocrossplane/function-sdk-python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseac296ae7f21856f1f92adbad22f870b6fbb4b907
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/crossplane/function-sdk-python/pull/130/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcrossplane%2Ffunction-sdk-python%2Fpull%2F130%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcrossplane%2Ffunction-sdk-python%2Fpull%2F130%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=crossplane%2Ffunction-sdk-python
Reloadhttps://github.com/crossplane/function-sdk-python/pull/130/files
Reloadhttps://github.com/crossplane/function-sdk-python/pull/130/files
Reloadhttps://github.com/crossplane/function-sdk-python/pull/130/files
Please reload this pagehttps://github.com/crossplane/function-sdk-python/pull/130/files
crossplane https://github.com/crossplane
function-sdk-pythonhttps://github.com/crossplane/function-sdk-python
Notifications https://github.com/login?return_to=%2Fcrossplane%2Ffunction-sdk-python
Fork 14 https://github.com/login?return_to=%2Fcrossplane%2Ffunction-sdk-python
Star 13 https://github.com/login?return_to=%2Fcrossplane%2Ffunction-sdk-python
Code https://github.com/crossplane/function-sdk-python
Issues 6 https://github.com/crossplane/function-sdk-python/issues
Pull requests 1 https://github.com/crossplane/function-sdk-python/pulls
Actions https://github.com/crossplane/function-sdk-python/actions
Projects https://github.com/crossplane/function-sdk-python/projects
Security and quality 0 https://github.com/crossplane/function-sdk-python/security
Insights https://github.com/crossplane/function-sdk-python/pulse
Code https://github.com/crossplane/function-sdk-python
Issues https://github.com/crossplane/function-sdk-python/issues
Pull requests https://github.com/crossplane/function-sdk-python/pulls
Actions https://github.com/crossplane/function-sdk-python/actions
Projects https://github.com/crossplane/function-sdk-python/projects
Security and quality https://github.com/crossplane/function-sdk-python/security
Insights https://github.com/crossplane/function-sdk-python/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fcrossplane%2Ffunction-sdk-python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcrossplane%2Ffunction-sdk-python%2Fissues%2Fnew%2Fchoose
fernandezcuestahttps://github.com/fernandezcuesta
crossplane:mainhttps://github.com/crossplane/function-sdk-python/tree/main
fernandezcuesta:mainhttps://github.com/fernandezcuesta/function-sdk-python/tree/main
Conversation 1 https://github.com/crossplane/function-sdk-python/pull/130
Commits 2 https://github.com/crossplane/function-sdk-python/pull/130/commits
Checks 0 https://github.com/crossplane/function-sdk-python/pull/130/checks
Files changed https://github.com/crossplane/function-sdk-python/pull/130/files
Please reload this pagehttps://github.com/crossplane/function-sdk-python/pull/130/files
fix: handle sigterm https://github.com/crossplane/function-sdk-python/pull/130/files#top
Show all changes 2 commits https://github.com/crossplane/function-sdk-python/pull/130/files
869f7d4 fix: #109 fernandezcuesta Feb 17, 2025 https://github.com/crossplane/function-sdk-python/pull/130/commits/869f7d4439423bb758b172c747456a81c9c6f023
50b187c chore: use signal.signal and add test fernandezcuesta Feb 18, 2025 https://github.com/crossplane/function-sdk-python/pull/130/commits/50b187cae8336130070e22f07a7da2fac14392a4
Clear filters https://github.com/crossplane/function-sdk-python/pull/130/files
Please reload this pagehttps://github.com/crossplane/function-sdk-python/pull/130/files
Please reload this pagehttps://github.com/crossplane/function-sdk-python/pull/130/files
resource.py https://github.com/crossplane/function-sdk-python/pull/130/files#diff-05f183177eba52e1720d1fb16381620d80c3a5f071a87aa09b57177df0f33934
runtime.py https://github.com/crossplane/function-sdk-python/pull/130/files#diff-f39d311b60f3a0bb53bf3acac3190becb170a74e65eec76b09f28867ec234c8a
test_runtime.py https://github.com/crossplane/function-sdk-python/pull/130/files#diff-7bfcfadd3f7e0bb4bf486400ed510f691c0e0a139d08d60439ee3235d3b4cf5a
https://github.com/crossplane/function-sdk-python/blob/main/CODEOWNERS#L22
crossplane/function/resource.pyhttps://github.com/crossplane/function-sdk-python/pull/130/files#diff-05f183177eba52e1720d1fb16381620d80c3a5f071a87aa09b57177df0f33934
View file https://github.com/fernandezcuesta/function-sdk-python/blob/50b187cae8336130070e22f07a7da2fac14392a4/crossplane/function/resource.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/crossplane/function-sdk-python/pull/130/{{ revealButtonHref }}
https://github.com/crossplane/function-sdk-python/pull/130/files#diff-05f183177eba52e1720d1fb16381620d80c3a5f071a87aa09b57177df0f33934
https://github.com/crossplane/function-sdk-python/pull/130/files#diff-05f183177eba52e1720d1fb16381620d80c3a5f071a87aa09b57177df0f33934
https://github.com/crossplane/function-sdk-python/blob/main/CODEOWNERS#L22
crossplane/function/runtime.pyhttps://github.com/crossplane/function-sdk-python/pull/130/files#diff-f39d311b60f3a0bb53bf3acac3190becb170a74e65eec76b09f28867ec234c8a
View file https://github.com/fernandezcuesta/function-sdk-python/blob/50b187cae8336130070e22f07a7da2fac14392a4/crossplane/function/runtime.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/crossplane/function-sdk-python/pull/130/{{ revealButtonHref }}
https://github.com/crossplane/function-sdk-python/pull/130/files#diff-f39d311b60f3a0bb53bf3acac3190becb170a74e65eec76b09f28867ec234c8a
https://github.com/crossplane/function-sdk-python/pull/130/files#diff-f39d311b60f3a0bb53bf3acac3190becb170a74e65eec76b09f28867ec234c8a
https://github.com/crossplane/function-sdk-python/pull/130/files#diff-f39d311b60f3a0bb53bf3acac3190becb170a74e65eec76b09f28867ec234c8a
https://github.com/crossplane/function-sdk-python/pull/130/files#diff-f39d311b60f3a0bb53bf3acac3190becb170a74e65eec76b09f28867ec234c8a
https://github.com/crossplane/function-sdk-python/pull/130/files#diff-f39d311b60f3a0bb53bf3acac3190becb170a74e65eec76b09f28867ec234c8a
https://github.com/crossplane/function-sdk-python/pull/130/files#diff-f39d311b60f3a0bb53bf3acac3190becb170a74e65eec76b09f28867ec234c8a
https://github.com/crossplane/function-sdk-python/pull/130/files#diff-f39d311b60f3a0bb53bf3acac3190becb170a74e65eec76b09f28867ec234c8a
https://github.com/crossplane/function-sdk-python/blob/main/CODEOWNERS#L22
tests/test_runtime.pyhttps://github.com/crossplane/function-sdk-python/pull/130/files#diff-7bfcfadd3f7e0bb4bf486400ed510f691c0e0a139d08d60439ee3235d3b4cf5a
View file https://github.com/fernandezcuesta/function-sdk-python/blob/50b187cae8336130070e22f07a7da2fac14392a4/tests/test_runtime.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/crossplane/function-sdk-python/pull/130/{{ revealButtonHref }}
https://github.com/crossplane/function-sdk-python/pull/130/files#diff-7bfcfadd3f7e0bb4bf486400ed510f691c0e0a139d08d60439ee3235d3b4cf5a
https://github.com/crossplane/function-sdk-python/pull/130/files#diff-7bfcfadd3f7e0bb4bf486400ed510f691c0e0a139d08d60439ee3235d3b4cf5a
https://github.com/crossplane/function-sdk-python/pull/130/files#diff-7bfcfadd3f7e0bb4bf486400ed510f691c0e0a139d08d60439ee3235d3b4cf5a
https://github.com/crossplane/function-sdk-python/pull/130/files#diff-7bfcfadd3f7e0bb4bf486400ed510f691c0e0a139d08d60439ee3235d3b4cf5a
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.