fix(dynamic-plugins): omit synthetic deprecated disabled field - #3642
hopehadfield wants to merge 2 commits into
Conversation
Refs: RHIDP-17293 Signed-off-by: Hope Hadfield <hhadfiel@redhat.com>
PR Summary by QodoOmit synthetic deprecated disabled fields from dynamic-plugin YAML
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history |
|
Important The |
|
✅ PR images built and pushed successfully! Images are available for testing (expires in 7 days):
|
Refs: RHIDP-17293 Signed-off-by: Hope Hadfield <hhadfiel@redhat.com>
|
|
✅ PR images built and pushed successfully! Images are available for testing (expires in 7 days):
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3642 +/- ##
==========================================
+ Coverage 59.84% 60.27% +0.43%
==========================================
Files 51 51
Lines 3586 3640 +54
==========================================
+ Hits 2146 2194 +48
- Misses 1246 1249 +3
- Partials 194 197 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|



Summary
Avoid writing
disabled: falseinto dynamic-plugin YAML when the field was never specified. Track whether the deprecated key was present so explicitly supplieddisabled: falseanddisabled: truesurvive operator merges and round trips. Preserveenabledprecedence; update the operator fixture to useenabled.This prevents the operator from generating deprecation warnings for entries that did not use the legacy key. The runtime warning itself is introduced separately in rhdh-plugins#5023.
Related: RHIDP-17293.
Test plan
go test ./pkg/model ./internal/controller -count=1gofmt -l pkg/model/dynamic-plugins.go pkg/model/dynamic-plugins_test.go(no output)disabledis omitted, explicit false/true round-trip, andenabledkeeps precedence.