Skip to content

fix(snc-profiles): Fix non reachable api while destroying SNC#810

Merged
adrianriobo merged 1 commit into
redhat-developer:mainfrom
adrianriobo:fix-809
May 20, 2026
Merged

fix(snc-profiles): Fix non reachable api while destroying SNC#810
adrianriobo merged 1 commit into
redhat-developer:mainfrom
adrianriobo:fix-809

Conversation

@adrianriobo
Copy link
Copy Markdown
Collaborator

Previously we set the delete of any resource deployed on top of SNC as deleted with the underlaying infra, but even in that case during destroy pulumi was trying to reach the SNC api to check the state for resources, and when it is unrechable it was failing the whole destroy operation, we are now forcing the DeleteUnrechable to true, so it bypass it even if it can not reach the cluster to check the state.

Fixes #809

Previously we set the delete of any resource deployed on top of SNC as deleted with the underlaying infra, but even in that case during destroy pulumi was trying to reach the SNC api to check the state for resources, and when it is unrechable it was failing the whole destroy operation, we are now forcing the DeleteUnrechable to true, so it bypass it even if it can not reach the cluster to check the state. Fixes redhat-developer#809

Signed-off-by: Adrian Riobo <ariobolo@redhat.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 1d3f2152-866b-4654-b66f-01799a54df84

📥 Commits

Reviewing files that changed from the base of the PR and between 9e9d2f0 and fc8920e.

📒 Files selected for processing (1)
  • pkg/target/service/snc/profile/profile.go

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Kubernetes provider now automatically removes unreachable resources, enhancing cluster management reliability and state consistency.

Walkthrough

The change enables Pulumi's DeleteUnreachable behavior in the Kubernetes provider configuration, allowing resources to be destroyed without actively checking cluster state when the API is unreachable.

Changes

Kubernetes Provider Configuration

Layer / File(s) Summary
Kubernetes provider DeleteUnreachable configuration
pkg/target/service/snc/profile/profile.go
NewK8sProvider sets DeleteUnreachable: true in the Kubernetes provider arguments, allowing graceful destroy operations when the cluster API is unreachable.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: enabling DeleteUnreachable behavior to fix destroy failures when SNC API is unreachable.
Description check ✅ Passed The description is directly related to the changeset, explaining the problem and the solution of enabling DeleteUnreachable to bypass API checks during destroy.
Linked Issues check ✅ Passed The PR successfully implements the objective from issue #809 by enabling DeleteUnreachable behavior so destroy operations bypass cluster API state checks when unreachable.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing issue #809; only the Kubernetes provider initialization is modified to enable DeleteUnreachable behavior.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

@jangel97
Copy link
Copy Markdown
Contributor

LGTM

@adrianriobo adrianriobo merged commit f27a0ba into redhat-developer:main May 20, 2026
9 checks passed
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.

[BUG] Openshift snc resources destroy error when api is not reachable

2 participants