kaxil commented on PR #72156:
URL: https://github.com/apache/airflow/pull/72156#issuecomment-5733825090

   Re-reviewed at `8d68806`. Everything from the previous round is addressed, 
and I checked the two I had called blocking rather than reading the commit 
titles for it.
   
   `model_name == "test"` now short-circuits before any vendor prefixing, so a 
generic connection with `extra={"model": "test"}` reaches pydantic-ai's 
`TestModel` again and the fix covers all four hook classes. An unrecognized 
colon prefix keeps the Bedrock native-id behaviour but now warns and names the 
offending segment, and the generic connection's error names the prefix and 
suggests a typo check instead of calling the name bare. 
`_looks_like_unrecognized_provider_prefix` documenting its own blind spots (an 
uppercase letter, an `_`, a leading digit) is the right way to ship a heuristic.
   
   I also went looking for problems the fixes themselves could introduce, and 
found none:
   
   - The `isinstance(hook, PydanticAIHook)` check still runs before 
`_seed_connection`, so a fallback pointing at a non-pydanticai connection still 
gets the explicit `ValueError` rather than an `AttributeError` from the new 
method.
   - The blank-entry filter still rejects non-string entries, and treating an 
all-blank chain as `[]` is documented rather than incidental.
   - The cross-platform forwarding gate refuses a colon-bearing native id only 
when the two connections' providers differ, so Bedrock-to-Bedrock and the 
colon-free cross-vendor case still work.
   - `test_blank_entries_are_dropped_from_param` and 
`test_fallback_chain_fetches_each_connection_once` replaced the assertions that 
pinned the old behaviour, so the suite no longer certifies the bugs.
   
   `_seed_connection` is a better answer than the `_preset_connections` route I 
suggested: it keeps the priming on your own class instead of routing it through 
a ContextVar. The two threads I never heard back on are fixed too, the fallback 
page now naming the JSON extra explicitly for the three-connection arithmetic.
   
   Nothing outstanding from me.


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