You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Taragolis (via GitHub)" <gi...@apache.org> on 2024/03/14 08:33:37 UTC
[PR] Bump minimum version of `blinker` add where it requires [airflow]
Taragolis opened a new pull request, #38140:
URL: https://github.com/apache/airflow/pull/38140
<!--
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.
-->
<!--
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/
-->
This library only use for Flask Signals (https://flask.palletsprojects.com/en/2.2.x/signals/), it is an optional dependency in Flask<=2.2, since 2.3 Signals always available and it become a core dependency for Flask
<!-- 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-docs/05_pull_requests.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] Bump minimum version of `blinker` add where it requires [airflow]
Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis merged PR #38140:
URL: https://github.com/apache/airflow/pull/38140
--
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] Bump minimum version of `blinker` add where it requires [airflow]
Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on code in PR #38140:
URL: https://github.com/apache/airflow/pull/38140#discussion_r1524877830
##########
airflow/sentry.py:
##########
@@ -55,9 +55,6 @@ def flush(self):
Sentry: DummySentry = DummySentry()
if conf.getboolean("sentry", "sentry_on", fallback=False):
import sentry_sdk
-
- # Verify blinker installation
- from blinker import signal # noqa: F401
Review Comment:
I spend a quite few time to find out why we need this dependency 🤣 because it is only use in this place in entire codebase. However for other PR found that we use in past some flask signals (maybe also now who knows).
So as soon as we could bump to Flask 2.3 (Connexion 3 and latest FAB required) we might remove it from core.
--
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] Bump minimum version of `blinker` add where it requires [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #38140:
URL: https://github.com/apache/airflow/pull/38140#discussion_r1524769170
##########
pyproject.toml:
##########
@@ -72,7 +72,9 @@ dependencies = [
"argcomplete>=1.10",
"asgiref",
"attrs>=22.1.0",
- "blinker",
+ # Blicker use for signals in Flask, this is an optional dependency in Flask 2.2 and lower.
Review Comment:
```suggestion
# Blinker use for signals in Flask, this is an optional dependency in Flask 2.2 and lower.
```
--
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] Bump minimum version of `blinker` add where it requires [airflow]
Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on code in PR #38140:
URL: https://github.com/apache/airflow/pull/38140#discussion_r1524456817
##########
pyproject.toml:
##########
@@ -72,7 +72,9 @@ dependencies = [
"argcomplete>=1.10",
"asgiref",
"attrs>=22.1.0",
- "blinker",
+ # Blicker use for signals in Flask, this is an optional dependency in Flask 2.2 and lower.
+ # In Flask 2.3 it becomes a mandatory dependency, and flask signals are always available.
+ "blinker>=1.6.2",
Review Comment:
```console
root@a01ad49f07db:/opt/airflow# pipdeptree --packages blinker -r
blinker==1.7.0
└── apache-airflow==2.9.0.dev0 [requires: blinker]
```
The min version taken from Flask 2.3 requires dependencies
##########
airflow/sentry.py:
##########
@@ -55,9 +55,6 @@ def flush(self):
Sentry: DummySentry = DummySentry()
if conf.getboolean("sentry", "sentry_on", fallback=False):
import sentry_sdk
-
- # Verify blinker installation
- from blinker import signal # noqa: F401
Review Comment:
This comes from PR: https://github.com/apache/airflow/pull/6365
Info from https://issues.apache.org/jira/browse/AIRFLOW-5694#
---
**Affects Version/s**: 1.10.6
**Fix Version/s**: 1.10.7
After upgrading to 1.10.6rc1 with `sentry-sdk` installed but not specifying the `[sentry]` extra, the dependency
`blinker` will cause failures of the following form:
``` console
../lib/python3.7/site-packages/airflow/__init__.py:40: in <module>
from airflow.models import DAG
../lib/python3.7/site-packages/airflow/models/__init__.py:21: in <module>
from airflow.models.baseoperator import BaseOperator # noqa: F401
../lib/python3.7/site-packages/airflow/models/baseoperator.py:42: in <module>
from airflow.models.dag import DAG
../lib/python3.7/site-packages/airflow/models/dag.py:51: in <module>
from airflow.models.taskinstance import TaskInstance, clear_task_instances
../lib/python3.7/site-packages/airflow/models/taskinstance.py:53: in <module>
from airflow.sentry import Sentry
../lib/python3.7/site-packages/airflow/sentry.py:167: in <module>
Sentry = ConfiguredSentry()
../lib/python3.7/site-packages/airflow/sentry.py:94: in __init__
init(integrations=integrations)
../lib/python3.7/site-packages/sentry_sdk/hub.py:81: in _init
client = Client(*args, **kwargs) # type: ignore
../lib/python3.7/site-packages/sentry_sdk/client.py:80: in __init__
self._init_impl()
../lib/python3.7/site-packages/sentry_sdk/client.py:108: in _init_impl
with_defaults=self.options["default_integrations"],
../lib/python3.7/site-packages/sentry_sdk/integrations/__init__.py:82: in setup_integrations
type(integration).setup_once()
../lib/python3.7/site-packages/sentry_sdk/integrations/flask.py:57: in setup_once
appcontext_pushed.connect(_push_appctx)
../lib/python3.7/site-packages/flask/signals.py:39: in _fail
"Signalling support is unavailable because the blinker"
E RuntimeError: Signalling support is unavailable because the blinker library is not installed.
```
##########
airflow/sentry.py:
##########
@@ -55,9 +55,6 @@ def flush(self):
Sentry: DummySentry = DummySentry()
if conf.getboolean("sentry", "sentry_on", fallback=False):
import sentry_sdk
-
- # Verify blinker installation
- from blinker import signal # noqa: F401
Review Comment:
Since some of the version it is become core dependency, so we do not need this "check", and in addition Sentry Flask Integration also validate is blinker installed or not
--
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] Bump minimum version of `blinker` add where it requires [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #38140:
URL: https://github.com/apache/airflow/pull/38140#discussion_r1524774852
##########
airflow/sentry.py:
##########
@@ -55,9 +55,6 @@ def flush(self):
Sentry: DummySentry = DummySentry()
if conf.getboolean("sentry", "sentry_on", fallback=False):
import sentry_sdk
-
- # Verify blinker installation
- from blinker import signal # noqa: F401
Review Comment:
Yeah. Cool. I will be looking soon at the `--resolution lowest` soon - so those kind of things should get automated (but I will do that after refactoring the ci.yaml - I do not want to make it even more complicated.
--
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] Bump minimum version of `blinker` add where it requires [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #38140:
URL: https://github.com/apache/airflow/pull/38140#issuecomment-1997366564
Small nit. Rebased as the build had temporary blip.
--
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