o-nikolas commented on code in PR #34890:
URL: https://github.com/apache/airflow/pull/34890#discussion_r1362486004
##########
airflow/providers/amazon/aws/operators/lambda_function.py:
##########
@@ -62,13 +61,15 @@ class LambdaCreateFunctionOperator(BaseOperator):
:param aws_conn_id: The AWS connection ID to use
"""
+ aws_hook_class = LambdaHook
template_fields: Sequence[str] = (
"function_name",
"runtime",
"role",
"handler",
"code",
"config",
+ *AwsBaseOperator.template_fields,
Review Comment:
> I just thought about another option, create helper function for apply
default parameters
This is certainly nicer! Less duplication and the defaults are complexity
hidden from the users. It would be nice to have a fully backwards compatible
approach, but I'm happy to settle on this one.
> A variation on that might be to have each operator define
"op_template_fields"
This would make the existing operators incompatible since the field name
would need to change, but we need to make other changes to them to convert them
to the base class approach, so maybe that's perfectly fine?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]