Skip to content

Skip Region Load Checking in is_remote_task#5331

Merged
javanlacerda merged 1 commit into
masterfrom
javan.fix.dont-check-regions-flag
Jun 19, 2026
Merged

Skip Region Load Checking in is_remote_task#5331
javanlacerda merged 1 commit into
masterfrom
javan.fix.dont-check-regions-flag

Conversation

@javanlacerda

Copy link
Copy Markdown
Collaborator

This change adds a way to skip external region load queries (get_region_load) when we only want to verify if a task is configured to run remotely (e.g. via is_remote_task / is_remote_utask), preventing unnecessary external calls and speed issues.

Changes

1. Added should_check_regions Parameter to _get_subconfig

  • File: service.py
  • Change: Introduced an optional should_check_regions (defaulting to True) argument. When it is False or no queue_check_regions are configured, we skip checking region workloads entirely, log the reason in a single consolidated log statement, and immediately return a weighted subconfig.

2. Propagated in _get_specs_from_config

  • File: service.py
  • Change: Propagated should_check_regions to the _get_subconfig helper.

3. Disabled Region Checks in is_remote_task

  • File: service.py
  • Change: Passed should_check_regions=False when calling _get_specs_from_config inside is_remote_task since workload size does not affect task remote configuration validation.

Signed-off-by: Javan Lacerda <javanlacerda@google.com>
@javanlacerda javanlacerda requested a review from a team as a code owner June 17, 2026 20:17
@javanlacerda javanlacerda requested a review from PauloVLB June 17, 2026 20:24
@javanlacerda javanlacerda merged commit e4a5937 into master Jun 19, 2026
14 checks passed
@javanlacerda javanlacerda deleted the javan.fix.dont-check-regions-flag branch June 19, 2026 13:35
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.

2 participants