-
Notifications
You must be signed in to change notification settings - Fork 1
feat: airflow version upgrade #31
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
44745f2
b62affa
6ed0f7d
1218b6b
5078887
3c83a8b
889aae6
e0f041a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
|
|
||
| ## Compatibility | ||
|
|
||
| Apache Airflow 2.0.1+ | ||
| Apache Airflow 3.1.5+ | ||
|
|
||
| ## Usage | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,7 +2,6 @@ | |||||
|
|
||||||
| from airflow.sensors.base_sensor_operator import BaseSensorOperator | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The import
Suggested change
|
||||||
| from airflow.utils.db import provide_session | ||||||
| from airflow.utils.decorators import apply_defaults | ||||||
| from airflow.utils.state import State | ||||||
| from ergo.exceptions import ErgoFailedResultException | ||||||
| from ergo.models import ErgoJob, ErgoTask | ||||||
|
|
@@ -12,7 +11,6 @@ | |||||
| class ErgoJobResultSensor(BaseSensorOperator): | ||||||
| poke_context_fields = ('pusher_task_id', 'wait_for_state') | ||||||
|
|
||||||
| @apply_defaults | ||||||
| def __init__( | ||||||
| self, | ||||||
| pusher_task_id: str, | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,7 +3,6 @@ | |||||
| from airflow.sensors.base_sensor_operator import BaseSensorOperator | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The import
Suggested change
|
||||||
| from airflow.utils import timezone | ||||||
| from airflow.utils.db import provide_session | ||||||
| from airflow.utils.decorators import apply_defaults | ||||||
| from airflow.utils.state import State | ||||||
| from sqlalchemy import func, text | ||||||
|
|
||||||
|
|
@@ -32,7 +31,6 @@ class TaskRequestBatchSensor(BaseSensorOperator): | |||||
| filter_ergo_task = ErgoTask.state.in_( | ||||||
| [State.SCHEDULED, State.UP_FOR_RESCHEDULE]) | ||||||
|
|
||||||
| @apply_defaults | ||||||
| def __init__( | ||||||
| self, | ||||||
| max_requests: int, | ||||||
|
|
||||||
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.
The
DummyOperatorwas deprecated in Airflow 2.2 and removed in Airflow 3.0. It should be replaced withEmptyOperatorwhich is the official replacement operator.