JH-A-Kim commented on PR #68106:
URL: https://github.com/apache/airflow/pull/68106#issuecomment-4745872559

   > > Assuming the code is updated to enforce the decoder's message 
allow-list, I don't see your objection.
   > 
   > I'll re-review it once that exists, but as it stands today this "registry" 
concept strikes me as massively over complicating things.
   
   To resolve this, I leveraged the pre-existing Annotated message unions to 
make a strict gate. I added a _msg_union class variable and a class method to 
WatchedSubprocess that unpacks the union into a frozenset of allowed message 
types. Each child process simply overrides the _msg_union with its specific 
union set (e.g., ToSupervisor). Finally, WatchedSubprocess._handle_request uses 
this set to validate incoming messages, immediately logging an error and 
rejecting any unhandled types before they ever reach the dispatcher.


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