-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Allow omission of initial_node_count
if node_pools
is specified
#17820
Conversation
Apologies - I'll fix the static checks later today. I also have a second check I think i need to add to make sure you don't have both an initial node count AND nodepools |
Okay! This is ready. I got myself really tangled in some boolean logic but have since recovered 😅 |
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.
LGTM. However, I think that we can safely delete this validation and rely only on the server-side validation.
PS. Project ID should be optionally, because we can obtain a project ID from credential.
The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease. |
According to the API reference, the
initial_node_count
should not be used when you are configuringnode_pools
because you specify theinitial_node_count
within thenode_pools
object.This PR adds logic allowing either
initial_node_count
ORnode_pools
and updates test cases. I also refactored the test to make it more human readable because boolean logic makes me dizzy sometimes 😄