fix: keep comparableResourceVersions when copying a dependent resource's informer configuration - #3625
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Fixes propagation of comparableResourceVersions when copying informer configuration to dependent resources, ensuring the explicitly configured value is preserved.
Changes:
- Copy
comparableResourceVersionsinInformerEventSourceConfiguration#updateFrom(...). - Add a regression test verifying
updateFrompreservescomparableResourceVersionsinstead of falling back to defaults.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/informer/InformerEventSourceConfiguration.java | Ensures updateFrom copies comparableResourceVersions from the source informer config. |
| operator-framework-core/src/test/java/io/javaoperatorsdk/operator/api/config/InformerEventSourceConfigurationTest.java | Adds a regression test that fails without the new copy behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…e's informer configuration Signed-off-by: Antonio Fernandez Alhambra <antonio.alhambra@hivemq.com>
a4fab6e to
62caae7
Compare
updateFromwasn't copyingcomparableResourceVersions, so it fell back to the default and setting it on a dependent resource had no effect. One line, plus a test that fails without it.Worth noting it's a real behaviour change for anyone who set it to false on a dependent: they now actually get the temporary resource cache disabled, so read-your-own-write is off for that secondary. That's what they asked for, but they haven't been getting it.
Fixes #3624