Skip to content

Commit 6bed264

Browse files
authored
Merge branch 'main' into fix-k8s-executor-transient-retry
2 parents a767737 + 4e4d060 commit 6bed264

56 files changed

Lines changed: 813 additions & 47 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

INTHEWILD.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ Currently, **officially** using Airflow:
286286
1. [HotelQuickly](https://github.com/HotelQuickly) [[@zinuzoid](https://github.com/zinuzoid)]
287287
1. [Hotstar](https://hotstar.com)
288288
1. [HP Inc](https://www.hp.com/) [[@hpinc](https://github.com/HPInc)]
289+
1. [HSBC](https://www.hsbc.com/) [[@MukundKularni](https://github.com/MukundKulkarni)]
289290
1. [Huq Industries](https://huq.io) [[@huqindustries](https://github.com/huq-industries), [@alepuccetti](https://github.com/alepuccetti), [@turbomerl](https://github.com/turbomerl)]
290291
1. [Hurb](https://hurb.com/) [[@hurbcom](https://github.com/hurbcom)]
291292
1. [Idrica](https://www.idrica.com/) [[@xavipuerto](https://github.com/xavipuerto)]
@@ -597,6 +598,7 @@ Currently, **officially** using Airflow:
597598
1. [Zenly](https://zen.ly) [[@cerisier](https://github.com/cerisier) & [@jbdalido](https://github.com/jbdalido)]
598599
1. [Zerodha](https://zerodha.com/) [[@johnnybravo-xyz](https://github.com/johnnybravo-xyz)]
599600
1. [Zomato](https://www.zomato.com/) [[@zomato](https://github.com/zomato)]
601+
1. [Zoom](https://www.zoom.com/) [[@singhAbhishek16](https://github.com/singhAbhishek16)]
600602
1. [Zymergen](https://www.zymergen.com/)
601603
1. [Zynga](https://www.zynga.com)
602604
1. [Ørsted](https://orsted.com/en) [[@arjunanan6](https://github.com/arjunanan6)]

airflow-core/docs/core-concepts/params.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,11 @@ The following features are supported in the Trigger UI Form:
253253
* ``format="multiline"``: Generate a multi-line textarea
254254
* | ``enum=["a", "b", "c"]``: Generates a
255255
| drop-down select list for scalar values.
256+
| If the choices come from an external config file,
257+
| read that file while the Dag is parsed and pass the
258+
| resulting list to ``enum``; the trigger form reads
259+
| the serialized Dag Params and does not call dynamic
260+
| choice providers when the form opens.
256261
| As of JSON validation, a value must be
257262
| selected or the field must be marked as
258263
| optional explicit. See also details inside
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
[InterfaceA]
19+
TYPE = Script
20+
21+
[InterfaceB]
22+
TYPE = EBICS
23+
24+
[InterfaceC]
25+
TYPE = Script

airflow-core/src/airflow/example_dags/example_params_ui_tutorial.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,23 @@
2323

2424
from __future__ import annotations
2525

26+
import configparser
2627
import datetime
2728
import json
2829
from pathlib import Path
2930

3031
from airflow.sdk import DAG, Param, task
3132

33+
34+
def _get_script_interfaces_from_config() -> list[str]:
35+
config = configparser.ConfigParser()
36+
config.read(Path(__file__).with_name("example_params_ui_interfaces.ini"))
37+
38+
return [section for section in config.sections() if config[section].get("TYPE") == "Script"]
39+
40+
41+
SCRIPT_INTERFACES = _get_script_interfaces_from_config()
42+
3243
with DAG(
3344
dag_id=Path(__file__).stem,
3445
dag_display_name="Params UI tutorial",
@@ -75,6 +86,19 @@
7586
enum=[f"value {i}" for i in range(16, 64)],
7687
section="Typed parameters with Param object",
7788
),
89+
"script_interface": Param(
90+
SCRIPT_INTERFACES[0],
91+
description="Choices are generated from example_params_ui_interfaces.ini at Dag parse time.",
92+
schema={
93+
"type": "string",
94+
"title": "Script interface",
95+
"enum": SCRIPT_INTERFACES,
96+
"values_display": {
97+
name: name.replace("Interface", "Interface ") for name in SCRIPT_INTERFACES
98+
},
99+
"section": "Typed parameters with Param object",
100+
},
101+
),
78102
# [END section_1]
79103
# Boolean as proper parameter with description
80104
"bool": Param(

airflow-core/src/airflow/ui/src/components/AdvancedSearchToggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const AdvancedSearchToggle = ({
3737
size = "sm",
3838
variant = "standalone",
3939
}: AdvancedSearchToggleProps) => {
40-
const { t: translate } = useTranslation("common");
40+
const { t: translate } = useTranslation();
4141

4242
return (
4343
<Tooltip

airflow-core/src/airflow/ui/src/components/AssetExpression/AndGateNode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { useTranslation } from "react-i18next";
2222
import { TbLogicAnd } from "react-icons/tb";
2323

2424
export const AndGateNode = ({ children }: PropsWithChildren) => {
25-
const { t: translate } = useTranslation("common");
25+
const { t: translate } = useTranslation();
2626

2727
return (
2828
<Box

airflow-core/src/airflow/ui/src/components/AssetExpression/AssetExpression.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const AssetExpression = ({
3535
readonly events?: Array<NextRunAssetEventResponse>;
3636
readonly expression: ExpressionType | undefined;
3737
}) => {
38-
const { t: translate } = useTranslation("common");
38+
const { t: translate } = useTranslation();
3939

4040
if (expression === undefined) {
4141
return undefined;

airflow-core/src/airflow/ui/src/components/Assets/TriggeredRuns.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const DagRunGroup = ({
3535
readonly dagRuns: Array<DagRunAssetReference>;
3636
readonly prefix: string;
3737
}) => {
38-
const { t: translate } = useTranslation("common");
38+
const { t: translate } = useTranslation();
3939

4040
return dagRuns.length === 1 ? (
4141
<Flex flexWrap="wrap" gap={1}>

airflow-core/src/airflow/ui/src/components/ConfirmationModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type Props = {
3030
};
3131

3232
export const ConfirmationModal = ({ children, header, onConfirm, onOpenChange, open }: Props) => {
33-
const { t: translate } = useTranslation("common");
33+
const { t: translate } = useTranslation();
3434

3535
return (
3636
<Modal

airflow-core/src/airflow/ui/src/components/DagRunInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type Props = {
3535
};
3636

3737
const DagRunInfo = ({ endDate, logicalDate, runAfter, startDate, state }: Props) => {
38-
const { t: translate } = useTranslation("common");
38+
const { t: translate } = useTranslation();
3939

4040
return (
4141
<Tooltip

0 commit comments

Comments
 (0)