You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "V0lantis (via GitHub)" <gi...@apache.org> on 2023/11/14 17:51:59 UTC
[PR] feat(helm): Add `enable` property to metric-exporter sidecar [airflow]
V0lantis opened a new pull request, #35633:
URL: https://github.com/apache/airflow/pull/35633
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
We have an issue with our Leboncoin's Airflow deployment where `metrics-exporter` sidecar was in `crashloopbackoff restart` because of its liveness probe. We figured out that we didn't need and want this container. Therefore, I am adding a property to let the user the choice if he wants to have `metrics-exporter`.
<!--
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/
-->
<!-- Please keep an empty line above the dashes. -->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
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](https://github.com/apache/airflow/tree/main/newsfragments).
--
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
Re: [PR] feat(helm): Add `enable` property to metric-exporter sidecar [airflow]
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on PR #35633:
URL: https://github.com/apache/airflow/pull/35633#issuecomment-1876289265
@V0lantis are you still working on this/
--
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
Re: [PR] feat(helm): Add `enable` property to metric-exporter sidecar [airflow]
Posted by "V0lantis (via GitHub)" <gi...@apache.org>.
V0lantis commented on PR #35633:
URL: https://github.com/apache/airflow/pull/35633#issuecomment-1881602249
Because when I am committing and the pre-commit hook runs, [`Lint Helm Chart` installs `k8s_env`](https://github.com/apache/airflow/blob/f3ddefccf610833dc8d6012431f372f2af03053c/scripts/ci/pre_commit/pre_commit_helm_lint.py#L30) which executes `breeze k8s setup-env`. it turns out that the python version is 3.12 and it throws the following error:
```log
Building wheels for collected packages: apache-airflow, pendulum
Building editable for apache-airflow (pyproject.toml): started
Building editable for apache-airflow (pyproject.toml): finished with status 'done'
Created wheel for apache-airflow: filename=apache_airflow-2.9.0.dev0-0.editable-py3-none-any.whl size=129750 sha256=030894410d404ce081fd811c67b713e41d33e898fea190cd2c15bde71dcdfe85
Stored in directory: /private/var/folders/rb/dkcwwl_51pv8yh5vd8wywxf80000gq/T/pip-ephem-wheel-cache-33hlscda/wheels/c5/a9/7b/21a3e656b79c8d90369c79799d745d095c8eb3da3affef1b94
Building wheel for pendulum (pyproject.toml): started
Building wheel for pendulum (pyproject.toml): finished with status 'error'
Successfully built apache-airflow
Failed to build pendulum
error: subprocess-exited-with-error
× Building wheel for pendulum (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
Traceback (most recent call last):
File "/private/var/folders/rb/dkcwwl_51pv8yh5vd8wywxf80000gq/T/pip-install-_4kirwme/pendulum_6943150a2a76432098ed35c3a1c3de3d/build.py", line 5, in <module>
from distutils.command.build_ext import build_ext
ModuleNotFoundError: No module named 'distutils'
Traceback (most recent call last):
File "/Users/arthur.volant/workspace/github/airflow/.build/.k8s-env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/Users/arthur.volant/workspace/github/airflow/.build/.k8s-env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/arthur.volant/workspace/github/airflow/.build/.k8s-env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/rb/dkcwwl_51pv8yh5vd8wywxf80000gq/T/pip-build-env-7j_npl5e/overlay/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 58, in build_wheel
return WheelBuilder.make_in(
^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/rb/dkcwwl_51pv8yh5vd8wywxf80000gq/T/pip-build-env-7j_npl5e/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 88, in make_in
wb.build(target_dir=directory)
File "/private/var/folders/rb/dkcwwl_51pv8yh5vd8wywxf80000gq/T/pip-build-env-7j_npl5e/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 123, in build
self._build(zip_file)
File "/private/var/folders/rb/dkcwwl_51pv8yh5vd8wywxf80000gq/T/pip-build-env-7j_npl5e/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 172, in _build
self._run_build_script(self._package.build_script)
File "/private/var/folders/rb/dkcwwl_51pv8yh5vd8wywxf80000gq/T/pip-build-env-7j_npl5e/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 266, in _run_build_script
subprocess.check_call()
File "/opt/homebrew/Cellar/python@3.12/3.12.1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/arthur.volant/workspace/github/airflow/.build/.k8s-env/bin/python', 'build.py']' returned non-zero exit status 1.
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pendulum
ERROR: Could not build wheels for pendulum, which is required to install pyproject.toml-based projects
```
--
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
Re: [PR] feat(helm): Add `enable` property to metric-exporter sidecar [airflow]
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on code in PR #35633:
URL: https://github.com/apache/airflow/pull/35633#discussion_r1396860530
##########
chart/values.yaml:
##########
@@ -2030,6 +2030,7 @@ pgbouncer:
command: ["/bin/sh", "-c", "killall -INT pgbouncer && sleep 120"]
metricsExporterSidecar:
+ enabled: false
Review Comment:
Can we set the default to true? It is a change in behaviour and might break backward compatibility
--
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
Re: [PR] feat(helm): Add `enable` property to metric-exporter sidecar [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #35633:
URL: https://github.com/apache/airflow/pull/35633#issuecomment-1881864913
Nicer diagnostics for that case and instructions how to reinstall breeze with lower python version: https://github.com/apache/airflow/pull/36673 @V0lantis
<img width="754" alt="Screenshot 2024-01-08 at 22 34 18" src="https://github.com/apache/airflow/assets/595491/4930258f-4795-4141-8978-4ac4dc749437">
It will have 3.12 python - and 3.13 once we support 3.12 - should be future proof.
--
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
Re: [PR] feat(helm): Add `enable` property to metric-exporter sidecar [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #35633: feat(helm): Add `enable` property to metric-exporter sidecar
URL: https://github.com/apache/airflow/pull/35633
--
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
Re: [PR] feat(helm): Add `enable` property to metric-exporter sidecar [airflow]
Posted by "jedcunningham (via GitHub)" <gi...@apache.org>.
jedcunningham commented on code in PR #35633:
URL: https://github.com/apache/airflow/pull/35633#discussion_r1393057315
##########
chart/values.schema.json:
##########
@@ -6086,6 +6086,11 @@
"x-docsSection": "PgBouncer",
"additionalProperties": false,
"properties": {
+ "enabled": {
+ "description": "Enable PgBouncer metric exporter sidecar.",
+ "type": "boolean",
+ "default": false
Review Comment:
We should default this to true for backcompat reasons.
--
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
Re: [PR] feat(helm): Add `enable` property to metric-exporter sidecar [airflow]
Posted by "V0lantis (via GitHub)" <gi...@apache.org>.
V0lantis commented on PR #35633:
URL: https://github.com/apache/airflow/pull/35633#issuecomment-1881503659
Updated with some tests. Couldn't tests everything because it seems there is some issue with pendulum installation and py3.12 https://github.com/sdispater/pendulum/issues/457#issuecomment-1846891180
--
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
Re: [PR] feat(helm): Add `enable` property to metric-exporter sidecar [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #35633:
URL: https://github.com/apache/airflow/pull/35633#issuecomment-1881825386
Make sure to setup global Python < 3.12 as your global Python version
--
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
Re: [PR] feat(helm): Add `enable` property to metric-exporter sidecar [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on PR #35633:
URL: https://github.com/apache/airflow/pull/35633#issuecomment-1881556126
> Updated with some tests. Couldn't tests everything because it seems there is some issue with pendulum installation and py3.12 [sdispater/pendulum#457 (comment)](https://github.com/sdispater/pendulum/issues/457#issuecomment-1846891180)
We don't yet support Python 3.12 https://github.com/apache/airflow/issues/36546#issuecomment-1875141571
Why does this limit your testing?
--
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
Re: [PR] feat(helm): Add `enable` property to metric-exporter sidecar [airflow]
Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on code in PR #35633:
URL: https://github.com/apache/airflow/pull/35633#discussion_r1393074974
##########
chart/values.schema.json:
##########
@@ -6086,6 +6086,11 @@
"x-docsSection": "PgBouncer",
"additionalProperties": false,
"properties": {
+ "enabled": {
+ "description": "Enable PgBouncer metric exporter sidecar.",
+ "type": "boolean",
+ "default": false
Review Comment:
+1
##########
chart/values.yaml:
##########
@@ -2030,6 +2030,7 @@ pgbouncer:
command: ["/bin/sh", "-c", "killall -INT pgbouncer && sleep 120"]
metricsExporterSidecar:
+ enabled: false
Review Comment:
Definitely, default value should be true to keep it b/c.
--
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
Re: [PR] feat(helm): Add `enable` property to metric-exporter sidecar [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35633:
URL: https://github.com/apache/airflow/pull/35633#issuecomment-2027836355
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your 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
Re: [PR] feat(helm): Add `enable` property to metric-exporter sidecar [airflow]
Posted by "V0lantis (via GitHub)" <gi...@apache.org>.
V0lantis commented on PR #35633:
URL: https://github.com/apache/airflow/pull/35633#issuecomment-1937827244
Hello,
Run the tests and all seem to be good. Thanks @potiuk for the speedy reaction time !
--
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
Re: [PR] feat(helm): Add `enable` property to metric-exporter sidecar [airflow]
Posted by "V0lantis (via GitHub)" <gi...@apache.org>.
V0lantis commented on PR #35633:
URL: https://github.com/apache/airflow/pull/35633#issuecomment-1876732241
Thank-you for the poke. I need to find the time to get into it soon. Will try to do it soon
--
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