Skip to content

improve: integration test to showcase external resource state in status - #3480

Merged
csviri merged 4 commits into
nextfrom
external-resource-state-in-status
Jul 29, 2026
Merged

improve: integration test to showcase external resource state in status#3480
csviri merged 4 commits into
nextfrom
external-resource-state-in-status

Conversation

@csviri

@csviri csviri commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 8, 2026 11:44
@openshift-ci
openshift-ci Bot requested review from metacosm and xstefank July 8, 2026 11:44
@csviri csviri changed the title external resource state in status Jul 8, 2026
@csviri
csviri force-pushed the external-resource-state-in-status branch from d0165ba to 3ef1ccf Compare July 8, 2026 11:45
@csviri
csviri changed the base branch from main to next July 8, 2026 11:46
@csviri
csviri force-pushed the external-resource-state-in-status branch from 3ef1ccf to c3077df Compare July 8, 2026 11:47
@csviri
csviri force-pushed the external-resource-state-in-status branch from c3077df to 1b6eae8 Compare July 8, 2026 11:49
@csviri csviri changed the title improve: external resource state in status Jul 8, 2026

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.

Pull request overview

This PR adds new integration-test samples demonstrating how to manage an external resource while persisting the external resource identifier (state) directly in the primary custom resource status, including a workflow-based variant using a dependent resource. It also updates the Maven version across the multi-module build.

Changes:

  • Added a base API sample reconciler + IT showing external state persisted in status and coordinated with a polling event source.
  • Added a workflow sample (dependent resource + reconciler + IT) showing external state persisted in status to avoid duplicate creation.
  • Updated the root and module POMs to use version 999-SNAPSHOT.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pom.xml Sets root project version to 999-SNAPSHOT.
operator-framework/pom.xml Updates parent version to 999-SNAPSHOT.
operator-framework-core/pom.xml Updates parent version to 999-SNAPSHOT.
operator-framework-junit/pom.xml Updates parent version to 999-SNAPSHOT.
operator-framework-bom/pom.xml Updates BOM version to 999-SNAPSHOT.
micrometer-support/pom.xml Updates parent version to 999-SNAPSHOT.
caffeine-bounded-cache-support/pom.xml Updates parent version to 999-SNAPSHOT.
migration/pom.xml Updates parent version to 999-SNAPSHOT.
bootstrapper-maven-plugin/pom.xml Updates parent version to 999-SNAPSHOT.
test-index-processor/pom.xml Updates parent version to 999-SNAPSHOT.
sample-operators/pom.xml Updates parent version to 999-SNAPSHOT.
sample-operators/webpage/pom.xml Updates parent version to 999-SNAPSHOT.
sample-operators/tomcat-operator/pom.xml Updates parent version to 999-SNAPSHOT.
sample-operators/operations/pom.xml Updates parent version to 999-SNAPSHOT.
sample-operators/mysql-schema/pom.xml Updates parent version to 999-SNAPSHOT.
sample-operators/leader-election/pom.xml Updates parent version to 999-SNAPSHOT.
sample-operators/controller-namespace-deletion/pom.xml Updates parent version to 999-SNAPSHOT.
operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/externalstateinstatus/ExternalStateInStatusReconciler.java New reconciler sample managing an external resource with state stored in status.
operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/externalstateinstatus/ExternalStateInStatusIT.java New IT validating the base API “state in status” approach.
operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/externalstateinstatus/ExternalStateInStatusCustomResource.java New CR type for the base API sample.
operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/externalstateinstatus/ExternalStateInStatusSpec.java New spec POJO for the base API sample.
operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/externalstateinstatus/ExternalStateInStatusStatus.java New status POJO holding the external ID for the base API sample.
operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/externalstateinstatus/ExternalStateInStatusDependentResource.java New dependent resource implementing external resource CRUD with ID sourced from status.
operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/externalstateinstatus/ExternalStateInStatusWorkflowReconciler.java New workflow reconciler that patches status with the external ID after dependent reconciliation.
operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/externalstateinstatus/ExternalStateInStatusWorkflowIT.java New IT validating the workflow-based “state in status” approach.
operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/externalstateinstatus/ExternalStateInStatusWorkflowCustomResource.java New CR type for the workflow sample.
operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/externalstateinstatus/ExternalStateInStatusSpec.java New spec POJO for the workflow sample.
operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/externalstateinstatus/ExternalStateInStatusStatus.java New status POJO holding the external ID for the workflow sample.
@csviri
csviri marked this pull request as draft July 10, 2026 07:27
@openshift-ci 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 Jul 10, 2026
@csviri
csviri force-pushed the next branch 3 times, most recently from 0870cb3 to fbce8b2 Compare July 22, 2026 13:59
@csviri csviri linked an issue Jul 27, 2026 that may be closed by this pull request
…y status

Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@csviri
csviri force-pushed the external-resource-state-in-status branch from 1b6eae8 to bb09082 Compare July 27, 2026 13:07
csviri and others added 2 commits July 27, 2026 15:18
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@csviri
csviri force-pushed the external-resource-state-in-status branch from 88c0775 to 0a9dc4c Compare July 27, 2026 13:18
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@csviri
csviri marked this pull request as ready for review July 27, 2026 16:17
@openshift-ci 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 Jul 27, 2026
@openshift-ci
openshift-ci Bot requested a review from xstefank July 27, 2026 16:17
@csviri
csviri merged commit 7e5a900 into next Jul 29, 2026
27 checks passed
@csviri
csviri deleted the external-resource-state-in-status branch July 29, 2026 07:21
csviri added a commit that referenced this pull request Aug 28, 2026
…us (#3480)

Add integration tests that showcases handling explicit state in status. Both for simple managed/secondary resources and using a dependent resource.


Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants