The GitHub Actions job "Tests (AMD)" on airflow.git/fix/simple-auth-production-warning has failed. Run started by GitHub user potiuk (triggered by potiuk).
Head commit for run: 50c5b73738f6eb874c5883a2a7b4da470771c1ed / Jarek Potiuk <[email protected]> fix(simple-auth): make _looks_like_production unit-testable via kwargs CI failed three test_looks_like_production[*-is-dev] parametrize cases plus test_init_does_not_warn_for_dev_shape. Each one set the three production-signal axes (sql_alchemy_conn / api.host / core.executor) to dev-shape values via conf_vars(...) and expected False from the function — but in CI the function returned True, i.e. conf.get(...) inside the function did not see the conf_vars patch for at least one of the three keys. The same setup returns False locally, suggesting a CI-only env-var or breeze-container quirk shadowing the conf_vars patch for these specific keys. Rather than chase the env interaction, decouple the decision logic from the global conf so unit tests can exercise it directly: - _looks_like_production now accepts sql_conn / api_host / executor as keyword-only args. None (the default) falls through to conf.get(), preserving the production code path. Tests pass the three values explicitly and the function never reads conf. - test_looks_like_production parametrize cases now pass full kwargs triples (so each row stands on its own and is robust to CI conf state). One extra case added for the str.strip() path on api_host, plus a 127.0.0.1 loopback case alongside localhost. - test_init_warns_when_production_shaped and test_init_does_not_warn_for_dev_shape now mock _looks_like_production directly to control the branch under test, then assert log.warning was / was not called. The init contract this verifies — "if _looks_like_production() is True, log.warning is called once" — is what these tests are really about; the conf-reading behaviour is covered by the unit tests on the function itself. Generated-by: Claude Code (Opus 4.7) Report URL: https://github.com/apache/airflow/actions/runs/25527513851 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
