Skip to content

ROSAENG-62355 feat: exercise cluster delete via rosactl CLI in e2e tests - #161

Open
rrp-bot wants to merge 1 commit into
openshift-online:mainfrom
rrp-bot:feat/cluster-delete-e2e
Open

ROSAENG-62355 feat: exercise cluster delete via rosactl CLI in e2e tests#161
rrp-bot wants to merge 1 commit into
openshift-online:mainfrom
rrp-bot:feat/cluster-delete-e2e

Conversation

@rrp-bot

@rrp-bot rrp-bot commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Updates the e2e CLI suite to exercise the new rosactl cluster delete subcommand (companion to openshift-online/rosa-hyperfleet-cli#100) rather than calling the platform API DELETE endpoint directly.

Changes

test/e2e-cli/cluster_test.go

  • Replaces the direct apiClient.Delete call with rosactl cluster delete <clusterID> --yes
  • Polling/wait spec behaviour is unchanged; uses customerApiClient consistently with the rest of the cleanup block
  • Adds cluster-delete Ginkgo label to both specs so they can be targeted independently:
    ginkgo --label-filter="cluster-delete" ./test/e2e-cli

Depends on

openshift-online/rosa-hyperfleet-cli#100

Summary by CodeRabbit

  • Bug Fixes

    • Improved HCP cluster deletion end-to-end test coverage.
    • Added verification that deleted clusters are fully removed and return expected not-found responses.
  • Tests

    • Updated CLI test labels and cleanup workflows to reflect the current cluster deletion process.

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 22, 2026
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift-online/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f5d76abf-f3ec-4630-916c-aa1e498eb849

📥 Commits

Reviewing files that changed from the base of the PR and between 9acdc11 and 07cc53f.

📒 Files selected for processing (1)
  • test/e2e-cli/cluster_test.go

Walkthrough

The HCP cluster cleanup E2E tests now delete clusters through rosactl cluster delete and verify removal by polling the platform API for 404 or 410. The available CLI test label comment also includes hcp-patch.

Changes

HCP cluster cleanup

Layer / File(s) Summary
CLI deletion and API verification
test/e2e-cli/cluster_test.go
The cleanup flow uses rosactl cluster delete <clusterID> ... --yes, then polls the platform API until the cluster is absent. The available-labels comment includes hcp-patch.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: jira/valid-reference

Suggested reviewers: cdoan1, typeid, jmelis

🚥 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 Clear and specific: it states the key change of exercising cluster delete via rosactl in e2e tests.
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-Weak-Crypto ✅ Passed Touched test code only uses crypto/tls with default tls.Config; no MD5/SHA1/DES/RC4/3DES/custom crypto or secret comparisons found.
Container-Privileges ✅ Passed PR only changes test/e2e-cli/cluster_test.go; no container/K8s manifests were modified, and no new privilege flags were introduced.
No-Sensitive-Data-In-Logs ✅ Passed No new logs print secrets/PII; added messages only include cluster name/ID and delete-command output, with no passwords/tokens/hostnames/customer data in the diff.
No-Hardcoded-Secrets ✅ Passed No hardcoded secrets, tokens, passwords, embedded-credential URLs, or base64 blobs were introduced; only benign IDs/region strings appear.
No-Injection-Vectors ✅ Passed The diff only adds exec.Command with fixed args for rosactl delete; no shell=True/eval/yaml.load/os.system/dangerous HTML patterns are introduced.
Ai-Attribution ✅ Passed No AI-tool mention appears in the commit/PR text, and the HEAD commit has no Assisted-by/Generated-by/Co-Authored-By trailers.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


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.

@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown

Hi @rrp-bot. Thanks for your PR.

I'm waiting for a openshift-online member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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 kubernetes-sigs/prow repository.

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 22, 2026
@psav psav changed the title feat: exercise cluster delete via rosactl CLI in e2e tests ROSAENG-62355 feat: exercise cluster delete via rosactl CLI in e2e tests Jul 22, 2026
@psav

psav commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

/ok-to-test

@openshift-ci openshift-ci Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 27, 2026
Replace the direct platform API DELETE call with `rosactl cluster delete`
to give the new subcommand e2e coverage. The polling/wait spec is
unchanged in behaviour but uses customerApiClient consistently with the
rest of the cleanup block.

Adds the cluster-delete Ginkgo label so the two specs can be targeted
independently: ginkgo --label-filter="cluster-delete"
@rrp-bot
rrp-bot force-pushed the feat/cluster-delete-e2e branch from d374ca2 to 07cc53f Compare July 27, 2026 10:45
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 27, 2026

@typeid typeid left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

/test on-demand-e2e
/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2026
@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rrp-bot, typeid

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 31, 2026
@cdoan1

cdoan1 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

/test on-demand-e2e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants