Anurag-S1ngh opened a new pull request, #77096:
URL: https://github.com/apache/airflow/pull/77096

   ## Summary
   `HttpSensor` honours `response_error_codes_allowlist` while poking, but 
after deferring `HttpSensorTrigger` only retried on `404` and otherwise spun 
without sleeping or failing. The trigger now receives the configured allowlist, 
keeps waiting on the allowlisted codes, and raises for the others.
   
   ## Changes
   - `HttpSensorTrigger` accepts and serializes 
`response_error_codes_allowlist` (defaults to `("404",)`, same as the sensor)
   - `HttpSensor.execute()` passes the sensor's allowlist to the trigger when 
it defers
   - The trigger sleeps `poke_interval` on an allowlisted status and raises 
`AirflowException` for a non-allowlisted one, matching `poke()`
   
   ## Testing
   - `uv run --project providers/http pytest 
providers/http/tests/unit/http/triggers/test_http.py 
providers/http/tests/unit/http/sensors/test_http.py -q` (42 passed, 1 skipped: 
a pre-3.0-only test)
   - `prek run ruff --files ...` and `prek run ruff-format --files ...` pass
   
   Closes #69903


-- 
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]

Reply via email to