-
Notifications
You must be signed in to change notification settings - Fork 0
fix: read the etag where the SDK keeps it, and say what the probe is … #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -154,3 +154,27 @@ async def never_ready() -> bool: | |||||||||||||||||||||||||||
| job = await store.get(job_id) | ||||||||||||||||||||||||||||
| assert job is not None | ||||||||||||||||||||||||||||
| assert job.status is JobStatus.FAILED | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| def test_the_per_job_budget_fits_inside_one_delivery(): | ||||||||||||||||||||||||||||
| """Everything one job can wait for has to fit inside the window the queue | ||||||||||||||||||||||||||||
| hides its message for. Beyond that the message reappears while the | ||||||||||||||||||||||||||||
| execution holding it is still running, and the job is done twice.""" | ||||||||||||||||||||||||||||
| from app.config import settings | ||||||||||||||||||||||||||||
| from app.worker import ( | ||||||||||||||||||||||||||||
| DETECTOR_PROBE_TIMEOUT_S, | ||||||||||||||||||||||||||||
| DETECTOR_READY_DEADLINE_S, | ||||||||||||||||||||||||||||
| VISIBILITY_TIMEOUT_S, | ||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| budget = ( | ||||||||||||||||||||||||||||
| DETECTOR_READY_DEADLINE_S | ||||||||||||||||||||||||||||
| + settings.llm_guardrail_timeout_s | ||||||||||||||||||||||||||||
| + settings.llm_timeout_s | ||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||
| assert budget < VISIBILITY_TIMEOUT_S | ||||||||||||||||||||||||||||
|
Comment on lines
+170
to
+175
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win Include the final probe timeout in the job budget.
Proposed fix budget = (
DETECTOR_READY_DEADLINE_S
+ + DETECTOR_PROBE_TIMEOUT_S
+ settings.llm_guardrail_timeout_s
+ settings.llm_timeout_s
)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # A probe is one request, so it is subject to the same ingress limit as any | ||||||||||||||||||||||||||||
| # other. Long enough for the platform to begin starting a replica, short | ||||||||||||||||||||||||||||
| # enough that the platform does not sever it first. | ||||||||||||||||||||||||||||
| assert 60 < DETECTOR_PROBE_TIMEOUT_S < 240 | ||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use unrounded elapsed time for the deadline check.
Line 81 rounds elapsed time before Line 89 evaluates the retry budget. A value such as
58.6seconds with a60second deadline and a1second interval rounds down and permits another sleep after the deadline.Keep
waited_srounded for logs. Use the raw elapsed value for deadline control.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents