Add configurable watcher_build_coordinator_priority_weight making run build operator with priority#1989
Add configurable watcher_build_coordinator_priority_weight making run build operator with priority#1989pankajkoti wants to merge 10 commits into
watcher_build_coordinator_priority_weight making run build operator with priority#1989Conversation
✅ Deploy Preview for sunny-pastelito-5ecb04 canceled.
|
✅ Deploy Preview for sunny-pastelito-5ecb04 canceled.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1989 +/- ##
==========================================
+ Coverage 97.67% 97.78% +0.11%
==========================================
Files 87 87
Lines 5371 5463 +92
==========================================
+ Hits 5246 5342 +96
+ Misses 125 121 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4ca771f to
2176a5c
Compare
tatiana
left a comment
There was a problem hiding this comment.
Hi @pankajkoti !
Thanks for adding this.
Cosmos users are already overwhelmed with configurations. The implementation in c48cd85 gives users yet another configuration.
Let's decide on a priority for the runner task - which should be higher than the priority we set for the watcher tasks - and we can just hard-code them.
Ultimatelly, the problem we're trying to solve is to make sure the watchers do not start before the runner task - and hard-coding values would be good enough.
In this case, the configuration comes with a default value, so most users won’t ever need to touch it. By contrast, if we hard-code it, we leave no room for advanced users who actively use task priorities to adapt things to their deployment setup. This knob is really aimed at that group, not the average user. Airflow itself exposes a wide surface of configurations, and as long as we provide sensible defaults and good documentation, I don’t think the presence of this option adds friction. Users can safely ignore it unless they have a reason not to. That said, if there’s a strong consensus that it should be hard-coded, I’m okay to remove it as a configurable parameter — I just wanted to highlight the tradeoff for those advanced cases. |
|
Hi @pankajkoti , thanks for sharing the benefits of exposing this as a configuration. |
|
Closing in favour of #1995 |
The PR introduces
[cosmos] watcher_build_coordinator_priority_weightAirflow setting (default 9999) incosmos/settings.py.DbtBuildCoordinatorOperatornow reads this value and passes it toBaseOperator(priority_weight=…), ensuring the build-coordinator task runs before others.closes: #1959
closes: https://github.com/astronomer/oss-integrations-private/issues/237