Remove redundant status: enabled from generated components#951
Remove redundant status: enabled from generated components#951BasavarajBankolli wants to merge 2 commits intomeshery:masterfrom
Conversation
Signed-off-by: Basavaraj PB <basavarajbankolli76@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request refactors the component status assignment logic within the registry. In registry/component.go, local status variable initializations were removed, which may result in undefined variable errors during compilation. In registry/model.go, the logic was updated to use a pointer-based approach for _status, ensuring it is only applied to the component definition when the model is not published. I have no feedback to provide.
Siddhi-sahu
left a comment
There was a problem hiding this comment.
hi @BasavarajBankolli, did you validate the changes through the cli? if yes can you please attach screenshots.
Signed-off-by: Basavaraj PB <basavarajbankolli76@gmail.com>
047ef71 to
5e7bacf
Compare
|
Hi @Siddhi-sahu , I’ve validated the changes locally by linking my modified meshkit and regenerating models.
This confirms that redundant status propagation has been removed and defaults are handled correctly. Thank you |


Description
This PR fixes 17918
Previously, generated component definitions included
"status": "enabled"by default. Since"enabled"is already the implicit default behavior, explicitly including it results in redundant data.This PR updates the model generation logic in MeshKit to:
"status": "enabled"by defaultstatusfield when it is explicitly set to a non-default value (e.g.,"ignored")Notes for Reviewers
registry/component.goandregistry/model.goto prevent default status injection.statusis only assigned when required."status": "enabled"."ignored"remains unaffected).Signed commits