-
Notifications
You must be signed in to change notification settings - Fork 259
[DRAFT] add cluster policy for cosmos #2293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[DRAFT] add cluster policy for cosmos #2293
Conversation
✅ Deploy Preview for astronomer-cosmos canceled.
|
|
Hi @astro-anand , this is really exciting! I get an impression we may be missing a file. Could you confirm, please? Regarding the circular dependency issue, I noticed the astronomer-cosmos/cosmos/operators/local.py Line 831 in 46d57ee
Could you give a try to move the import into the top of that function instead, and see if it works? |
|
Hey @tatiana, I changed the code but the circular import was then caused by a different import that eventually resolved to needing DAG. I noticed that the source of this issue is the cosmos init.py file. I set If I'm reading the logs correctly, Airflow installs plugins as part of initializing the airflow package (in its I suppose the cluster policy could set the cosmos configuration value to ensure that the imports resolve correctly, however, if users want to adopt the cluster policy they'd need to refactor all their cosmos imports to use the full import path. Do you think that's a fair ask? Update: I did some testing on the above, but I haven't figured out how to only conditionally load the plugin if the retry config exists. |
|
Hi @astro-anand, could you please check whether the changes here fix the circular import issue? I tested this locally and didn’t encounter circular import. |
Description
Adding a cluster policy that support retries on a different worker queue for watcher sensor tasks. This does not currently work due to a circular import issue when applying the cluster policy.
Breaking Change?
No
Checklist
current issues
Circular import - I think the cluster policy may need to be packaged separately