Skip to content

HYPERFLEET-1016 - refactor: Fix remaining Ready references#89

Merged
openshift-merge-bot[bot] merged 2 commits intoopenshift-hyperfleet:mainfrom
tirthct:hyperfleet-1016-remaining-change
May 5, 2026
Merged

HYPERFLEET-1016 - refactor: Fix remaining Ready references#89
openshift-merge-bot[bot] merged 2 commits intoopenshift-hyperfleet:mainfrom
tirthct:hyperfleet-1016-remaining-change

Conversation

@tirthct
Copy link
Copy Markdown
Contributor

@tirthct tirthct commented May 5, 2026

Summary

Follow-up to PR #87. Addresses remaining Slack review feedback:

  • Replace stale WaitForClusterPhase() / openapi.Ready / Status.Phase code examples with WaitForClusterCondition() / ConditionTypeReconciled / HasResourceCondition — these referenced API features removed in HYPERFLEET-386 (Jan 2026)
  • Update user journey docs from phase terminology (Not Ready / Ready) to condition terminology (Reconciled=False / Reconciled=True)
  • Rename timeout config fields from Ready to Reconciled across Go structs, YAML keys, env vars, defaults, and all consuming code
  • Delete deprecated test case docs (cluster-deprecated/, nodepool-deprecated/) that referenced the removed status.phase field

Scope

Stale code examples (3 files):

  • CLAUDE.md, docs/architecture.md, docs/development.md

User journey docs (3 files, ~60 lines):

  • test-design/user-journeys/hyperfleet-api-cuj.md
  • test-design/user-journeys/hyperfleet-api-e2e-scenario.md
  • test-design/user-journeys/hyperfleet-adapter-cuj.md

Timeout field rename ReadyReconciled (9 files):

  • pkg/config/config.go — struct fields, defaults, logging
  • pkg/config/defaults.go — constant names
  • configs/config.yaml — YAML keys, env var names
  • e2e/cluster/creation.go, concurrent_creation.go, crash_recovery.go
  • e2e/nodepool/creation.go, concurrent_creation.go
  • test-design/testcases/delete-cluster.md

Deprecated test docs deleted (3 files, -1,352 lines):

  • test-design/testcases/cluster-deprecated/adapter-statuses.md
  • test-design/testcases/cluster-deprecated/create-cluster.md
  • test-design/testcases/nodepool-deprecated/create-nodepool.md

Breaking changes

  • Timeout env var names changed: HYPERFLEET_TIMEOUTS_CLUSTER_READYHYPERFLEET_TIMEOUTS_CLUSTER_RECONCILED, HYPERFLEET_TIMEOUTS_NODEPOOL_READYHYPERFLEET_TIMEOUTS_NODEPOOL_RECONCILED
  • Timeout YAML config keys changed: ready:reconciled: under timeouts.cluster and timeouts.nodepool

Test plan

  • make build passes
  • make lint — 0 issues
  • make test — all unit tests pass
  • Tier0 e2e tests pass against dev environment

Summary by CodeRabbit

  • Configuration Changes

    • Timeout keys renamed from "ready" to "reconciled" for cluster and nodepool lifecycle waits.
  • Documentation

    • Guides, examples, and user-journeys updated to use a condition-based status model (Reconciled) instead of phase-based statuses.
    • Removed deprecated E2E test-case documentation files.
  • Tests

    • E2E tests updated to wait for and assert the Reconciled condition across cluster and nodepool workflows.

@openshift-ci openshift-ci Bot requested review from rafabene and vkareh May 5, 2026 17:15
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

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: dc6f85df-8a59-4dce-9f2f-c612b02c30de

📥 Commits

Reviewing files that changed from the base of the PR and between dd7ebc5 and 35b4bab.

📒 Files selected for processing (1)
  • docs/development.md
✅ Files skipped from review due to trivial changes (1)
  • docs/development.md

Walkthrough

The pull request converts readiness checks from a phase-based model to a condition-based model across tests, configs, code, and docs. Timeouts and struct fields in pkg/config were renamed from Ready → Reconciled and defaults updated accordingly. E2E tests for clusters and nodepools now call WaitForClusterCondition/WaitForNodePoolCondition and use Reconciled timeouts. Configuration examples and documentation (CLAUDE.md, docs/architecture.md, docs/development.md, user journeys, and API E2E scenarios) were updated to reference the Reconciled condition. Several deprecated test-case Markdown files were removed.

Sequence Diagram(s)

sequenceDiagram
    participant Test as Test Suite / Helper
    participant API as HyperFleet API / Controller
    participant Adap as Adapters
    participant K8s as Kubernetes / Status Store

    Test->>API: Create Cluster request
    API->>K8s: Persist Cluster resource (generation N)
    Adap->>K8s: Start adapter work for generation N
    Test->>API: WaitForClusterCondition(Reconciled=True, timeout=h.Cfg.Timeouts.Cluster.Reconciled)
    loop Polling
        Test->>API: Get Cluster status (generation N)
        API->>K8s: Read Cluster conditions
        K8s-->>API: Return conditions (Reconciled: False/True)
        API-->>Test: Return current conditions
    end
    Adap->>K8s: Update adapter condition(s) -> may set Reconciled=True when all complete
    K8s-->>API: Updated conditions
    API-->>Test: Reconciled=True (Test proceeds)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: refactoring to fix remaining Ready references by updating them to Reconciled throughout the codebase.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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 `@docs/development.md`:
- Around line 97-99: The example uses client.ConditionTypeReconciled but the
import block is missing the package; update the Go example's imports to include
"github.com/openshift-hyperfleet/hyperfleet-e2e/pkg/client" so references like
client.ConditionTypeReconciled compile, ensuring the import is added alongside
the existing imports in the example.
🪄 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: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 8502e191-8796-4ccc-9b65-f2c1a533ed5c

📥 Commits

Reviewing files that changed from the base of the PR and between bb66379 and dd7ebc5.

📒 Files selected for processing (18)
  • CLAUDE.md
  • configs/config.yaml
  • docs/architecture.md
  • docs/development.md
  • e2e/cluster/concurrent_creation.go
  • e2e/cluster/crash_recovery.go
  • e2e/cluster/creation.go
  • e2e/nodepool/concurrent_creation.go
  • e2e/nodepool/creation.go
  • pkg/config/config.go
  • pkg/config/defaults.go
  • test-design/testcases/cluster-deprecated/adapter-statuses.md
  • test-design/testcases/cluster-deprecated/create-cluster.md
  • test-design/testcases/delete-cluster.md
  • test-design/testcases/nodepool-deprecated/create-nodepool.md
  • test-design/user-journeys/hyperfleet-adapter-cuj.md
  • test-design/user-journeys/hyperfleet-api-cuj.md
  • test-design/user-journeys/hyperfleet-api-e2e-scenario.md
💤 Files with no reviewable changes (3)
  • test-design/testcases/cluster-deprecated/create-cluster.md
  • test-design/testcases/cluster-deprecated/adapter-statuses.md
  • test-design/testcases/nodepool-deprecated/create-nodepool.md

Comment thread docs/development.md
@rafabene
Copy link
Copy Markdown
Contributor

rafabene commented May 5, 2026

/lgtm

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 5, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rafabene

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 label May 5, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 591aebd into openshift-hyperfleet:main May 5, 2026
5 checks passed
@tirthct tirthct deleted the hyperfleet-1016-remaining-change branch May 5, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants