[codex] degrade retryable gateway startup failures - #24364
Closed
foras910521-lab wants to merge 1 commit into
Closed
[codex] degrade retryable gateway startup failures#24364foras910521-lab wants to merge 1 commit into
foras910521-lab wants to merge 1 commit into
Conversation
Collaborator
|
Likely duplicate of #17984 — both keep gateway alive in degraded mode for retryable startup failures instead of exiting fatally. This PR is narrower and aligned with current |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Keeps the gateway process alive when every configured messaging platform fails startup with retryable errors, and records the gateway as
degradedso the reconnect watcher can recover without relying on service-manager restart loops.Why
Current startup logic already distinguishes retryable and non-retryable adapter failures. However, if no platform connects and the failures are retryable, startup still returns failure and writes
startup_failed. That can prevent the in-process reconnect watcher from recovering transient DNS/connectivity failures.Changes made
startup_failed.gateway_state=degradedwith the failure reason.runningstate.Relationship to upstream #17984
This is intentionally aligned with #17984 in using a degraded process state instead of a fatal startup exit for transient failures. It is narrower around the current
mainimplementation becausemainalready separates retryable from non-retryable startup errors; this PR keeps that distinction so non-retryable failures do not become false healthy/degraded states.Validation
venv/bin/python -m ruff check .scripts/run_tests.sh tests/gateway/test_runner_startup_failures.py tests/gateway/test_platform_reconnect.py tests/gateway/test_runner_fatal_adapter.py tests/gateway/test_status.pyResult:
70 passed.Scope note
This PR does not change Feishu adapter code, launchd/systemd service definitions, Hindsight/API server lifecycle, Wi-Fi, DNS, system proxy settings, or any third-party proxy app configuration.