rusackas opened a new pull request, #41915:
URL: https://github.com/apache/superset/pull/41915
### SUMMARY
Part of the SQLAlchemy 2.0 migration battleplan: #40273
`pytest.ini`'s `filterwarnings` already promotes several SQLAlchemy 2.0
deprecation-warning categories from a bare warning to a hard error, as each
gets fixed and locked in (see #41914 for 3 more). But `SQLALCHEMY_WARN_20` was
never actually set anywhere in CI — grepped the whole repo, it only appears in
a comment in `pytest.ini`. That means those `RemovedIn20Warning` categories
never actually fire during a normal CI run, so the "enforcement" was a no-op: a
regression on any already-"fixed" category would pass CI silently, and a
contributor would only catch it if they remembered to set the env var locally.
This sets `SQLALCHEMY_WARN_20: "1"` on the `unit-tests` job so the
categories already promoted to `error:` in `pytest.ini` are actually exercised
on every PR and push.
### TESTING INSTRUCTIONS
Ran the exact CI command locally against master's current `pytest.ini` (3
promoted categories):
```bash
SQLALCHEMY_WARN_20=1 SUPERSET_TESTENV=true SUPERSET_SECRET_KEY=not-a-secret \
pytest --durations-min=0.5 --cov-report= --cov=superset ./tests/common
./tests/unit_tests --cache-clear --maxfail=50
```
Only 2 pre-existing, unrelated flaky tests fail (`test_get_time_filter` ×6,
`test_previous_calendar_quarter`), and both reproduce identically with no env
vars set at all — confirmed unrelated to this change (date-boundary-sensitive).
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]