No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
9066f14
... +12 ...
d93a36a
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
28 | 28 | from airflow.exceptions import AirflowNotFoundException |
|
29 | 29 | from airflow.hooks.base import BaseHook |
|
30 | 30 | from airflow.models import Connection |
|
31 | - | from airflow.secrets.local_filesystem import _parse_secret_file |
|
31 | + | from airflow.secrets.local_filesystem import load_connections_dict |
|
32 | 32 | from airflow.utils import cli as cli_utils, yaml |
|
33 | 33 | from airflow.utils.cli import suppress_logs_and_warning |
|
34 | 34 | from airflow.utils.session import create_session |
247 | 247 | ||
248 | 248 | def _import_helper(file_path): |
|
249 | 249 | """Load connections from a file and save them to the DB. On collision, skip.""" |
|
250 | - | connections_dict = _parse_secret_file(file_path) |
|
250 | + | connections_dict = load_connections_dict(file_path) |
|
251 | 251 | with create_session() as session: |
|
252 | - | for conn_id, conn_dict in connections_dict.items(): |
|
252 | + | for conn_id, conn in connections_dict.items(): |
|
253 | 253 | if session.query(Connection).filter(Connection.conn_id == conn_id).first(): |
|
254 | 254 | print(f'Could not import connection {conn_id}: connection already exists.') |
|
255 | 255 | continue |
|
256 | 256 | ||
257 | - | # Add the connection to the DB |
|
258 | - | connection = Connection(conn_id, **dict(conn_dict.items())) |
|
259 | - | session.add(connection) |
|
257 | + | session.add(conn) |
|
260 | 258 | session.commit() |
|
261 | 259 | print(f'Imported connection {conn_id}') |
41 | 41 | ||
42 | 42 | """ |
|
43 | 43 | ||
44 | + | conn_name_attr = 'opsgenie_conn_id' |
|
45 | + | default_conn_name = 'opsgenie_default' |
|
46 | + | conn_type = 'opsgenie' |
|
47 | + | hook_name = 'Opsgenie' |
|
48 | + | ||
44 | 49 | def __init__(self, opsgenie_conn_id: str = 'opsgenie_default', *args, **kwargs) -> None: |
|
45 | 50 | super().__init__(http_conn_id=opsgenie_conn_id, *args, **kwargs) # type: ignore[misc] |
|
46 | 51 |
Learn more Showing 10 files with coverage changes found.
airflow/providers/dingding/hooks/dingding.py
airflow/providers/discord/hooks/discord_webhook.py
airflow/providers/slack/hooks/slack_webhook.py
airflow/executors/base_executor.py
airflow/utils/dag_processing.py
airflow/providers/airbyte/hooks/airbyte.py
airflow/jobs/backfill_job.py
airflow/providers/opsgenie/hooks/opsgenie_alert.py
airflow/cli/commands/webserver_command.py
airflow/task/task_runner/base_task_runner.py
Files | Coverage |
---|---|
cloudwatch_task_handler.py | 100.00% |
colored_log.py | 50.00% |
es_task_handler.py | 100.00% |
file_processor_handler.py | 94.11% |
file_task_handler.py | 76.78% |
gcs_task_handler.py | 100.00% |
json_formatter.py | 90.32% |
log_reader.py | 100.00% |
logging_mixin.py | 97.26% |
s3_task_handler.py | 100.00% |
secrets_masker.py | 94.89% |
stackdriver_task_handler.py | 100.00% |
wasb_task_handler.py | 100.00% |
Folder Totals (13 files) | 86.84% |
Project Totals (1243 files) | 88.44% |
#15425
d93a36a
bacd4a0
6fd9c01
a2bd872
f684ced
a7e1f7a
9c80bfb
4ea78f8
4c50110
23e4391
3beae71
10ed42a
2c6b003
#15425
9066f14