[Automated] Update gcloud CLI Options#2759
Conversation
There was a problem hiding this comment.
Code Review: [Automated] Update gcloud CLI Options
Overview
This automated PR syncs the ModularPipelines.Google package with the latest gcloud CLI help output. The generator scraped the installed CLI and regenerated affected options classes. The code generation tooling is working correctly overall, but there are a few issues worth flagging.
Issues & Concerns
1. Breaking Change: GcloudNetappBackupVaultsBackupsCreateOptions — All Properties Removed
File: GcloudNetappBackupVaultsBackupsCreateOptions.Generated.cs
Six properties were removed (Async, BackupVault, Description, Labels, SourceSnapshot, SourceVolume), leaving the class completely empty. This is a hard breaking change — any consumer using these properties will fail to compile.
Concern: If gcloud truly removed these flags from the netapp backup-vaults backups create command, this is correct. But if the generator failed to parse them (e.g., due to a help text format change), real options are silently missing. It's worth manually verifying against the live CLI:
gcloud netapp backup-vaults backups create --help
2. Missing Replacement for Deprecated ConfidentialCompute Flag
Files: GcloudDataprocClustersCreateOptions, GcloudDataprocWorkflowTemplatesSetManagedClusterOptions
The deprecated --confidential-compute bool property was removed, but its documented replacement — --confidential-compute-type=CONFIDENTIAL_COMPUTE_TYPE (accepting SEV, SEV_SNP, TDX) — was not added. The new GcloudWorkerMinCpuPlatform enum (SEV/SEV_SNP/TDX) exists and maps directly to those values.
A better approach would be to:
- Keep
ConfidentialComputemarked[Obsolete("Use ConfidentialComputeType instead.")]rather than deleting it - Add a new
ConfidentialComputeTypeproperty using the sameGcloudWorkerMinCpuPlatformenum (or a dedicated enum)
This gives consumers a migration path and makes the new capability discoverable.
3. Breaking Change: GcloudUpdateRedisConfig — Description Values Changed Case
File: GcloudUpdateRedisConfig.Generated.cs
The [Description] attribute values changed from lowercase ("monday") to UPPERCASE ("MONDAY"). If the framework uses these Description values to serialize the enum to the actual CLI flag value (which is the expected behavior given the attribute name and [CliOption] usage), then this is correct and necessary — gcloud now accepts uppercase values.
However, it is still a breaking change for any consumer who was matching on the Description string manually, and the enum member ordering also changed (now Sunday...Saturday vs. previous alphabetical order). Worth noting in a changelog entry.
4. Potentially Incomplete New Options Classes
Files:
GcloudNetappStoragePoolsListBackupConfigsOptionsGcloudNetappStoragePoolsRestoreVolumeOptionsGcloudNetappStoragePoolsUpdateBackupConfigOptions
All three new options classes are completely empty (no properties beyond the inherited base). For restore-volume in particular, the command clearly requires identifying a storage pool and a backup — the generator may have failed to detect required parameters. Please verify:
gcloud netapp storage-pools restore-volume --help
gcloud netapp storage-pools update-backup-config --help
gcloud netapp storage-pools list-backup-configs --help
5. Minor: Duplicate using Statement in New Files
All three new options files contain:
using ModularPipelines.Google.Options;
...
namespace ModularPipelines.Google.Options;The using is redundant since the class is already in that namespace. This is a generator issue worth fixing to keep the output clean.
Positive Changes
- Type safety improvement:
WorkerMinCpuPlatformpromoted fromstring?toGcloudWorkerMinCpuPlatform?— this is exactly the right direction, prevents invalid values from reaching the CLI. - New service methods:
ListBackupConfigs,RestoreVolume, andUpdateBackupConfigadded toGcloudNetappStoragePoolswith consistent signatures matching the rest of the service class. - Updated XML docs: The IAP option and security profile group docs now include better guidance on clearing OAuth2 credentials and resource type constraints.
- Generator architecture: Using
[Description]attributes for CLI serialization,[ExcludeFromCodeCoverage], and theauto-generatedheader comments all follow the established conventions correctly.
Summary
The main concern is around the missing --confidential-compute-type property and whether the empty GcloudNetappBackupVaultsBackupsCreateOptions is the result of a generator parsing failure vs. an actual API change. Both are worth confirming against the live CLI before merging.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | ✅ 0 (≤ 20 complexity) |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Summary
This PR contains automatically generated updates to gcloud CLI options classes.
The generator scraped the latest CLI help output from the installed tool.
Changes
Verification
🤖 Generated with ModularPipelines.OptionsGenerator