ROSAENG-67145 | feat: support spaces in AWS tag keys and values via quoting #3587
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3587"
general
weight: 0.35
michaelryanmcneill
Summary
Align ROSA CLI
--tagsparsing with OCM cluster service support for spaces in AWS tag keys and values. Unquoted legacy formats (key:value,key value) stay compatible; optional double-quoting enables spaces and:in keys. Also reject reservedaws:keys client-side, allow empty tag values for Classic only (not HCP), and useStringArrayfor--tagsso quoted values are not mangled by pflag CSV parsing.Jira
Type of Change
Testing
pkg/awsfor quoted/unquoted tags, reservedaws:prefix, Classic vs HCP empty values, andSplitUserTagListbuildTagsCommand/ command-replay coverage incmd/create/clustercmd/verify/networkgo test ./pkg/aws/ ./cmd/create/cluster/ ./cmd/verify/network/ ./pkg/helper/machinepools/ ./pkg/options/machinepool/ ./pkg/machinepool/E2E coverage
Classic Day1 (
test_rosacli_cluster.go)aws:rejected; ambiguous mixed quoted/unquoted list rejected; empty value allowedClassic Day2 (
test_rosacli_machine_pool.go)--tags stringArray; empty-value no longer treated as invalid"Cost Center":"Finance Team",owner:; reservedaws:rejectedHCP Day1 (
test_rosacli_cluster.go)aws:rejectedHCP Day2 (
hcp_machine_pool_test.go,test_rosacli_node_pool.go)--tags stringArray; quoted reservedaws:rejected; empty value rejectedVarious examples covered by the new implementation:
| CLI
--tagsentry | Tags applied (or result) ||--------------------|--------------------------|
|
key:value|key=value||
key value|key=value||
tag1 value:1|tag1=value:1||
tag:2 value2|tag:2=value2||
key:value,foo:bar|key=value,foo=bar||
"Cost Center":"Finance Team"|Cost Center=Finance Team||
"Cost Center":prod|Cost Center=prod||
env:"value with spaces"|env=value with spaces||
"key:with:colons":value|key:with:colons=value||
"key:with:colons":"value:with:colons"|key:with:colons=value:with:colons||
"Cost Center":"Finance Team",env:prod|Cost Center=Finance Team,env=prod||
"Cost Center":finance,tag1 value:1|Cost Center=finance,tag1=value:1||
"env":prod,key:"value with spaces"|env=prod,key=value with spaces||
"env":prod,"tag:2":value2|env=prod,tag:2=value2||
"env":prod,key:value with spaces| Rejected — ambiguous unquoted tag (quote key/value) ||
"env":prod,tag:2 value2| Rejected — ambiguous unquoted tag (use"tag:2":value2) ||
"Cost Center":x,aws:key value| Rejected — ambiguous unquoted tag (use"aws:key":value) ||
"aws:key":value| Rejected — reservedaws:key prefix ||
"aws:owned":true| Rejected — reservedaws:key prefix ||
aws:key value(all-unquoted list) | Rejected — reserved keyaws:key||
"my:aws:key":value|my:aws:key=value||
owner:(Classic) |owner= `(empty) |owner:""|
(Classic) |owner=(empty) |owner:|
(HCP) | Rejected — empty values not allowed |a:b:c|
(unquoted) | Rejected — invalid format |:value|
| Rejected — empty key |Breaking Changes
<!-- Does this PR introduce breaking changes? If yes, describe impact and migration -->
Checklist
has been run[ROSAENG-67145]: https://redhat.atlassian.net/browse/ROSAENG-67145?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Summary
New Features
Tags can include quoted keys or values with spaces, commas, or colons, and can be supplied as separate command-line arguments.
Empty tag values are supported for ROSA Classic clusters and machine pools, but not Hosted Control Plane clusters or node pools.
Bug Fixes
Tag validation rejects malformed or ambiguous tags, duplicate or empty keys, and reserved aws:` keys.
Reconstructed commands quote tags as needed to preserve values across shells and provide cmd.exe-specific guidance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->