refactor: move Wasm and URL plugin types to pkg/apis/plugins/v1 #4860
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.39) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 260 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.333
Real PR Conversation Timeline
1 comments
"Review active on #4860"
general
weight: 0.35
markmandel
What type of PR is this?
/kind cleanup
What this PR does / Why we need it:
Moves the
URLConfiguration,WasmFromandWasmPolicytypes, and their validation, out ofautoscaling/v1into a newplugins.agones.dev/v1package (pkg/apis/plugins/v1), so they can be shared between the FleetAutoscaler and GameServerAllocation, which is getting Wasm plugin support.Along with the types:
URLConfigurationmoves out ofpkg/fleetautoscalersonto the type (BuildURL(),HTTPClient()).ValidateWasmPolicytakes the feature gate to check, so each API can use its own gate (the autoscaler still usesWasmAutoscaler)._plugin.yamlinclude.There is no behaviour change, and the FleetAutoscaler CRD schema is unchanged.
Which issue(s) this PR fixes:
Work on #4151
Did you use AI tools in preparing this PR?:
Y
Special notes for your reviewer:
Most of the diff is moved or generated code:
pkg/client/applyconfiguration/...,zz_generated.deepcopy.goandagones_crd_api_reference.htmlare regenerated. The API reference now lists the three types underplugins.agones.dev/v1.install.yamlonly a YAML comment and trailing whitespace change, as the schema now comes from the shared include.test/e2e/fleetautoscaler_test.goonly changes type references.pkg/apis/plugins/v1has a+groupNameso the API reference generator documents it, but it has no CRDs of its own.build/build-image/gen-crd-code.shrerunsapplyconfiguration-genwithpkg/apis/plugins/v1included, sincekube_codegenonly picks up packages with+genclientresources. That keeps the FleetAutoscaler apply builders taking apply configurations (now frompkg/client/applyconfiguration/plugins/v1), andplugins/v1gets aSchemeGroupVersionfor the generated code.build/build-image/Dockerfileonly bumps itsForceUpdatecounter, so the build image tag changes and the image, which holds a copy of the script, is rebuilt.