fix(schema): add hasProviderDefault to GCP-populated fields#35
Open
JeroenSoeters wants to merge 7 commits into
Open
fix(schema): add hasProviderDefault to GCP-populated fields#35JeroenSoeters wants to merge 7 commits into
JeroenSoeters wants to merge 7 commits into
Conversation
The bidirectional property comparison in conformance tests v0.1.22+ flags unexpected properties in actual state. These fields are always populated by the GCP API even when the user doesn't set them: - storage/bucket: id, projectNumber, timeCreated, updated - compute/disk: architecture, enableConfidentialCompute, physicalBlockSizeBytes - compute/network: networkFirewallPolicyEnforcementOrder - compute/subnetwork: stackType, gatewayAddress, privateIpv6GoogleAccess, purpose, allowSubnetCidrRoutesOverlap
Both are createOnly fields that GCP fills in when the user doesn't specify them (default OS features and license for the disk image).
- cloudrun/job: serviceAccount, executionEnvironment in TaskTemplate - compute/firewall: disabled, logConfig - cloudrun/worker_pool: scaling
GCP API returns scaling.manualInstanceCount as a provider default. Field was missing from the schema entirely.
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
hasProviderDefault = trueto fields that the GCP API always populates, even when not specified by the userFields annotated:
id,projectNumber,timeCreated,updatedarchitecture,enableConfidentialCompute,physicalBlockSizeBytes(all alreadycreateOnly)networkFirewallPolicyEnforcementOrderstackType,gatewayAddress,privateIpv6GoogleAccess,purpose,allowSubnetCidrRoutesOverlapContext
Conformance tests v0.1.22 introduced bidirectional property comparison (
21331a81). Previously, extra fields returned by the plugin were silently ignored. Now they're flagged as failures unless markedhasProviderDefault = true.Test plan