Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

OSAC-1586: add DELETING and DELETE_FAILED states to ClusterState enum - #913

Merged
openshift-merge-bot[bot] merged 2 commits into
osac-project:mainfrom
vladikr:feat/OSAC-1586-cluster-deleting-state
Jul 16, 2026
Merged

openshift-merge-bot[bot] merged 2 commits into
osac-project:mainfrom
vladikr:feat/OSAC-1586-cluster-deleting-state

Conversation

@vladikr

@vladikr vladikr commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add CLUSTER_STATE_DELETING (4) and CLUSTER_STATE_DELETE_FAILED (5) to the ClusterState proto enum in both private and public APIs
  • Follows the convention established by all other OSAC resource types (ComputeInstance, Subnet, SecurityGroup, PublicIP, etc.)
  • Enables the osac-operator FeedbackReconciler to report cluster deletion state to the fulfillment-service

Test plan

  • buf lint passes
  • buf generate succeeds
  • Existing unit tests pass (ginkgo run -r internal)

Companion PR: osac-project/osac-operator (pending — implements the FeedbackReconciler changes that consume these new states)

Assisted-by: Claude Code noreply@anthropic.com

Summary by CodeRabbit

  • New Features
    • Added cluster lifecycle statuses for deletion in progress and deletion failure.
    • Cluster status reporting can now indicate deletion errors with additional details.

@openshift-ci-robot

openshift-ci-robot commented Jul 15, 2026 •

Copy link
Copy Markdown

@vladikr: This pull request references OSAC-1586 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Add CLUSTER_STATE_DELETING (4) and CLUSTER_STATE_DELETE_FAILED (5) to the ClusterState proto enum in both private and public APIs
  • Follows the convention established by all other OSAC resource types (ComputeInstance, Subnet, SecurityGroup, PublicIP, etc.)
  • Enables the osac-operator FeedbackReconciler to report cluster deletion state to the fulfillment-service

Test plan

  • buf lint passes
  • buf generate succeeds
  • Existing unit tests pass (ginkgo run -r internal)

Companion PR: osac-project/osac-operator (pending — implements the FeedbackReconciler changes that consume these new states)

Assisted-by: Claude Code noreply@anthropic.com

Instructions 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 openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: b8e18111-49c7-41ee-b69d-2be52ce5bd4d

📥 Commits

Reviewing files that changed from the base of the PR and between d7ed9fc and 83b75e9.

