You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Francesko90 (via GitHub)" <gi...@apache.org> on 2023/06/13 08:53:12 UTC
[GitHub] [airflow] Francesko90 opened a new pull request, #31868: Runtime class name
Francesko90 opened a new pull request, #31868:
URL: https://github.com/apache/airflow/pull/31868
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
---
**^ Runtime class name**
Currently, there is no possibility to add runtime class name to worker pod, In my case is necessary to use NVIDIA runtime as class name to use NVIDIA driver and GPU for this reason I thought to add runtimeClassName to helm chart for worker deployment
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] amoghrajesh commented on a diff in pull request #31868: Runtime class name
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on code in PR #31868:
URL: https://github.com/apache/airflow/pull/31868#discussion_r1250962465
##########
tests/charts/airflow_core/test_worker.py:
##########
@@ -373,6 +373,17 @@ def test_should_create_default_affinity(self):
docs[0],
)
+ def test_runtime_class_name_values_are_configurable(self):
+ docs = render_chart(
+ values={
+ "workers": {"runtimeClassName": "nvidia"},
+ },
+ show_only=["templates/workers/worker-deployment.yaml"],
+ )
+
+ runtimeclassname = jmespath.search("spec.template.spec.runtimeClassName", docs[0])
+ assert runtimeclassname == "nvidia"
Review Comment:
You can just do an `assert jmespath.search("spec.template.spec.runtimeClassName", docs[0]) == "nvidia"` here
##########
chart/values.yaml:
##########
@@ -2056,36 +2062,36 @@ config:
# `run_duration` included for Airflow 1.10 backward compatibility; removed in 2.0.
run_duration: 41460
elasticsearch:
- json_format: 'True'
+ json_format: "True"
log_id_template: "{dag_id}_{task_id}_{execution_date}_{try_number}"
elasticsearch_configs:
max_retries: 3
timeout: 30
- retry_timeout: 'True'
+ retry_timeout: "True"
kerberos:
- keytab: '{{ .Values.kerberos.keytabPath }}'
- reinit_frequency: '{{ .Values.kerberos.reinitFrequency }}'
- principal: '{{ .Values.kerberos.principal }}'
- ccache: '{{ .Values.kerberos.ccacheMountPath }}/{{ .Values.kerberos.ccacheFileName }}'
+ keytab: "{{ .Values.kerberos.keytabPath }}"
+ reinit_frequency: "{{ .Values.kerberos.reinitFrequency }}"
+ principal: "{{ .Values.kerberos.principal }}"
+ ccache: "{{ .Values.kerberos.ccacheMountPath }}/{{ .Values.kerberos.ccacheFileName }}"
celery_kubernetes_executor:
- kubernetes_queue: 'kubernetes'
+ kubernetes_queue: "kubernetes"
Review Comment:
Were all these changes from single quotes to double quotes done by mistake? Looks to me as if the editor did it.
##########
chart/values.yaml:
##########
@@ -1950,7 +1951,12 @@ cleanup:
# Command to use when running the cleanup cronjob (templated).
command: ~
# Args to use when running the cleanup cronjob (templated).
- args: ["bash", "-c", "exec airflow kubernetes cleanup-pods --namespace={{ .Release.Namespace }}"]
+ args:
+ [
+ "bash",
+ "-c",
+ "exec airflow kubernetes cleanup-pods --namespace={{ .Release.Namespace }}",
+ ]
Review Comment:
Same comment as below
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] jedcunningham commented on pull request #31868: Runtime class name
Posted by "jedcunningham (via GitHub)" <gi...@apache.org>.
jedcunningham commented on PR #31868:
URL: https://github.com/apache/airflow/pull/31868#issuecomment-1590389960
Also don't forget to add this to `values.yaml` and `files/pod-template-file.kubernetes-helm-yaml`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Francesko90 commented on pull request #31868: Runtime class name
Posted by "Francesko90 (via GitHub)" <gi...@apache.org>.
Francesko90 commented on PR #31868:
URL: https://github.com/apache/airflow/pull/31868#issuecomment-1604437862
I updated `values.yaml` and `files/pod-template-file.kubernetes-helm-yaml.`
I created unit test but I'm not sure that it is correct, let me know if there are any problem,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk merged pull request #31868: Runtime class name
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #31868:
URL: https://github.com/apache/airflow/pull/31868
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on pull request #31868: Runtime class name
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #31868:
URL: https://github.com/apache/airflow/pull/31868#issuecomment-1588846632
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)
Here are some useful points:
- Pay attention to the quality of your code (ruff, mypy and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/main/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks) will help you with that.
- In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/docs/apache-airflow/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/BREEZE.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
- Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
- Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
- Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#coding-style-and-best-practices).
Apache Airflow is a community-driven project and together we are making it better 🚀.
In case of doubts contact the developers at:
Mailing List: dev@airflow.apache.org
Slack: https://s.apache.org/airflow-slack
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Francesko90 commented on a diff in pull request #31868: Runtime class name
Posted by "Francesko90 (via GitHub)" <gi...@apache.org>.
Francesko90 commented on code in PR #31868:
URL: https://github.com/apache/airflow/pull/31868#discussion_r1250985992
##########
chart/values.yaml:
##########
@@ -2056,36 +2062,36 @@ config:
# `run_duration` included for Airflow 1.10 backward compatibility; removed in 2.0.
run_duration: 41460
elasticsearch:
- json_format: 'True'
+ json_format: "True"
log_id_template: "{dag_id}_{task_id}_{execution_date}_{try_number}"
elasticsearch_configs:
max_retries: 3
timeout: 30
- retry_timeout: 'True'
+ retry_timeout: "True"
kerberos:
- keytab: '{{ .Values.kerberos.keytabPath }}'
- reinit_frequency: '{{ .Values.kerberos.reinitFrequency }}'
- principal: '{{ .Values.kerberos.principal }}'
- ccache: '{{ .Values.kerberos.ccacheMountPath }}/{{ .Values.kerberos.ccacheFileName }}'
+ keytab: "{{ .Values.kerberos.keytabPath }}"
+ reinit_frequency: "{{ .Values.kerberos.reinitFrequency }}"
+ principal: "{{ .Values.kerberos.principal }}"
+ ccache: "{{ .Values.kerberos.ccacheMountPath }}/{{ .Values.kerberos.ccacheFileName }}"
celery_kubernetes_executor:
- kubernetes_queue: 'kubernetes'
+ kubernetes_queue: "kubernetes"
Review Comment:
Sorry about that; I think that is the fault of Linter.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on pull request #31868: Runtime class name
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #31868:
URL: https://github.com/apache/airflow/pull/31868#issuecomment-1620726293
Awesome work, congrats on your first merged pull request! You are invited to check our [Issue Tracker](https://github.com/apache/airflow/issues) for additional contributions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org