compute: fix omission of explicit 0 values in BackendService cdn_policy TTLs#18103
compute: fix omission of explicit 0 values in BackendService cdn_policy TTLs#18103burczyk wants to merge 1 commit into
Conversation
15eb3ac to
8edc923
Compare
335d5f4 to
5218a37
Compare
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 5218a37: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 6 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. |
This PR fixes a bug where explicitly setting
default_ttl,max_ttl, orclient_ttlto0inside thecdn_policyblock ofgoogle_compute_backend_serviceorgoogle_compute_region_backend_serviceresulted in the value being omitted from the JSON payload sent to the API (zero-value omission), causing the API to apply its own defaults instead of the requested0.Changes:
Added
send_empty_value: truetodefaultTtl,maxTtl, andclientTtlfields in bothBackendService.yamlandRegionBackendService.yaml. This ensures that explicit0values are preserved in the JSON payload instead of being skipped bytpgresource.IsEmptyValue.Added two new acceptance tests to verify this behavior:
backend_service_cache_zero_ttl: Verifies explicit0values are sent and preserved.backend_service_cache_omitted_ttl: Verifies that omitting the fields (complimentary behavior) still works as expected (omitted from payload, allowing API defaults).Linked Issues:
Fixes https://issuetracker.google.com/issues/498433517
Release Note Template for Downstream PRs (will be copied)