This is an automated email from the ASF dual-hosted git repository.
vincbeck pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new fa055dba61e refactor: word changed from DAG to Dag in
providers/amazon/ (#66152)
fa055dba61e is described below
commit fa055dba61e1ed76d5f43eadfd235c4f8cc23216
Author: hojeong park <[email protected]>
AuthorDate: Fri May 1 03:09:21 2026 +0900
refactor: word changed from DAG to Dag in providers/amazon/ (#66152)
---
providers/amazon/docs/operators/sagemaker.rst | 2 +-
.../src/airflow/providers/amazon/aws/bundles/s3.py | 30 +++++++++++-----------
.../providers/amazon/aws/executors/Dockerfile | 20 +++++++--------
.../aws/executors/aws_lambda/docker/Dockerfile | 10 ++++----
.../amazon/aws/executors/aws_lambda/docker/app.py | 4 +--
.../amazon/aws/executors/batch/batch_executor.py | 4 +--
.../airflow/providers/amazon/aws/hooks/base_aws.py | 2 +-
.../providers/amazon/aws/operators/appflow.py | 2 +-
.../providers/amazon/aws/operators/comprehend.py | 2 +-
.../airflow/providers/amazon/aws/operators/emr.py | 2 +-
.../airflow/providers/amazon/aws/operators/mwaa.py | 22 ++++++++--------
.../providers/amazon/aws/operators/sagemaker.py | 4 +--
.../airflow/providers/amazon/aws/sensors/mwaa.py | 28 ++++++++++----------
.../airflow/providers/amazon/aws/triggers/mwaa.py | 24 ++++++++---------
.../tests/unit/amazon/aws/bundles/test_s3.py | 4 +--
.../tests/unit/amazon/aws/links/test_base_aws.py | 4 +--
.../tests/unit/amazon/aws/sensors/test_mwaa.py | 4 +--
17 files changed, 84 insertions(+), 84 deletions(-)
diff --git a/providers/amazon/docs/operators/sagemaker.rst
b/providers/amazon/docs/operators/sagemaker.rst
index 71f61a32890..e9e703f4f01 100644
--- a/providers/amazon/docs/operators/sagemaker.rst
+++ b/providers/amazon/docs/operators/sagemaker.rst
@@ -390,7 +390,7 @@ you can use
:class:`~airflow.providers.amazon.aws.sensors.sagemaker.SageMakerPro
Branch a DAG based on condition evaluation
==========================================
-To branch an Airflow DAG based on upstream task outputs you can use
+To branch an Airflow Dag based on upstream task outputs you can use
:class:`~airflow.providers.amazon.aws.operators.sagemaker.SageMakerConditionOperator`.
Simple usage with flat parameters (single condition):
diff --git a/providers/amazon/src/airflow/providers/amazon/aws/bundles/s3.py
b/providers/amazon/src/airflow/providers/amazon/aws/bundles/s3.py
index bf840f9ec35..65bacb4b388 100644
--- a/providers/amazon/src/airflow/providers/amazon/aws/bundles/s3.py
+++ b/providers/amazon/src/airflow/providers/amazon/aws/bundles/s3.py
@@ -29,14 +29,14 @@ from airflow.providers.common.compat.sdk import
AirflowException
class S3DagBundle(BaseDagBundle):
"""
- S3 DAG bundle - exposes a directory in S3 as a DAG bundle.
+ S3 Dag bundle - exposes a directory in S3 as a Dag bundle.
- This allows Airflow to load DAGs directly from an S3 bucket.
+ This allows Airflow to load Dags directly from an S3 bucket.
:param aws_conn_id: Airflow connection ID for AWS. Defaults to
AwsBaseHook.default_conn_name.
- :param bucket_name: The name of the S3 bucket containing the DAG files.
- :param prefix: Optional subdirectory within the S3 bucket where the DAGs
are stored.
- If None, DAGs are assumed to be at the root of the bucket
(Optional).
+ :param bucket_name: The name of the S3 bucket containing the Dag files.
+ :param prefix: Optional subdirectory within the S3 bucket where the Dags
are stored.
+ If None, Dags are assumed to be at the root of the bucket
(Optional).
"""
supports_versioning = False
@@ -53,7 +53,7 @@ class S3DagBundle(BaseDagBundle):
self.aws_conn_id = aws_conn_id
self.bucket_name = bucket_name
self.prefix = prefix
- # Local path where S3 DAGs are downloaded
+ # Local path where S3 Dags are downloaded
self.s3_dags_dir: Path = self.base_dir
log = structlog.get_logger(__name__)
@@ -69,11 +69,11 @@ class S3DagBundle(BaseDagBundle):
def _initialize(self):
with self.lock():
if not self.s3_dags_dir.exists():
- self._log.info("Creating local DAGs directory: %s",
self.s3_dags_dir)
+ self._log.info("Creating local Dags directory: %s",
self.s3_dags_dir)
os.makedirs(self.s3_dags_dir)
if not self.s3_dags_dir.is_dir():
- raise AirflowException(f"Local DAGs path: {self.s3_dags_dir}
is not a directory.")
+ raise AirflowException(f"Local Dags path: {self.s3_dags_dir}
is not a directory.")
if not self.s3_hook.check_for_bucket(bucket_name=self.bucket_name):
raise AirflowException(f"S3 bucket '{self.bucket_name}' does
not exist.")
@@ -112,22 +112,22 @@ class S3DagBundle(BaseDagBundle):
)
def get_current_version(self) -> str | None:
- """Return the current version of the DAG bundle. Currently not
supported."""
+ """Return the current version of the Dag bundle. Currently not
supported."""
return None
@property
def path(self) -> Path:
- """Return the local path to the DAG files."""
- return self.s3_dags_dir # Path where DAGs are downloaded.
+ """Return the local path to the Dag files."""
+ return self.s3_dags_dir # Path where Dags are downloaded.
def refresh(self) -> None:
- """Refresh the DAG bundle by re-downloading the DAGs from S3."""
+ """Refresh the Dag bundle by re-downloading the Dags from S3."""
if self.version:
raise AirflowException("Refreshing a specific version is not
supported")
with self.lock():
self._log.debug(
- "Downloading DAGs from s3://%s/%s to %s", self.bucket_name,
self.prefix, self.s3_dags_dir
+ "Downloading Dags from s3://%s/%s to %s", self.bucket_name,
self.prefix, self.s3_dags_dir
)
self.s3_hook.sync_to_local_dir(
bucket_name=self.bucket_name,
@@ -138,7 +138,7 @@ class S3DagBundle(BaseDagBundle):
def view_url(self, version: str | None = None) -> str | None:
"""
- Return a URL for viewing the DAGs in S3. Currently, versioning is not
supported.
+ Return a URL for viewing the Dags in S3. Currently, versioning is not
supported.
This method is deprecated and will be removed when the minimum
supported Airflow version is 3.1.
Use `view_url_template` instead.
@@ -146,7 +146,7 @@ class S3DagBundle(BaseDagBundle):
return self.view_url_template()
def view_url_template(self) -> str | None:
- """Return a URL for viewing the DAGs in S3. Currently, versioning is
not supported."""
+ """Return a URL for viewing the Dags in S3. Currently, versioning is
not supported."""
if self.version:
raise AirflowException("S3 url with version is not supported")
if hasattr(self, "_view_url_template") and self._view_url_template:
diff --git
a/providers/amazon/src/airflow/providers/amazon/aws/executors/Dockerfile
b/providers/amazon/src/airflow/providers/amazon/aws/executors/Dockerfile
index c914af9a29e..9f578bfcbf4 100644
--- a/providers/amazon/src/airflow/providers/amazon/aws/executors/Dockerfile
+++ b/providers/amazon/src/airflow/providers/amazon/aws/executors/Dockerfile
@@ -36,7 +36,7 @@ RUN curl
"https://raw.githubusercontent.com/apache/airflow/main/scripts/docker/e
COPY <<"EOF" /install_dags_entrypoint.sh
#!/bin/bash
-echo "Downloading DAGs from S3 bucket"
+echo "Downloading Dags from S3 bucket"
aws s3 sync "$S3_URI" "$CONTAINER_DAG_PATH"
/home/airflow/entrypoint.sh "$@"
@@ -81,27 +81,27 @@ ENV AWS_DEFAULT_REGION=$aws_default_region
ENV AWS_SESSION_TOKEN=$aws_session_token
-## Loading DAGs
-# This Dockerfile supports 2 ways to load DAGs onto the container.
-# One is to upload all the DAGs onto an S3 bucket, and then
+## Loading Dags
+# This Dockerfile supports 2 ways to load Dags onto the container.
+# One is to upload all the Dags onto an S3 bucket, and then
# download them onto the container. The other is to copy a local folder with
-# the DAGs onto the container.
-# If you would like to use an alternative method of loading DAGs, feel free to
make the
+# the Dags onto the container.
+# If you would like to use an alternative method of loading Dags, feel free to
make the
# necessary changes to this file.
ARG host_dag_path=./dags
ENV HOST_DAG_PATH=$host_dag_path
ARG container_dag_path=/opt/airflow/dags
ENV CONTAINER_DAG_PATH=$container_dag_path
-# Set host_dag_path to the path of the DAGs on the host
+# Set host_dag_path to the path of the Dags on the host
# COPY --chown=airflow:root $HOST_DAG_PATH $CONTAINER_DAG_PATH
-# Use these arguments to load DAGs onto the container from S3
+# Use these arguments to load Dags onto the container from S3
ARG s3_uri
ENV S3_URI=$s3_uri
-# If using S3 bucket as source of DAGs, uncommenting the next ENTRYPOINT
command will overwrite this one.
+# If using S3 bucket as source of Dags, uncommenting the next ENTRYPOINT
command will overwrite this one.
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/home/airflow/entrypoint.sh"]
-# Uncomment the line if using S3 bucket as the source of DAGs
+# Uncomment the line if using S3 bucket as the source of Dags
# ENTRYPOINT ["/usr/bin/dumb-init", "--", "/install_dags_entrypoint.sh"]
diff --git
a/providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/docker/Dockerfile
b/providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/docker/Dockerfile
index f5c4648caf4..4520bf27f67 100644
---
a/providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/docker/Dockerfile
+++
b/providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/docker/Dockerfile
@@ -80,18 +80,18 @@ ENV REQUIREMENTS_PATH=$requirements_path
#ENV AWS_DEFAULT_REGION=$aws_default_region
#ENV AWS_SESSION_TOKEN=$aws_session_token
-## Loading DAGs
-# This Dockerfile supports 2 ways to load DAGs onto the container.
+## Loading Dags
+# This Dockerfile supports 2 ways to load Dags onto the container.
# One is to download them from S3 at runtime during the Lambda app invocation.
The other
# is to copy the dags into the image at build time, this will make task
execution
# much faster, since the images will already be present but the image will
need to be rebuilt
-# every time the DAGs are updated.
-# If you would like to use an alternative method of loading DAGs, feel free to
make the
+# every time the Dags are updated.
+# If you would like to use an alternative method of loading Dags, feel free to
make the
# necessary changes to this file.
ARG host_dag_path=./dags
ENV HOST_DAG_PATH=$host_dag_path
-# Uncomment the line below to copy the DAGs from the host to the container.
+# Uncomment the line below to copy the Dags from the host to the container.
# COPY $HOST_DAG_PATH $AIRFLOW__CORE__DAGS_FOLDER
# Use these arguments to load DAGs at runtime. If you are using the provided
Lambda function (app.py),
diff --git
a/providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/docker/app.py
b/providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/docker/app.py
index 702e9ee1348..7c77e6c4c7d 100644
---
a/providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/docker/app.py
+++
b/providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/docker/app.py
@@ -111,8 +111,8 @@ def get_queue_url():
def fetch_dags_from_s3(s3_uri):
- """Fetch DAGs from S3 and sync them to the local dags directory."""
- log.info("Fetching DAGs from S3 URI: %s", s3_uri)
+ """Fetch Dags from S3 and sync them to the local dags directory."""
+ log.info("Fetching Dags from S3 URI: %s", s3_uri)
# Use a named temporary directory for the local dags folder, only tmp is
writeable in Lambda
local_dags_dir = mkdtemp(prefix="airflow_dags_")
log.info("Setting AIRFLOW__CORE__DAGS_FOLDER to: %s", local_dags_dir)
diff --git
a/providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py
b/providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py
index 01bed883ddc..7058cbf5e60 100644
---
a/providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py
+++
b/providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py
@@ -259,8 +259,8 @@ class AwsBatchExecutor(BaseExecutor):
# if the job fails before the Airflow process on the container has
started. These failures
# can be caused by a Batch API failure, container misconfiguration etc.
# If the container is able to start up and run the Airflow process,
any failures after that
- # (i.e. DAG failures) will not be marked as Failed by AWS Batch,
because Batch on assumes
- # responsibility for ensuring the process started. Failures in the DAG
will be caught by
+ # (i.e. Dag failures) will not be marked as Failed by AWS Batch,
because Batch on assumes
+ # responsibility for ensuring the process started. Failures in the Dag
will be caught by
# Airflow, which will be handled separately.
job_info = self.active_workers.id_to_job_info[job.job_id]
task_key = self.active_workers.id_to_key[job.job_id]
diff --git
a/providers/amazon/src/airflow/providers/amazon/aws/hooks/base_aws.py
b/providers/amazon/src/airflow/providers/amazon/aws/hooks/base_aws.py
index 59249fac911..b10c083eddb 100644
--- a/providers/amazon/src/airflow/providers/amazon/aws/hooks/base_aws.py
+++ b/providers/amazon/src/airflow/providers/amazon/aws/hooks/base_aws.py
@@ -586,7 +586,7 @@ class AwsGenericHook(BaseHook, Generic[BaseAwsConnection]):
@return_on_error("00000000-0000-0000-0000-000000000000")
def _generate_dag_key() -> str:
"""
- Generate a DAG key.
+ Generate a Dag key.
The Object Identifier (OID) namespace is used to salt the dag_id value.
That salted value is used to generate a SHA-1 hash which, by
definition,
diff --git
a/providers/amazon/src/airflow/providers/amazon/aws/operators/appflow.py
b/providers/amazon/src/airflow/providers/amazon/aws/operators/appflow.py
index b47c188e85c..390a22679ea 100644
--- a/providers/amazon/src/airflow/providers/amazon/aws/operators/appflow.py
+++ b/providers/amazon/src/airflow/providers/amazon/aws/operators/appflow.py
@@ -43,7 +43,7 @@ NOT_SUPPORTED_SOURCE_MSG = "Source {source} is not supported
for {entity}!"
class AppflowBaseOperator(AwsBaseOperator[AppflowHook]):
"""
- Amazon AppFlow Base Operator class (not supposed to be used directly in
DAGs).
+ Amazon AppFlow Base Operator class (not supposed to be used directly in
Dags).
:param source: The source name (Supported: salesforce, zendesk)
:param flow_name: The flow name
diff --git
a/providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py
b/providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py
index 17f580416fd..575263eb0f6 100644
--- a/providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py
+++ b/providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py
@@ -42,7 +42,7 @@ if TYPE_CHECKING:
class ComprehendBaseOperator(AwsBaseOperator[ComprehendHook]):
"""
- This is the base operator for Comprehend Service operators (not supposed
to be used directly in DAGs).
+ This is the base operator for Comprehend Service operators (not supposed
to be used directly in Dags).
:param input_data_config: The input properties for a PII entities
detection job. (templated)
:param output_data_config: Provides `configuration` parameters for the
output of PII entity detection
diff --git a/providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py
b/providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py
index 8efc71289e4..26b1b66a3ac 100644
--- a/providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py
+++ b/providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py
@@ -1196,7 +1196,7 @@ class
EmrServerlessStartJobOperator(AwsBaseOperator[EmrServerlessHook]):
This implies waiting for completion. This mode requires aiobotocore
module to be installed.
(default: False, but can be overridden in config file by setting
default_deferrable to True)
:param enable_application_ui_links: If True, the operator will generate
one-time links to EMR Serverless
- application UIs. The generated links will allow any user with access
to the DAG to see the Spark or
+ application UIs. The generated links will allow any user with access
to the Dag to see the Spark or
Tez UI or Spark stdout logs. Defaults to False.
:param cancel_on_kill: If True, the EMR Serverless job will be cancelled
when the task is killed
while in deferrable mode. This ensures that orphan jobs are not left
running in EMR Serverless
diff --git
a/providers/amazon/src/airflow/providers/amazon/aws/operators/mwaa.py
b/providers/amazon/src/airflow/providers/amazon/aws/operators/mwaa.py
index 50b3d14675c..5a6943eaaaa 100644
--- a/providers/amazon/src/airflow/providers/amazon/aws/operators/mwaa.py
+++ b/providers/amazon/src/airflow/providers/amazon/aws/operators/mwaa.py
@@ -41,23 +41,23 @@ class MwaaTriggerDagRunOperator(AwsBaseOperator[MwaaHook]):
:ref:`howto/operator:MwaaTriggerDagRunOperator`
:param env_name: The MWAA environment name (templated)
- :param trigger_dag_id: The ID of the DAG to be triggered (templated)
+ :param trigger_dag_id: The ID of the Dag to be triggered (templated)
:param trigger_run_id: The Run ID. This together with trigger_dag_id are a
unique key. (templated)
:param logical_date: The logical date (previously called execution date).
This is the time or interval
- covered by this DAG run, according to the DAG definition. This
together with trigger_dag_id are a
+ covered by this Dag run, according to the Dag definition. This
together with trigger_dag_id are a
unique key. This field is required if your environment is running with
Airflow 3. (templated)
- :param data_interval_start: The beginning of the interval the DAG run
covers
- :param data_interval_end: The end of the interval the DAG run covers
+ :param data_interval_start: The beginning of the interval the Dag run
covers
+ :param data_interval_end: The end of the interval the Dag run covers
:param conf: Additional configuration parameters. The value of this field
can be set only when creating
the object. (templated)
:param note: Contains manually entered notes by the user about the DagRun.
(templated)
:param airflow_version: The Airflow major version the MWAA environment
runs.
This parameter is only used if the local web token method is used
to call Airflow API. (templated)
- :param wait_for_completion: Whether to wait for DAG run to stop. (default:
False)
+ :param wait_for_completion: Whether to wait for Dag run to stop. (default:
False)
:param waiter_delay: Time in seconds to wait between status checks.
(default: 120)
- :param waiter_max_attempts: Maximum number of attempts to check for DAG
run completion. (default: 720)
- :param deferrable: If True, the operator will wait asynchronously for the
DAG run to stop.
+ :param waiter_max_attempts: Maximum number of attempts to check for Dag
run completion. (default: 720)
+ :param deferrable: If True, the operator will wait asynchronously for the
Dag run to stop.
This implies waiting for completion. This mode requires aiobotocore
module to be installed.
(default: False)
:param aws_conn_id: The Airflow connection used for AWS credentials.
@@ -122,10 +122,10 @@ class
MwaaTriggerDagRunOperator(AwsBaseOperator[MwaaHook]):
def execute_complete(self, context: Context, event: dict[str, Any] | None
= None) -> dict:
validated_event = validate_execute_complete_event(event)
if validated_event["status"] != "success":
- raise AirflowException(f"DAG run failed: {validated_event}")
+ raise AirflowException(f"Dag run failed: {validated_event}")
dag_run_id = validated_event["dag_run_id"]
- self.log.info("DAG run %s of DAG %s completed", dag_run_id,
self.trigger_dag_id)
+ self.log.info("Dag run %s of Dag %s completed", dag_run_id,
self.trigger_dag_id)
return self.hook.invoke_rest_api(
env_name=self.env_name,
path=f"/dags/{self.trigger_dag_id}/dagRuns/{dag_run_id}",
@@ -157,9 +157,9 @@ class MwaaTriggerDagRunOperator(AwsBaseOperator[MwaaHook]):
)
dag_run_id = response["RestApiResponse"]["dag_run_id"]
- self.log.info("DAG run %s of DAG %s created", dag_run_id,
self.trigger_dag_id)
+ self.log.info("Dag run %s of Dag %s created", dag_run_id,
self.trigger_dag_id)
- task_description = f"DAG run {dag_run_id} of DAG {self.trigger_dag_id}
to complete"
+ task_description = f"Dag run {dag_run_id} of Dag {self.trigger_dag_id}
to complete"
if self.deferrable:
self.log.info("Deferring for %s", task_description)
self.defer(
diff --git
a/providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker.py
b/providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker.py
index fe1597f5b1f..c4fadec6a16 100644
--- a/providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker.py
+++ b/providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker.py
@@ -2101,8 +2101,8 @@ class SageMakerConditionOperator(BaseBranchOperator):
Cast Jinja-rendered string values to appropriate Python types.
This is a compatibility shim for environments where
- ``render_template_as_native_obj=True`` is not available at the DAG or
- task level (e.g., YAML DAGs). Once task-level native rendering
+ ``render_template_as_native_obj=True`` is not available at the Dag or
+ task level (e.g., YAML Dags). Once task-level native rendering
is widely supported, this method can be removed in favor of letting
Airflow handle the casting natively.
diff --git a/providers/amazon/src/airflow/providers/amazon/aws/sensors/mwaa.py
b/providers/amazon/src/airflow/providers/amazon/aws/sensors/mwaa.py
index d879a5e7922..37710a7f0bf 100644
--- a/providers/amazon/src/airflow/providers/amazon/aws/sensors/mwaa.py
+++ b/providers/amazon/src/airflow/providers/amazon/aws/sensors/mwaa.py
@@ -34,22 +34,22 @@ if TYPE_CHECKING:
class MwaaDagRunSensor(AwsBaseSensor[MwaaHook]):
"""
- Waits for a DAG Run in an MWAA Environment to complete.
+ Waits for a Dag Run in an MWAA Environment to complete.
- If the DAG Run fails, an AirflowException is thrown.
+ If the Dag Run fails, an AirflowException is thrown.
.. seealso::
For more information on how to use this sensor, take a look at the
guide:
:ref:`howto/sensor:MwaaDagRunSensor`
- :param external_env_name: The external MWAA environment name that contains
the DAG Run you want to wait for
+ :param external_env_name: The external MWAA environment name that contains
the Dag Run you want to wait for
(templated)
- :param external_dag_id: The DAG ID in the external MWAA environment that
contains the DAG Run you want to wait for
+ :param external_dag_id: The Dag ID in the external MWAA environment that
contains the Dag Run you want to wait for
(templated)
- :param external_dag_run_id: The DAG Run ID in the external MWAA
environment that you want to wait for (templated)
- :param success_states: Collection of DAG Run states that would make this
task marked as successful, default is
+ :param external_dag_run_id: The Dag Run ID in the external MWAA
environment that you want to wait for (templated)
+ :param success_states: Collection of Dag Run states that would make this
task marked as successful, default is
``{airflow.utils.state.DagRunState.SUCCESS}`` (templated)
- :param failure_states: Collection of DAG Run states that would make this
task marked as failed and raise an
+ :param failure_states: Collection of Dag Run states that would make this
task marked as failed and raise an
AirflowException, default is
``{airflow.utils.state.DagRunState.FAILED}`` (templated)
:param airflow_version: The Airflow major version the MWAA environment
runs.
This parameter is only used if the local web token method is used
to call Airflow API. (templated)
@@ -115,7 +115,7 @@ class MwaaDagRunSensor(AwsBaseSensor[MwaaHook]):
def poke(self, context: Context) -> bool:
self.log.info(
- "Poking for DAG run %s of DAG %s in MWAA environment %s",
+ "Poking for Dag run %s of Dag %s in MWAA environment %s",
self.external_dag_run_id,
self.external_dag_id,
self.external_env_name,
@@ -137,7 +137,7 @@ class MwaaDagRunSensor(AwsBaseSensor[MwaaHook]):
if state in self.failure_states:
raise AirflowException(
- f"The DAG run {self.external_dag_run_id} of DAG
{self.external_dag_id} in MWAA environment {self.external_env_name} "
+ f"The Dag run {self.external_dag_run_id} of Dag
{self.external_dag_id} in MWAA environment {self.external_env_name} "
f"failed with state: {state}"
)
@@ -147,7 +147,7 @@ class MwaaDagRunSensor(AwsBaseSensor[MwaaHook]):
validated_event = validate_execute_complete_event(event)
if validated_event["status"] != "success":
- raise AirflowException(f"Error in MWAA DAG run: {validated_event}")
+ raise AirflowException(f"Error in MWAA Dag run: {validated_event}")
def execute(self, context: Context):
if self.deferrable:
@@ -180,9 +180,9 @@ class MwaaTaskSensor(AwsBaseSensor[MwaaHook]):
:param external_env_name: The external MWAA environment name that contains
the Task Instance you want to wait for
(templated)
- :param external_dag_id: The DAG ID in the external MWAA environment that
contains the Task Instance you want to wait for
+ :param external_dag_id: The Dag ID in the external MWAA environment that
contains the Task Instance you want to wait for
(templated)
- :param external_dag_run_id: The DAG Run ID in the external MWAA
environment that you want to wait for (templated)
+ :param external_dag_run_id: The Dag Run ID in the external MWAA
environment that you want to wait for (templated)
:param external_task_id: The Task ID in the external MWAA environment that
you want to wait for (templated)
:param success_states: Collection of task instance states that would make
this task marked as successful, default is
``{airflow.utils.state.TaskInstanceState.SUCCESS}`` (templated)
@@ -255,7 +255,7 @@ class MwaaTaskSensor(AwsBaseSensor[MwaaHook]):
def poke(self, context: Context) -> bool:
self.log.info(
- "Poking for task %s of DAG run %s of DAG %s in MWAA environment
%s",
+ "Poking for task %s of Dag run %s of Dag %s in MWAA environment
%s",
self.external_task_id,
self.external_dag_run_id,
self.external_dag_id,
@@ -278,7 +278,7 @@ class MwaaTaskSensor(AwsBaseSensor[MwaaHook]):
if state in self.failure_states:
raise AirflowException(
- f"The task {self.external_task_id} of DAG run
{self.external_dag_run_id} of DAG {self.external_dag_id} in MWAA environment
{self.external_env_name} "
+ f"The task {self.external_task_id} of Dag run
{self.external_dag_run_id} of Dag {self.external_dag_id} in MWAA environment
{self.external_env_name} "
f"failed with state: {state}"
)
diff --git a/providers/amazon/src/airflow/providers/amazon/aws/triggers/mwaa.py
b/providers/amazon/src/airflow/providers/amazon/aws/triggers/mwaa.py
index b31f5a018b9..3c905cf96cb 100644
--- a/providers/amazon/src/airflow/providers/amazon/aws/triggers/mwaa.py
+++ b/providers/amazon/src/airflow/providers/amazon/aws/triggers/mwaa.py
@@ -32,14 +32,14 @@ class MwaaDagRunCompletedTrigger(AwsBaseWaiterTrigger):
"""
Trigger when an MWAA Dag Run is complete.
- :param external_env_name: The external MWAA environment name that contains
the DAG Run you want to wait for
+ :param external_env_name: The external MWAA environment name that contains
the Dag Run you want to wait for
(templated)
- :param external_dag_id: The DAG ID in the external MWAA environment that
contains the DAG Run you want to wait for
+ :param external_dag_id: The Dag ID in the external MWAA environment that
contains the Dag Run you want to wait for
(templated)
- :param external_dag_run_id: The DAG Run ID in the external MWAA
environment that you want to wait for (templated)
- :param success_states: Collection of DAG Run states that would make this
task marked as successful, default is
+ :param external_dag_run_id: The Dag Run ID in the external MWAA
environment that you want to wait for (templated)
+ :param success_states: Collection of Dag Run states that would make this
task marked as successful, default is
``{airflow.utils.state.DagRunState.SUCCESS}`` (templated)
- :param failure_states: Collection of DAG Run states that would make this
task marked as failed and raise an
+ :param failure_states: Collection of Dag Run states that would make this
task marked as failed and raise an
AirflowException, default is
``{airflow.utils.state.DagRunState.FAILED}`` (templated)
:param waiter_delay: The amount of time in seconds to wait between
attempts. (default: 60)
:param waiter_max_attempts: The maximum number of attempts to be made.
(default: 720)
@@ -80,8 +80,8 @@ class MwaaDagRunCompletedTrigger(AwsBaseWaiterTrigger):
"Path":
f"/dags/{external_dag_id}/dagRuns/{external_dag_run_id}",
"Method": "GET",
},
- failure_message=f"The DAG run {external_dag_run_id} of DAG
{external_dag_id} in MWAA environment {external_env_name} failed with state",
- status_message="State of DAG run",
+ failure_message=f"The Dag run {external_dag_run_id} of Dag
{external_dag_id} in MWAA environment {external_env_name} failed with state",
+ status_message="State of Dag run",
status_queries=["RestApiResponse.state"],
return_key="dag_run_id",
return_value=external_dag_run_id,
@@ -112,10 +112,10 @@ class MwaaTaskCompletedTrigger(AwsBaseWaiterTrigger):
:param external_env_name: The external MWAA environment name that contains
the Task Instance you want to wait for
(templated)
- :param external_dag_id: The DAG ID in the external MWAA environment that
contains the Task Instance you want to wait for
+ :param external_dag_id: The Dag ID in the external MWAA environment that
contains the Task Instance you want to wait for
(templated)
- :param external_dag_run_id: The DAG Run ID in the external MWAA
environment that you want to wait for (templated).
- If not provided, the latest DAG run is used by default.
+ :param external_dag_run_id: The Dag Run ID in the external MWAA
environment that you want to wait for (templated).
+ If not provided, the latest Dag run is used by default.
:param external_task_id: The Task ID in the external MWAA environment that
you want to wait for (templated)
:param success_states: Collection of task instance states that would make
this task marked as successful, default is
``{airflow.utils.state.TaskInstanceState.SUCCESS}`` (templated)
@@ -166,8 +166,8 @@ class MwaaTaskCompletedTrigger(AwsBaseWaiterTrigger):
"Path":
f"/dags/{external_dag_id}/dagRuns/{external_dag_run_id}/taskInstances/{external_task_id}",
"Method": "GET",
},
- failure_message=f"The task {external_task_id} of DAG run
{external_dag_run_id} of DAG {external_dag_id} in MWAA environment
{external_env_name} failed with state",
- status_message="State of DAG run",
+ failure_message=f"The task {external_task_id} of Dag run
{external_dag_run_id} of Dag {external_dag_id} in MWAA environment
{external_env_name} failed with state",
+ status_message="State of Dag run",
status_queries=["RestApiResponse.state"],
return_key="task_id",
return_value=external_task_id,
diff --git a/providers/amazon/tests/unit/amazon/aws/bundles/test_s3.py
b/providers/amazon/tests/unit/amazon/aws/bundles/test_s3.py
index a34076d3409..f886ebe4367 100644
--- a/providers/amazon/tests/unit/amazon/aws/bundles/test_s3.py
+++ b/providers/amazon/tests/unit/amazon/aws/bundles/test_s3.py
@@ -194,7 +194,7 @@ class TestS3DagBundle:
bundle._log.debug = MagicMock()
# Create a pytest Call object to compare against the call_args_list of
the _log.debug mock
download_log_call = call(
- "Downloading DAGs from s3://%s/%s to %s", S3_BUCKET_NAME,
S3_BUCKET_PREFIX, bundle.s3_dags_dir
+ "Downloading Dags from s3://%s/%s to %s", S3_BUCKET_NAME,
S3_BUCKET_PREFIX, bundle.s3_dags_dir
)
bundle.initialize()
assert bundle._log.debug.call_count == 1
@@ -214,7 +214,7 @@ class TestS3DagBundle:
)
bundle._log.debug = MagicMock()
download_log_call = call(
- "Downloading DAGs from s3://%s/%s to %s", S3_BUCKET_NAME, "",
bundle.s3_dags_dir
+ "Downloading Dags from s3://%s/%s to %s", S3_BUCKET_NAME, "",
bundle.s3_dags_dir
)
assert bundle.prefix == ""
bundle.initialize()
diff --git a/providers/amazon/tests/unit/amazon/aws/links/test_base_aws.py
b/providers/amazon/tests/unit/amazon/aws/links/test_base_aws.py
index bd3b4d669b3..d4408c8a491 100644
--- a/providers/amazon/tests/unit/amazon/aws/links/test_base_aws.py
+++ b/providers/amazon/tests/unit/amazon/aws/links/test_base_aws.py
@@ -194,12 +194,12 @@ class BaseAwsLinksTestCase:
assert task.operator_extra_links[0].get_link(operator=task,
ti_key=ti.key) == expected_url, error_msg
def test_link_serialize(self):
- """Test: Operator links should exist for serialized DAG."""
+ """Test: Operator links should exist for serialized Dag."""
self.create_op_and_ti(self.link_class, dag_id="test_link_serialize",
task_id=self.task_id)
serialized_dag = self.dag_maker.get_serialized_data()
deserialized_dag =
DagSerialization.deserialize_dag(serialized_dag["dag"])
operator_extra_link = deserialized_dag.tasks[0].operator_extra_links[0]
- error_message = "Operator links should exist for serialized DAG"
+ error_message = "Operator links should exist for serialized Dag"
assert operator_extra_link.name == self.link_class.name, error_message
def test_empty_xcom(self):
diff --git a/providers/amazon/tests/unit/amazon/aws/sensors/test_mwaa.py
b/providers/amazon/tests/unit/amazon/aws/sensors/test_mwaa.py
index 938d7228a70..c6b114057eb 100644
--- a/providers/amazon/tests/unit/amazon/aws/sensors/test_mwaa.py
+++ b/providers/amazon/tests/unit/amazon/aws/sensors/test_mwaa.py
@@ -100,8 +100,8 @@ class TestMwaaDagRunSuccessSensor:
def test_execute_complete_error(self):
sensor = MwaaDagRunSensor(**SENSOR_DAG_RUN_KWARGS,
**SENSOR_STATE_KWARGS)
- error_event = {"status": "error", "message": "DAG run failed",
"dag_run_id": "test_run"}
- with pytest.raises(AirflowException, match="Error in MWAA DAG run"):
+ error_event = {"status": "error", "message": "Dag run failed",
"dag_run_id": "test_run"}
+ with pytest.raises(AirflowException, match="Error in MWAA Dag run"):
sensor.execute_complete({}, error_event)
def test_execute_complete_success(self):