andylamp commented on PR #32867:
URL: https://github.com/apache/airflow/pull/32867#issuecomment-1666978301
Right, after digging a bit more @potiuk it seems that is not really my bits
here. The tests that fail capture the error of the logs and compare it against
a predefined value.
For example, in SQLite the following happens,
```text
FAILED
tests/providers/amazon/aws/hooks/test_s3.py::test_unify_and_provide_bucket_name_combination[rel_key-with_conn-with_bucket-provide-expected15]
- AssertionError: assert 'We failed to... it was None,' ==
'`unify_bucke...bucket_name`.'
- `unify_bucket_name_and_key` should wrap `provide_bucket_name`.
```
If we look at the code in [test_s3.py
L1357](https://github.com/apache/airflow/blob/main/tests/providers/amazon/aws/hooks/test_s3.py#L1347):
```python
assert caplog.records[0].message == "`unify_bucket_name_and_key` should wrap
`provide_bucket_name`."
```
It seems that to be the case, I think - because the value of `conn_id`
provided is `None` anyway as we can see from the code, so I am not changing
anything there only putting out a log message about it. If I remove it, tests
(at least a few that I tried) - pass successfully.
I am not comfortable just rejecting the `conn_id` without properly logging
about it - so given these constraints, where and how should I log it?
Note: for now I have pushed the fix that comments my `log.warning` message
and that seems to fixes things...
--
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]