⛔ Files ignored due to path filters (4)
  • internal/api/osac/private/v1/cluster_type.pb.go is excluded by !**/*.pb.go
  • internal/api/osac/private/v1/cluster_type_protoopaque.pb.go is excluded by !**/*.pb.go
  • internal/api/osac/public/v1/cluster_type.pb.go is excluded by !**/*.pb.go
  • internal/api/osac/public/v1/cluster_type_protoopaque.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (2)
  • proto/private/osac/private/v1/cluster_type.proto
  • proto/public/osac/public/v1/cluster_type.proto

Walkthrough

The private and public ClusterState enums now include CLUSTER_STATE_DELETING = 4 and CLUSTER_STATE_DELETE_FAILED = 5, with public inline documentation and reserved values.

Changes

Cluster lifecycle states

Layer / File(s) Summary
ClusterState enum contract
proto/private/osac/private/v1/cluster_type.proto, proto/public/osac/public/v1/cluster_type.proto
Both schemas add deleting and delete-failed states with numeric values 4 and 5; the public schema documents the states and reserves those values.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: eliorerz, eranco74

🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change by adding the two new ClusterState enum values.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Hardcoded-Secrets ✅ Passed The PR only adds enum values in two proto files; no API keys, tokens, passwords, private keys, credentialed URLs, or string literals assigned to secret-named variables appear in the diff.
No-Weak-Crypto ✅ Passed Changed files only add cluster-state enum values/comments; no weak-crypto patterns, custom crypto, or secret-comparison code appears in the diff.
No-Injection-Vectors ✅ Passed Only proto enum values were added; no SQL/shell/eval/yaml/pickle/HTML injection patterns appear in the touched files.
Container-Privileges ✅ Passed PR modifies only proto files (.proto) and their generated Go bindings; no Kubernetes manifests, Dockerfiles, or container security configurations are present or modified.
No-Sensitive-Data-In-Logs ✅ Passed PASS: The PR only adds enum values and updates generated proto code; no new log statements or sensitive-data exposure paths were introduced.
Ai-Attribution ✅ Passed PR commits and description use Red Hat-style Assisted-by: Claude Code; neither PR commit uses Co-Authored-By for AI.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@vladikr
vladikr force-pushed the feat/OSAC-1586-cluster-deleting-state branch from d7ed9fc to c3ded20 Compare July 15, 2026 22:32

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@proto/public/osac/public/v1/cluster_type.proto`:
- Around line 284-288: Update the CLUSTER_STATE_DELETE_FAILED documentation to
reference the existing error-bearing field in ClusterStatus instead of
status.message. Use the actual field name exposed by ClusterStatus, or remove
the field reference if no suitable field exists; do not introduce a new message
field as part of this documentation change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 1baf93e5-aafb-4e0a-8d50-0f99bef271c8

📥 Commits

Reviewing files that changed from the base of the PR and between 18890dd and d7ed9fc.

⛔ Files ignored due to path filters (4)
  • internal/api/osac/private/v1/cluster_type.pb.go is excluded by !**/*.pb.go
  • internal/api/osac/private/v1/cluster_type_protoopaque.pb.go is excluded by !**/*.pb.go
  • internal/api/osac/public/v1/cluster_type.pb.go is excluded by !**/*.pb.go
  • internal/api/osac/public/v1/cluster_type_protoopaque.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (2)
  • proto/private/osac/private/v1/cluster_type.proto
  • proto/public/osac/public/v1/cluster_type.proto

Comment on lines +284 to +288
// The cluster deletion has failed.
//
// The deprovision operation encountered an error and could not complete.
// The status.message field will contain specific error details.
CLUSTER_STATE_DELETE_FAILED = 5;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Document an existing error field instead of status.message.

ClusterStatus has no message field, so clients cannot find the deletion error details promised here. Reference an existing error-bearing field, or add message as a separate API contract change.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@proto/public/osac/public/v1/cluster_type.proto` around lines 284 - 288,
Update the CLUSTER_STATE_DELETE_FAILED documentation to reference the existing
error-bearing field in ClusterStatus instead of status.message. Use the actual
field name exposed by ClusterStatus, or remove the field reference if no
suitable field exists; do not introduce a new message field as part of this
documentation change.

vladikr added 2 commits July 16, 2026 07:06
Add CLUSTER_STATE_DELETING (4) and CLUSTER_STATE_DELETE_FAILED (5)
to the ClusterState proto enum in both private and public APIs,
matching the convention used by all other OSAC resource types.

This enables the osac-operator FeedbackReconciler to report cluster
deletion state to the fulfillment-service.

Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Vladik Romanovsky <vromanso@redhat.com>
ClusterStatus has no top-level message field; error details are in
the status conditions.

Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Vladik Romanovsky <vromanso@redhat.com>
@vladikr
vladikr force-pushed the feat/OSAC-1586-cluster-deleting-state branch from c3ded20 to 83b75e9 Compare July 16, 2026 11:06
@openshift-ci

openshift-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sk-ilya, vladikr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the lgtm label Jul 16, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 0ef76a3 into osac-project:main Jul 16, 2026
12 checks passed
@vladikr

vladikr commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @sk-ilya !

This branch was previously deployed

1 inactive deployment
e2e-test — 83b75e91 Deployed Jul 16, 2026 by vladikr via e2e-vmaas-full-install / e2e #525
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants