uranusjr commented on PR #74915:
URL: https://github.com/apache/airflow/pull/74915#issuecomment-6728794465

   My concern is how "reload mode" is put into the code. The code makes it a 
condition that call sites check, not a thing that is modelled. I would prefer 
it be done by modelling the source as an object and giving consumers a resolved 
context. Add a private interface with two implementations (static vs 
reloadable) as mentioned in the inline comment. The source is chosen once per 
process and owns the accepted snapshot, the throttle and the miss cache.
   
   `DagBundlesManager` asks the source and never builds another manager. 
Consumers get one typed per-bundle object, e.g. 
`BundleParseContext(importer_registry, team_name)`. The same model goes over 
the wire as `bundle_config`, so the Go and TS schemas get a real type instead 
of `additionalProperties: true`. The mode checks become polymorphic dispatch, 
and the "nothing passed" fallbacks go away.


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