SameerMesiah97 commented on code in PR #63035:
URL: https://github.com/apache/airflow/pull/63035#discussion_r3114127330
##########
providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:
##########
@@ -202,90 +212,150 @@ def sync(self):
"AWS credentials are either missing or expired:
%s.\nRetrying connection", error
)
except Exception:
- self.log.exception("An error occurred while syncing tasks")
+ self.log.exception("An error occurred while syncing workloads.")
- def queue_workload(self, workload: workloads.All, session: Session | None)
-> None:
- from airflow.executors import workloads
+ def queue_workload(
Review Comment:
> Pretty sure we can drop this method entirely and let BaseExecutor's
version cover the work.
That is what I initially tried but then I saw that it caused the backwards
compatiblity tests for pre-3.20 to fail. For example, `queue_workload` in 3.0.6
looks like this:
```
def queue_workload(self, workload: workloads.All, session: Session) ->
None:
raise ValueError(f"Un-handled workload kind
{type(workload).__name__!r} in {type(self).__name__}")
```
Technically, the `AwsLambdaExecutor` is part of the Amazon provider package
so I opted for the above approach to ensure backwards compatiblity (the CI
failures led me there as well). I have no issues with letting `BaseExecutor`
handle `queue_workload` but I am not sure how it can be done without breaking
the backwards compatibility tests.
--
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]