api(#1320): Add ComponentCache to ComponentSupportsConfigWhenManaged (#1320) - #1321
api(#1320): Add ComponentCache to ComponentSupportsConfigWhenManaged (#1320)#1321fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
PR #1314 added ComponentCache but did not update ComponentSupportsConfigWhenManaged() to include it alongside ComponentRedis, ComponentMirror, and ComponentRoute. This caused reconciliation to block when users upgraded with managed Redis (which auto-adds managed cache) and had custom DATA_MODEL_CACHE_CONFIG in their config bundle. This fix adds ComponentCache to the allowlist, enabling managed cache to coexist with user-provided cache configuration. The operator- generated cache config takes precedence via field-group merge in Inflate(), same behavior as managed Redis. Also updated test case at line 1070 to expect no error (experr: false) instead of error (experr: true), matching the pattern used for managed Redis at line 892. Note: pre-commit hooks could not run due to network error (HTTP 403 fetching golangci-lint from GitHub). The post-script will run authoritative pre-commit checks. Closes #1320
|
Hi @fullsend-ai-coder[bot]. Thanks for your PR. I'm waiting for a quay member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. 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-sigs/prow repository. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1321 +/- ##
=======================================
Coverage 67.34% 67.34%
=======================================
Files 27 27
Lines 4251 4251
=======================================
Hits 2863 2863
Misses 1388 1388
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Summary
Adds
ComponentCachetoComponentSupportsConfigWhenManaged()to allow managed cache components to coexist with user-provided cache configuration.PR #1314 introduced the
ComponentCachefeature but did not add it to the list of components that support custom config when managed (alongsideComponentRedis,ComponentMirror, andComponentRoute). This caused reconciliation failures for users upgrading with managed Redis (which auto-adds managed cache) and customDATA_MODEL_CACHE_CONFIGin their config bundle.Changes
apis/quay/v1/quayregistry_types.go: Added|| cmp.Kind == ComponentCachetoComponentSupportsConfigWhenManaged()at line 393controllers/quay/quayregistry_controller_test.go: Updated test case "managed cache and redis but with provided config" to expect no error (experr: false), matching the pattern used for managed RedisTesting
Test_hasNecessaryConfignow passes (previously would fail)./controllers/quay/passmake fmtandmake vetpassBehavior
After this change:
DATA_MODEL_CACHE_CONFIGcan upgrade without reconciliation errorsdocs/upgrades.mdlines 22-24)Closes #1320
Post-script verification
agent/1320-componentcache-config-support)bff5e1b5315f02bfc2373cb2e7039fb7e653a783..HEAD)