Skip to content

Commit

Permalink
fixup! Removed the ability for Operators to specify their own "schedu…
Browse files Browse the repository at this point in the history
…ling deps".
  • Loading branch information
ashb committed Jan 16, 2025
1 parent 0682ab7 commit b95242f
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 26 deletions.
1 change: 0 additions & 1 deletion airflow/api_fastapi/core_api/datamodels/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class PluginResponse(BaseModel):
global_operator_extra_links: list[str]
operator_extra_links: list[str]
source: Annotated[str, BeforeValidator(coerce_to_string)]
ti_deps: list[Annotated[str, BeforeValidator(coerce_to_string)]]
listeners: list[str]
timetables: list[str]

Expand Down
6 changes: 0 additions & 6 deletions airflow/api_fastapi/core_api/openapi/v1-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8699,11 +8699,6 @@ components:
source:
type: string
title: Source
ti_deps:
items:
type: string
type: array
title: Ti Deps
listeners:
items:
type: string
Expand All @@ -8725,7 +8720,6 @@ components:
- global_operator_extra_links
- operator_extra_links
- source
- ti_deps
- listeners
- timetables
title: PluginResponse
Expand Down
8 changes: 0 additions & 8 deletions airflow/ui/openapi-gen/requests/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3649,13 +3649,6 @@ export const $PluginResponse = {
type: "string",
title: "Source",
},
ti_deps: {
items: {
type: "string",
},
type: "array",
title: "Ti Deps",
},
listeners: {
items: {
type: "string",
Expand All @@ -3682,7 +3675,6 @@ export const $PluginResponse = {
"global_operator_extra_links",
"operator_extra_links",
"source",
"ti_deps",
"listeners",
"timetables",
],
Expand Down
1 change: 0 additions & 1 deletion airflow/ui/openapi-gen/requests/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,6 @@ export type PluginResponse = {
global_operator_extra_links: Array<string>;
operator_extra_links: Array<string>;
source: string;
ti_deps: Array<string>;
listeners: Array<string>;
timetables: Array<string>;
};
Expand Down
10 changes: 0 additions & 10 deletions tests/api_connexion/endpoints/test_plugin_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from flask_appbuilder import BaseView

from airflow.plugins_manager import AirflowPlugin
from airflow.ti_deps.deps.base_ti_dep import BaseTIDep
from airflow.timetables.base import Timetable
from airflow.utils.module_loading import qualname

Expand Down Expand Up @@ -64,13 +63,6 @@ class MockView(BaseView): ...
}


class CustomTIDep(BaseTIDep):
pass


ti_dep = CustomTIDep()


class CustomTimetable(Timetable):
def infer_manual_data_interval(self, *, run_after):
pass
Expand All @@ -97,7 +89,6 @@ class MockPlugin(AirflowPlugin):
global_operator_extra_links = [MockOperatorLink()]
operator_extra_links = [MockOperatorLink()]
macros = [plugin_macro]
ti_deps = [ti_dep]
timetables = [CustomTimetable]
listeners = [pytest, MyCustomListener()] # using pytest here because we need a module(just for test)

Expand Down Expand Up @@ -156,7 +147,6 @@ def test_get_plugins_return_200(self):
"source": None,
"name": "test_plugin",
"timetables": [qualname(CustomTimetable)],
"ti_deps": [str(ti_dep)],
"listeners": [
d.__name__ if inspect.ismodule(d) else qualname(d)
for d in [pytest, MyCustomListener()]
Expand Down

0 comments on commit b95242f

Please sign in to comment.