Skip to content

fix(schema): add hasProviderDefault to GCP-populated fields#35

Open
JeroenSoeters wants to merge 7 commits into
mainfrom
fix/schema-provider-defaults
Open

fix(schema): add hasProviderDefault to GCP-populated fields#35
JeroenSoeters wants to merge 7 commits into
mainfrom
fix/schema-provider-defaults

Conversation

@JeroenSoeters

Copy link
Copy Markdown
Contributor

Summary

  • Adds hasProviderDefault = true to fields that the GCP API always populates, even when not specified by the user
  • Fixes 4 conformance test failures (bucket, disk, network, subnetwork) caused by the bidirectional comparison in conformance tests v0.1.22+

Fields annotated:

  • storage/bucket: id, projectNumber, timeCreated, updated
  • compute/disk: architecture, enableConfidentialCompute, physicalBlockSizeBytes (all already createOnly)
  • compute/network: networkFirewallPolicyEnforcementOrder
  • compute/subnetwork: stackType, gatewayAddress, privateIpv6GoogleAccess, purpose, allowSubnetCidrRoutesOverlap

Context

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 marked hasProviderDefault = true.

Test plan

  • Trigger nightly with these changes to verify bucket, disk, network, subnetwork pass

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.
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.

1 participant