Comments (10)
Happy to look Into this: 😀
Assigned
from airflow.
But if @gopidesupavan is interested in a similar issue, there is this issue: #40207. It seems the operator EcsRunTaskOperator
has a bug with the deferrable mode. It is a good first issue
from airflow.
Indeed, that'd be a cool add-on!
from airflow.
Happy to look Into this: 😀
from airflow.
@gopidesupavan, have you started to work on it? Do you have any lead? I am asking this because I recall now there is no Lambda API to fetch status of a given execution. Which then makes this task impossible. Any pooling mechanism on a Lambda execution is purely impossible because there is no API to retrieve status
from airflow.
@gopidesupavan, have you started to work on it? Do you have any lead? I am asking this because I recall now there is no Lambda API to fetch status of a given execution. Which then makes this task impossible. Any pooling mechanism on a Lambda execution is purely impossible because there is no API to retrieve status
But we do have LambdaFunctionStateSensor
What am I missing?
from airflow.
@gopidesupavan, have you started to work on it? Do you have any lead? I am asking this because I recall now there is no Lambda API to fetch status of a given execution. Which then makes this task impossible. Any pooling mechanism on a Lambda execution is purely impossible because there is no API to retrieve status
But we do have
LambdaFunctionStateSensor
What am I missing?
LambdaFunctionStateSensor
polls the deployment state of the AWS Lambda function until it reaches a target state. It does not poll an execution
from airflow.
Hi @eladkal @vincbeck , actually i was started this task yesterday, agreed what you said is correct. No option to get the execution status of lambda execution. What i am thinking is invoking lambda with async with deferable from the trigger. I thinking of some cases useful, where the lambda execution takes more time say (more than 5min) and InvocationType=RequestResponse. so in this case the trigger can listen on the response from the lambda?.
This is trigger logic am planning:
def serialize(self) -> tuple[str, dict[str, Any]]:
return (
self.__class__.__module__ + "." + self.__class__.__qualname__,
{
"function_name": self.function_name,
"payload": self.payload,
"log_type": self.log_type,
"qualifier": self.qualifier,
"invocation_type": self.invocation_type,
"client_context": self.client_context,
"aws_conn_id": self.aws_conn_id,
"region_name": self.region_name,
"verify": self.verify,
"botocore_config": self.botocore_config,
},
)
@cached_property
def hook(self) -> LambdaHook:
return LambdaHook(aws_conn_id=self.aws_conn_id,
region_name=self.region_name,
verify=self.verify,
config=self.botocore_config,
)
async def run(self) -> AsyncIterator[TriggerEvent]:
response = await self.hook.invoke_lambda_async(
function_name=self.function_name,
invocation_type=self.invocation_type,
log_type=self.log_type,
client_context=self.client_context,
payload=self.payload,
qualifier=self.qualifier,
)
payload = await response.get("Payload").read()
yield TriggerEvent({"status": "success", "response": response, "payload": payload.decode()})
Do you think something that usable? or is this approach not required?
from airflow.
But if @gopidesupavan is interested in a similar issue, there is this issue: #40207. It seems the operator
EcsRunTaskOperator
has a bug with the deferrable mode. It is a good first issue
Yes can take a look, looks like Ellis is already working on this.
from airflow.
As mentioned in #40425, this is not possible because AWS Lambda does not provide an API to retrieve status of an execution. Without this capability, it is not possible to make this operator deferrable
from airflow.
Related Issues (20)
- admin canot see admin components HOT 2
- Azure Datalake Storage V2 ObjectStoragePath connection issues HOT 1
- PythonVirtualOperator fails silently when virtualenv is not installed. HOT 12
- RedshiftDataOperator fails when `return_sql_result` is true, and SQL statements are provided HOT 1
- ElasticsearchSQLHook fails with AttributeError: __enter__ HOT 4
- Airflow log cannot be displayed on logs page HOT 8
- ProcessingJobName is not preserved after execution returns from deferred state in SM proceesing job HOT 1
- deferred tasks get kill during heartbeat callback in some rare cases
- Enhance Variable.set to create versions in GCP Secret Manager when backend is connected
- Task processes killed with SIGTERM signal - task PID of job runner does not match
- Add task status filters to Task Duration Histogram view HOT 1
- Deferred operator do not preserve attribute values set during execution HOT 1
- Missing `usePgbouncer` key for Triggerer
- Logging out from Web UI raises Airflow 405 error HOT 8
- Vertex AI job operators in deferrable mode assume job uses Managed Model HOT 4
- EmrContainerOperator in Async mode doesn't respect default "infinite" polling number HOT 2
- Change signature of `cleanup_stuck_queued_tasks` to return TIs or TI Keys HOT 6
- SparkKubernetesOperator fails to fetch the driver pod when SparkApplication is still in pending state
- ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: cannot allocate memory in static TLS block
- SparkSqlOperator and SparkSubmitOperator are using different types for configurations HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from airflow.