Skip to content

Ignore empty gateway auth required setting#473

Merged
anth-volk merged 1 commit intomainfrom
fix/empty-auth-required-env
Apr 29, 2026
Merged

Ignore empty gateway auth required setting#473
anth-volk merged 1 commit intomainfrom
fix/empty-auth-required-env

Conversation

@anth-volk
Copy link
Copy Markdown
Contributor

Fixes #472

Summary

Fix the deploy integration-test collection failure when GATEWAY_AUTH_REQUIRED is not configured yet.

GitHub Actions can pass an unset variable through as an empty string. After #471, that empty string reached simulation_integ_test_gateway_auth_required, and Pydantic attempted to parse "" as a boolean instead of using the field default.

Changes

  • Set env_ignore_empty=True for the simulation integration settings so empty env values fall back to defaults.
  • Only export simulation_integ_test_gateway_auth_required from modal-run-integ-tests.sh when GATEWAY_AUTH_REQUIRED is non-empty.

Validation

  • bash -n .github/scripts/modal-run-integ-tests.sh
  • uv run ruff check projects/policyengine-apis-integ/tests/simulation/conftest.py
  • Generated the simulation client with ./scripts/generate-clients.sh
  • Verified simulation_integ_test_gateway_auth_required="" loads as False
  • Verified simulation_integ_test_gateway_auth_required=1 loads as True
  • uv run pytest tests/simulation/test_auth_smoke.py -q skips cleanly while auth is not required

@anth-volk anth-volk marked this pull request as ready for review April 29, 2026 16:42
@anth-volk anth-volk merged commit 47baf2a into main Apr 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Treat empty gateway auth required integration setting as unset

1 participant