magic-peach opened a new pull request, #69759: URL: https://github.com/apache/airflow/pull/69759
Fix a logic bug in the OpenAI batch trigger timeout error message. The previous code computed `time.time() - self.end_time` which produces a negative number since `end_time` is already in the past when the timeout fires. Replace with a clear message stating the batch did not complete within the configured timeout. Also switch to `time.monotonic()` for the timeout check to align with the project coding standard (AGENTS.md: "`time.monotonic()` for durations, not `time.time()`"). Changes: - `openai/triggers/openai.py`: Fix timeout error message and use `time.monotonic()` - `openai/operators/openai.py`: Use `time.monotonic()` when setting the trigger end_time --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.7) Generated-by: Claude Code (Opus 4.7) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) --- Drafted-by: Claude Code (Opus 4.7) (no human review before posting) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
