fix: use is None for region presence checks (fast follow #57) - #58
Closed
ClayMav wants to merge 1 commit into
Closed
fix: use is None for region presence checks (fast follow #57)#58ClayMav wants to merge 1 commit into
is None for region presence checks (fast follow #57)#58ClayMav wants to merge 1 commit into
Conversation
`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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 omitregion, which silently swallows an empty-string region:airflow_providers_wherobots/hooks/rest_api.py—create_rundropped theregionquery param when""was passed.airflow_providers_wherobots/operators/__init__.py—warn_for_default_regionreturnedNonefor"".An empty string is a caller mistake worth surfacing to the API, not papering over. Both checks are now explicit
is None.Also included
uv.locksynced toversion = "1.6.1"(drift from fix: upgrade to latest wherobots db api package #56's release prep — lock was at 1.6.0, pyproject was at 1.6.1;uvre-synced it on test run).Test plan
New tests:
test_empty_string_is_passed_through(helper)test_create_run_passes_empty_string_region(hook)