fix: persist specialization state and update controller dependencies#1083
Conversation
Signed-off-by: pulkitvats2007-crypto <pulkitvats2007@gmail.com>
|
Hi @pulkitvats2007-crypto. Thanks for your PR. I'm waiting for a nephio-project member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/ok-to-test |
|
/assign @liamfallon |
|
Hi @pulkitvats2007-crypto, thanks for your contribution. If you have used any AI tools in preparation of your PR please declare so in the description, listing the AI tools used. |
Hi @liamfallon, Thanks for the feedback! I have updated the PR description to declare the AI assistance as requested. I used the Gemini 1.5 Pro web interface to help analyze the codebase and understanding execution flow. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liamfallon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Bug & Fix Summary
1. Critical State Loss in Generic Specializer
controllers/pkg/reconcilers/generic-specializer/reconciler.goReconcileBug:
An early return (
return ctrl.Result{}, nil) was triggered when a package reached the Ready state. This caused the reconciliation flow to exit before callingr.porchClient.Update(ctx, prr).Impact:
All in-memory specialization data (e.g., IP allocations, VLAN assignments, and KRM function outputs) was never persisted to the API server. As a result:
Fix:
Updatelog.Error(err, ...)call that could receive anilerror when handling missing Kptfile cases2. Resource Mutation Loss in Network Reconciler
controllers/pkg/reconcilers/network/reconciler.gogetNewResources,applyInitialresourcesBug:
The
Resourcescollection was being passed by value to helper functions. This resulted in mutations (e.g.,res.AddNewResource(o)) being applied only to a local copy instead of the original collection.Impact:
Newly generated network configurations were silently dropped before reaching the final
APIApplystage, leading to incomplete or missing infrastructure setup.Fix:
*resources.Resources(by pointer)3. Controller Manager Dependency Reversion
operators/nephio-controller-manager/go.modIssue:
The
controllers/pkgdependency had been unintentionally downgraded to an older 2023 version, risking API incompatibility and regression of newer features.Impact:
Fix:
v0.0.0-20250915052103-2af16ab1c9e2go mod tidyto ensure a clean and consistent module stateFinal Impact
These changes restore correctness and reliability across the Nephio specialization pipeline:
Overall, this PR fixes critical state-handling flaws and brings the reconciliation flow back to a consistent, production-safe state.
AI Tool Used
Gemini 1.5 Pro (Web Interface): Used for codebase analysis and understanding execution flow.