Repository navigation
Conversation
…notices Only server errors counted as transient, so a connection GitHub dropped mid-request (an HTTP/2 stream reset) was neither retried nor skipped like one, and failed the scheduled run although the next run would do the same work again. Generated-by: Claude Opus 5
potiuk
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
jason810496 and
jscheffl
as code owners
October 27, 2026 22:51
potiuk
enabled auto-merge (squash)
October 27, 2026 22:52
| [ | ||
| pytest.param(("repos/x",), [SERVER_ERROR, SERVER_ERROR], 3, None, id="retries-server-errors"), | ||
| pytest.param(("repos/x",), [SERVER_ERROR] * 3, 3, SERVER_ERROR, id="gives-up"), | ||
| pytest.param(("repos/x",), [STREAM_ERROR], 2, None, id="retries-dropped-connections"), |
Member
There was a problem hiding this comment.
It looks like only stream error is covered here. How about adding a test for is_transient like:
@pytest.mark.parametrize(
("stderr", "expected"),
[
pytest.param("gh: Server Error (HTTP 502)\n", True, id="server-error"),
pytest.param("stream error: stream ID 3; CANCEL; received from peer\n", True, id="stream-reset"),
pytest.param('Get "https://api.github.com/repos/x": read tcp …: read: connection reset by peer\n', True, id="connection-reset"),
pytest.param('Get "https://api.github.com/repos/x": unexpected EOF\n', True, id="unexpected-eof"),
pytest.param('Get "https://api.github.com/repos/x": net/http: TLS handshake timeout\n', True, id="tls-timeout"),
pytest.param('Get "https://api.github.com/repos/x": dial tcp 140.82.112.6:443: i/o timeout\n', True, id="dial-timeout"),
pytest.param("gh: Not Found (HTTP 404)\n", False, id="client-error"),
],
)
def test_is_transient(spot, stderr, expected):
assert spot.is_transient(subprocess.CalledProcessError(1, ["gh"], stderr=stderr)) is expected
shahar1
approved these changes
Oct 28, 2026
eladkal
approved these changes
Oct 28, 2026
amoghrajesh
approved these changes
Oct 28, 2026
This branch has not been deployed
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.
The scheduled Spot interruption notice run failed when GitHub dropped a connection mid-request: https://github.com/apache/airflow/actions/runs/40590296911/job/122492480657
Only
(HTTP 5xx)counted as transient, so this HTTP/2 stream reset was neither retried nor skipped with a warning like a server error, and the run exited 1 although the next scheduled run does the same work again. Dropped connections (stream resets, connection resets, unexpected EOF, TLS handshake and I/O timeouts) now count as transient too. A POST is still not retried, since one that lost its connection may have created the comment.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Claude Opus 5) following the guidelines
🤖 Generated with Claude Code