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
Added ability to enable/disable scheduler and webserver #36991
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
I am not sure we want it. If you reallly want to do worker-only deployment, you should create your own helm/resources -that will be way simpler and our chart is not meant to be as versatile to support such cases. cc: @jedcunningham @ephraimbuddy - WDYT? |
@potiuk I've actually come around to this idea over time. You can sorta do it today with scaling those components to 0, but you end up with all that stuff in k8s anyways. Plus it also can help with the worker queues problem (#34219) - not super gracefully, mind you, but better than roll your own certainly, as you can just use multiple values files to keep it sane. I don't see this as being materially different than some of the other advanced stuff we expose to our users already. |
Fine for me then - if we are ready to support those cases :). I actually like it if we do it because this might help in some of the future descriptions of multi-tenant deployment. I initially thought that we do not want to make anything about Hel Chart with multitenancy, but actually now that you wrote it - it seems pretty plausible for anyone doing future multi-tenancy setup to do it by composing multiple charts. So yeah. I see how it can be useful if we want to support it. It would be good however maybe in this case to add a bit of documentation about that case - for example describe a few deployments (like the multiple queue case) to explain users what our intention is with those parameters. @kajanajustin - would you be open to add a short description of potential use cases for those parameters ? Maybe in "Production Guide" part of the docs: https://airflow.apache.org/docs/helm-chart/stable/production-guide.html ? |
We also need test coverage for this 👍. |
@potiuk @jedcunningham Let me know what you guys think about the doc edits I made. Let me know if I need to add any additional descriptions |
Minimal, but good enough for me :) . Still a few tests would be needed to approve that one. |
@potiuk anything else needed from me at this time? I assume you guys have the testing handled from here |
No - unit tests are always part of the PRs. We have separately run tests for the helm chart in Our contributig guide is currently not properly rendered by github, but I have a PR in progress where all the contributing docs ( are nicely split to smaller docs, so you can see the docs nicely rendering here https://github.com/apache/airflow/blob/refactor-contributing-docs/contributing-docs/testing/helm_unit_tests.rst and you can look at other tests in |
also you have static checks failing and you should fix them. For that you can take a look at this split doc in my PR https://github.com/apache/airflow/blob/refactor-contributing-docs/contributing-docs/08_static_code_checks.rst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just need a test per resource to ensure that it is not created when the enabled value is false.
@hussein-awala how do we go about testing that? |
That's what I described in #36991 (comment) |
@hussein-awala @potiuk added additional unit tests, let me know if there's anything else you guys need to see |
@potiuk @jedcunningham static checks and the test_can_be_disabled for the scheduler were failing so I added a new class for the function. Let me know if you think everything looks good so we can merge this in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, wondering if we should add tests to the other k8s objects that are deployed if shceduler / webserver flags are turned on.
@jedcunningham what else needs to be updated here? I see some checks are still failing anything needed from me to merge this? |
I'm pretty sure those failures aren't related to your change, but I need to look into a little closer before I can ignore them. Also, we need to handle the comment discussion. |
Rebvased it. Those were issues connected with yesterday's "google-core-api" relase brekaing compatibility (we workarounded it but also they fixed it this morning with 2.16.1 release after we raised the bug. |
@jedcunningham comment has been removed can we merge this in |
@potiuk @jedcunningham dont want this to get stale and want to use this on the next helm chart release. Can we merge this in? Looks like everyone has approved who had comments before |
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Thanks @kajanajustin! Congrats on your first commit 🎉 |
@jedcunningham thank you for all your help! |
--------- Co-authored-by: Elad Kalif <45845474+eladkal@users.noreply.github.com> Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
Adding the ability to enable and disable the scheduler and webserver if you just want to run just workers in kubernetes. This change adds the enabled boolean in both the scheduler and webserver sections of the values.yaml file
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.