potiuk opened a new pull request, #70905:
URL: https://github.com/apache/airflow/pull/70905
`main` is currently red on the provider compat jobs. The refusal-logging
assertions in the Amazon secrets tests read `record.msg` directly, and how a
record carries its payload depends on the Airflow version:
```python
# main — structlog renders the format args before the stdlib record exists
LogRecord(msg="Connection id 'prod--x' contains '--'", args=())
"prod--x" in r.msg -> True
# the versions the compat jobs run against — plain stdlib logging
LogRecord(msg="%s id %r contains %r", args=("Connection", "prod--x", "--"))
"prod--x" in r.msg -> False <- the failure
"prod--x" in r.getMessage() -> True
```
So the assertions pass on `main` and fail under `Compat 2.11.1:P3.10` and
`Compat 3.0.6:P3.10`:
```
assert 0 == 1
where 0 = sum(refused_id in r.msg for r in refusals)
```
`getMessage()` renders in both shapes. The assertion still targets the
refused
**id** rather than the wording, which was the point of moving off the
rendered
sentence in the first place — that intent is unchanged, only the accessor.
This is a regression from #70878, where I moved these assertions off
`getMessage()` while addressing review feedback and verified only against
`main`.
Compat runs on provider PRs, so it surfaced on the next provider PR rather
than
on the one that introduced it.
Kept separate from #70899 (the Azure `get_config` follow-up) so the repair to
`main` can land on its own.
### Test plan
- [x] `providers/amazon/tests/unit/amazon/aws/secrets/` — 73 passed locally
- [x] Both record shapes checked directly: `r.msg` matches only the
pre-rendered
one, `getMessage()` matches both
- [x] Test-only change; no production code touched
- [x] `ruff format` clean
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Opus 5 (1M context)
Generated-by: Claude Opus 5 (1M context) following the guidelines at
https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions
--
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]