Skip to content

fix: use is None for region presence checks (fast follow #57) - #58

Closed
ClayMav wants to merge 1 commit into
mainfrom
clay/byoc-region-none-check
Closed

fix: use is None for region presence checks (fast follow #57)#58
ClayMav wants to merge 1 commit into
mainfrom
clay/byoc-region-none-check

Conversation

@ClayMav

@ClayMav ClayMav commented May 28, 2026

Copy link
Copy Markdown
Member

Summary

Fast follow to #57 addressing the two blocking review comments from salty-hambot.

Both call sites used falsy checks (if not region / if region_value) to decide whether to omit region, which silently swallows an empty-string region:

  • airflow_providers_wherobots/hooks/rest_api.pycreate_run dropped the region query param when "" was passed.
  • airflow_providers_wherobots/operators/__init__.pywarn_for_default_region returned None for "".

An empty string is a caller mistake worth surfacing to the API, not papering over. Both checks are now explicit is None.

Also included

Test plan

uv run pytest tests/unit_tests/   -> 45 passed

New tests:

  • test_empty_string_is_passed_through (helper)
  • test_create_run_passes_empty_string_region (hook)

`if not region` / `if region_value` silently dropped empty-string regions,
sending no `region` param to the API instead of letting it reject the bad
input. Tighten both call sites to explicit `is None` checks so `""` is
forwarded to the request boundary and the API can surface the error.

Also syncs uv.lock to the 1.6.1 version already in pyproject.toml.
@ClayMav ClayMav closed this May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant