Skip to content

Copybara import of the project:#522

Merged
copybara-service[bot] merged 4 commits into
mainfrom
test_926845123
Jun 5, 2026
Merged

Copybara import of the project:#522
copybara-service[bot] merged 4 commits into
mainfrom
test_926845123

Conversation

@copybara-service

Copy link
Copy Markdown

Copybara import of the project:

--
d894462 by Jonathan Wright jonathan@almalinux.org:

Speed up post-test cleanup: region-scope and gate LB scans

cleanerupper.CleanLoadBalancerResources now takes an optional regions
slice and only iterates those regions; when empty it falls back to
ListRegions (existing behavior). cleanTestWorkflow derives the regions
from the workflow's primary zone plus every per-VM zone override
(handles suites like shapevalidation that pin VMs to non-default
zones), cutting the per-region listing loop from ~40 regions to 1.

A new TestWorkflow.CreatesLoadBalancers opt-in flag gates the LB
cleanup call entirely. Only loadbalancer.TestSetup sets it true, so
other suites skip the scan since they never create LB resources at
runtime.

In CIT's typical single-region case the per-test cleanup pass drops
from ~3m47s to ~2-3s.

--
f1b669a by Jonathan Wright jonathan@almalinux.org:

gofmt: realign TestWorkflowRegions testcases struct

--
9bacfae by Jonathan Wright jonathan@almalinux.org:

Fix regionFromZone to handle URL- and path-form zones

daisy can populate vm.Zone with either a short name ("us-central1-a"),
a path ("zones/us-central1-a"), or a full URL
("https://www.googleapis.com/compute/v1/projects/.../zones/us-central1-a")
depending on workflow state. The previous strings.LastIndex on the raw
input split the trailing zone suffix off a URL but left the URL prefix
intact, so workflowRegions produced strings like
"https://www.googleapis.com/.../zones/us-west1" which GCE rejected with
"Invalid value for field 'region'".

Path.Base the zone first so the same trim works for any of the three
forms. Adds a TestWorkflowRegions case that pins this behavior.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#509 from jonathanspw:region-scope-lb-cleanup 9bacfae

cleanerupper.CleanLoadBalancerResources now takes an optional regions
slice and only iterates those regions; when empty it falls back to
ListRegions (existing behavior). cleanTestWorkflow derives the regions
from the workflow's primary zone plus every per-VM zone override
(handles suites like shapevalidation that pin VMs to non-default
zones), cutting the per-region listing loop from ~40 regions to 1.

A new TestWorkflow.CreatesLoadBalancers opt-in flag gates the LB
cleanup call entirely. Only loadbalancer.TestSetup sets it true, so
other suites skip the scan since they never create LB resources at
runtime.

In CIT's typical single-region case the per-test cleanup pass drops
from ~3m47s to ~2-3s.
daisy can populate vm.Zone with either a short name ("us-central1-a"),
a path ("zones/us-central1-a"), or a full URL
("https://www.googleapis.com/compute/v1/projects/.../zones/us-central1-a")
depending on workflow state. The previous strings.LastIndex on the raw
input split the trailing zone suffix off a URL but left the URL prefix
intact, so workflowRegions produced strings like
"https://www.googleapis.com/.../zones/us-west1" which GCE rejected with
"Invalid value for field 'region'".

Path.Base the zone first so the same trim works for any of the three
forms. Adds a TestWorkflowRegions case that pins this behavior.
@copybara-service copybara-service Bot force-pushed the test_926845123 branch 2 times, most recently from 8cfe641 to 8f1cc13 Compare June 4, 2026 23:53
@copybara-service copybara-service Bot merged commit e72f2bf into main Jun 5, 2026
@copybara-service copybara-service Bot deleted the test_926845123 branch June 5, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants