FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: cover informer retry after a CR deserialization problem by csviri · Pull Request #3558 · operator-framework/java-operator-sdk · GitHub

test: cover informer retry after a CR deserialization problem - #3558

Open
csviri wants to merge 2 commits into
nextfrom
deserialization-it
Open

test: cover informer retry after a CR deserialization problem#3558
csviri wants to merge 2 commits into
nextfrom
deserialization-it

Conversation

csviri commented Aug 12, 2026
edited
Loading

Copy link
Copy Markdown
Collaborator

Adds an IT for the situation of ADR 002 where the resource that cannot be
deserialized is already present when the informer lists on startup, the
counterpart of MultiVersionCRDIT, which covers the watch case. With
stopOnInformerErrorDuringStartup set to false the operator starts, but the
informer is not retried: the exception handler installed by the informer pool
declines a retry for deserialization errors and the Reflector of the fabric8
client then completes its stop future, so fixing the problem in the cluster
while the operator runs does not bring the informer back.

The test asserts that current behavior, so it fails once the informer does get
retried; the log of the informer pool no longer promises a periodic retry in
this case.

openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 12, 2026

coderabbitai Bot commented Aug 12, 2026
edited
Loading

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f3f8b8af-29aa-4236-b401-8cf5e72f33d4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

csviri linked an issue Aug 12, 2026 that may be closed by this pull request
csviri changed the title test: cover informer retry after a CR deserialization problem [WIP] test: cover informer retry after a CR deserialization problem Aug 12, 2026
Adds an IT for the situation of ADR 002 where the resource that cannot be
deserialized is already present when the informer lists on startup, the
counterpart of MultiVersionCRDIT, which covers the watch case. With
stopOnInformerErrorDuringStartup set to false the operator starts, but the
informer is not retried: the exception handler installed by the informer pool
declines a retry for deserialization errors and the Reflector of the fabric8
client then completes its stop future, so fixing the problem in the cluster
while the operator runs does not bring the informer back.

The test asserts that current behavior, so it fails once the informer does get
retried; the log of the informer pool no longer promises a periodic retry in
this case.
csviri force-pushed the deserialization-it branch from e211983 to 4e8a84c Compare August 21, 2026 11:03
csviri changed the title [WIP] test: cover informer retry after a CR deserialization problem test: cover informer retry after a CR deserialization problem Aug 21, 2026
csviri marked this pull request as ready for review August 21, 2026 11:11
Copilot AI lite review requested due to automatic review settings August 21, 2026 11:11
openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 21, 2026
openshift-ci Bot requested review from metacosm and xstefank August 21, 2026 11:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

This PR adds an integration test documenting current behavior when an informer fails to deserialize an already-present Custom Resource during the initial list-on-startup path (ADR 002 scenario), and adjusts runtime logging to avoid claiming periodic retries in a case where the informer won’t actually be retried.

Changes:

  • Add MultiVersionCRDDeserializationRetryIT to cover deserialization failure during initial informer list and assert the informer does not recover after the offending CR is removed.
  • Update AbstractInformerPool#start logging to explicitly state that deserialization-related startup failures won’t be retried when stopOnInformerErrorDuringStartup=false.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/multiversioncrd/MultiVersionCRDDeserializationRetryIT.java New IT documenting non-retry behavior for startup list deserialization failures and validating runtime health remains degraded.
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/pool/AbstractInformerPool.java Refines startup error logging to avoid promising retries for deserialization exceptions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

csviri commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

This correctly tests the current behavior, although, visiting the topic again, I'm not entirely convinced, if this is the right thing to do, so not to retry on deserialization error. But will stick with this for now, and will re-visit on demand.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Integration Test for Informer Deserialization issues

3 participants


Back | FazBrowse Home | New Git URL