-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Add support for custom command and args in jobs #20864
Conversation
"default": [ | ||
"bash", | ||
"-c", | ||
"exec \\\nairflow {{ semverCompare \">=2.0.0\" .Values.airflowVersion | ternary \"users create\" \"create_user\" }} \"$@\"", | ||
"--", | ||
"-r", | ||
"{{ .Values.webserver.defaultUser.role }}", | ||
"-u", | ||
"{{ .Values.webserver.defaultUser.username }}", | ||
"-e", | ||
"{{ .Values.webserver.defaultUser.email }}", | ||
"-f", | ||
"{{ .Values.webserver.defaultUser.firstName }}", | ||
"-l", | ||
"{{ .Values.webserver.defaultUser.lastName }}", | ||
"-p", | ||
"{{ .Values.webserver.defaultUser.password }}" | ||
] |
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.
"default": [ | |
"bash", | |
"-c", | |
"exec \\\nairflow {{ semverCompare \">=2.0.0\" .Values.airflowVersion | ternary \"users create\" \"create_user\" }} \"$@\"", | |
"--", | |
"-r", | |
"{{ .Values.webserver.defaultUser.role }}", | |
"-u", | |
"{{ .Values.webserver.defaultUser.username }}", | |
"-e", | |
"{{ .Values.webserver.defaultUser.email }}", | |
"-f", | |
"{{ .Values.webserver.defaultUser.firstName }}", | |
"-l", | |
"{{ .Values.webserver.defaultUser.lastName }}", | |
"-p", | |
"{{ .Values.webserver.defaultUser.password }}" | |
] | |
"default": "See values.yaml" |
I almost did this, as this is a lot on the params page. Thoughts?
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.
no objection from me
separately, i looked at the params page, and it is pretty tough to navigate. probably there is a better way to present this information. and if that is done, maybe then it's more worthwhile to add.
Along these lines, from code dupe perspective, perhaps defaults could be scraped from values.yaml for the purpose of docs.
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.
Yeah, our docs is "easy", but artifacthub uses the schema alone, e.g:
With fresh eyes, we probably should be removing "See values.yaml" instead of adding more.
And good callout on the params being rough... It does indeed need some tlc.
Hmmm. do we really want that ? I'd rather fix any issues resulting from running standard commands here, otherwise it's not different from just adding a hook to run any job at any moment, which is kinda strange. |
This is one of the last places where we have differences between Airflow 1 and 2, and also don't support customization (which will allow us to more easily drop official support for 1). This also provides more flexibility for future args in these jobs. For example, even now some installs could utilize |
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. |
ecabe68
to
d630155
Compare
This allows custom command and args to be used for the database migration and create user jobs.