raphaelauv opened a new issue, #40787:
URL: https://github.com/apache/airflow/issues/40787
### Apache Airflow version
2.9.2
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
S3KeySensor with soft_fail is not failing on configuration errors (missing
credentials or airflow connection )
### What you think should happen instead?
S3KeySensor with soft_fail should fail on missing configuration and only
skip on missing S3 data
### How to reproduce
```python
from datetime import timedelta
from airflow import DAG
from airflow.providers.amazon.aws.sensors.s3 import S3KeySensor
with DAG(
dag_id="xx",
schedule_interval=None,
):
s3_sensor = S3KeySensor(
task_id="s3_sensor",
bucket_key=f"a/*",
bucket_name="toto",
wildcard_match=True,
soft_fail=True,
timeout=10,
poke_interval=15)
```
```log
[2024-07-15T10:02:01.886+0000] {baseoperator.py:400} WARNING -
S3KeySensor.execute cannot be called outside TaskInstance!
[2024-07-15T10:02:01.886+0000] {s3.py:117} INFO - Poking for key :
s3://toto/a/*
[2024-07-15T10:02:01.905+0000] {base_aws.py:587} WARNING - Unable to find
AWS Connection ID 'aws_default', switching to empty.
[2024-07-15T10:02:01.906+0000] {base_aws.py:164} INFO - No connection ID
provided. Fallback on boto3 credential strategy (region_name=None). See:
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html
[2024-07-15T10:02:03.675+0000] {taskinstance.py:441} INFO - ::group::Post
task execution logs
[2024-07-15T10:02:03.675+0000] {taskinstance.py:2506} INFO - Skipping due to
soft_fail is set to True.
[2024-07-15T10:02:03.685+0000] {taskinstance.py:1206} INFO - Marking task as
SKIPPED.
```
### Operating System
ubuntu
### Versions of Apache Airflow Providers
_No response_
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]