gowalk-cicd 1.0.121 → 1.0.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/action/.daemux-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.122
|
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.122
|
|
@@ -88,7 +88,16 @@ def call(phase: str, operation, *, retry: bool = False, edit_id: str | None = No
|
|
|
88
88
|
else:
|
|
89
89
|
if not retry or getattr(result, "status_code", None) not in RETRY_STATUSES:
|
|
90
90
|
if accepted is not None and result.status_code not in accepted:
|
|
91
|
-
|
|
91
|
+
# A transient upstream status is not a refusal, even where the
|
|
92
|
+
# phase may not replay it: `edit_create` never repeats an
|
|
93
|
+
# ambiguous insert, so a 503 there ends the build — and calling
|
|
94
|
+
# that "provider_refused" sent the next session hunting for a
|
|
95
|
+
# configuration Google never objected to (Foundy, 2026-09-09,
|
|
96
|
+
# run 34345638488). The remedy for one is to dispatch again;
|
|
97
|
+
# for the other it is to change something first.
|
|
98
|
+
code = ("provider_unavailable" if result.status_code in RETRY_STATUSES
|
|
99
|
+
else "provider_refused")
|
|
100
|
+
fail(phase, code, attempt, status=result.status_code, edit_id=edit_id)
|
|
92
101
|
return result
|
|
93
102
|
if attempt == limit:
|
|
94
103
|
fail(phase, "provider_unavailable", attempt, status=result.status_code, edit_id=edit_id)
|
|
@@ -63,6 +63,26 @@ class PreflightTransportTests(unittest.TestCase):
|
|
|
63
63
|
self.assertIn('"edit_id": "123"', str(caught.exception))
|
|
64
64
|
self.assertEqual(operation.call_count, 3)
|
|
65
65
|
|
|
66
|
+
def test_a_transient_status_is_unavailable_even_where_the_phase_cannot_replay(self):
|
|
67
|
+
"""`edit_create` must not repeat an ambiguous insert, but naming its 503 a
|
|
68
|
+
refusal told the next session to go and fix a configuration Google never
|
|
69
|
+
objected to. The status decides the word; the retry policy is unchanged."""
|
|
70
|
+
operation = mock.Mock(return_value=mock.Mock(status_code=503))
|
|
71
|
+
with self.assertRaises(SystemExit) as caught:
|
|
72
|
+
transport.call("edit_create", operation, accepted=(200, 404), retry_connect=True)
|
|
73
|
+
self.assertIn('"code": "provider_unavailable"', str(caught.exception))
|
|
74
|
+
self.assertIn('"status": 503', str(caught.exception))
|
|
75
|
+
self.assertIn('"attempts": 1', str(caught.exception))
|
|
76
|
+
operation.assert_called_once()
|
|
77
|
+
self.sleep.assert_not_called()
|
|
78
|
+
|
|
79
|
+
def test_a_real_refusal_keeps_its_own_word(self):
|
|
80
|
+
operation = mock.Mock(return_value=mock.Mock(status_code=403))
|
|
81
|
+
with self.assertRaises(SystemExit) as caught:
|
|
82
|
+
transport.call("edit_create", operation, accepted=(200, 404), retry_connect=True)
|
|
83
|
+
self.assertIn('"code": "provider_refused"', str(caught.exception))
|
|
84
|
+
self.assertIn('"status": 403', str(caught.exception))
|
|
85
|
+
|
|
66
86
|
def test_refusal_after_retry_records_the_actual_attempt_in_a_safe_annotation(self):
|
|
67
87
|
operation = mock.Mock(side_effect=[mock.Mock(status_code=503), mock.Mock(status_code=403)])
|
|
68
88
|
with self.assertRaises(SystemExit) as caught:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.122
|