Allow setting an AWS account ID or external ID that was not configured before when updating a catalog #6211
All Vouch review confidence checks passed
Residual risk 0.36 = Change Risk (0.64) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.64 · 319 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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.345
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.064
Real PR Conversation Timeline
1 comments
"Review active on #6211"
general
weight: 0.35
youngrae81
Fixes #6202
Why
The description of
ALLOW_UNRESTRICTED_STORAGE_CONFIG_ROLE_CHANGESsays that, with the flag disabled (the default), "new values can be set when none were previously configured, but existing values cannot be changed to different ones".The first half was not implemented:
validateUpdateCatalogDiffOrThrowcompared the current and new AWS account ID and external ID withObjects.equals, so a catalog created without a role ARN or without an external ID could never have one added later. The update failed with400 Cannot modify ExternalId ...or400 Cannot modify AWS account ID ....This was also noted in the dev@ thread "[DISCUSS] Expand immutable-field validation for catalog storage config updates" as worth fixing on its own.
What changes
-
PolarisAdminService.validateUpdateCatalogDiffOrThrow: the AWS account ID and external ID checks only reject a change when a value was configured before. Changing or removing an existing value is still rejected unless the flag is enabled.- Azure
tenantIdis unaffected because it is a required field, so there is no null-to-value case.-
ManagementServiceTest: two new tests, setting an external ID and setting a role ARN on a catalog that had none. Both failed with the 400s above before the change. The existing tests for rejecting changes to configured values are unchanged and still pass.- Changelog fragment under
changelog.d/.No documentation change: the flag description already states the intended behavior, and the generated flag reference is derived from it.
Testing
./gradlew format compileAlland./gradlew :polaris-runtime-service:check(unit tests pass; the only failures were the Floci S3 virtual-host integration variants that do not run on macOS).Checklist
changelog.d/(if needed, seechangelog.d/README.md)site/content/in-dev/unreleased(if needed)CONTRIBUTING.md)The fix, the two tests and the changelog fragment were drafted with Claude Code 2.1.323 (Claude Opus 5.5); I reviewed and tested all of it.