Skip to content

HYPERFLEET-853 - feat: Add Reconciled to OpenAPI spec#34

Merged
openshift-merge-bot[bot] merged 4 commits into
openshift-hyperfleet:mainfrom
tirthct:hyperfleet-853
Apr 28, 2026
Merged

HYPERFLEET-853 - feat: Add Reconciled to OpenAPI spec#34
openshift-merge-bot[bot] merged 4 commits into
openshift-hyperfleet:mainfrom
tirthct:hyperfleet-853

Conversation

@tirthct
Copy link
Copy Markdown
Contributor

@tirthct tirthct commented Apr 28, 2026

Summary

  • Add Reconciled condition type to the OpenAPI spec alongside Ready (backward-compatible)
  • Add Finalized condition to adapter status documentation and examples
  • Mark Ready as deprecated in ClusterStatus and NodePoolStatus descriptions
  • Bump API version to 1.0.8

Context

Supports HYPERFLEET-853 in the hyperfleet-api repo. The Reconciled condition replaces Ready with broader semantics — it means "the desired state has been fully reconciled" which works for both normal lifecycle (all adapters Available) and deletion lifecycle (all adapters Finalized).

Finalized is an adapter-reported condition indicating cleanup completion during deletion. It is already supported by the adapter framework (hyperfleet-adapter#104) and consumed by the API to compute Reconciled.

Changes

Reconciled:

  • Added Reconciled to ConditionType union in models/common/model.tsp
  • Added example constants (ExampleReconciledReason, ExampleReconciledMessage)
  • Added Reconciled condition to all response examples (core + GCP, clusters + nodepools, normal + deleted)
  • Updated mandatory conditions description in ClusterStatus and NodePoolStatus
  • Marked Ready as deprecated in both descriptions
  • Updated service description in services/clusters.tsp
  • minItems remains at 2 to avoid breaking existing clients

Finalized:

  • Added Finalized to AdapterCondition and AdapterStatus.conditions descriptions
  • Added example constants (ExampleAdapter1FinalizedReason, ExampleAdapter1FinalizedMessage)
  • Added Finalized condition to AdapterStatus and AdapterStatusCreateRequest examples

Test plan

  • npm run build:all succeeds
  • Generated schemas/core/openapi.yaml includes Reconciled and Finalized changes
  • Generated schemas/gcp/openapi.yaml includes Reconciled and Finalized changes
  • aliases.tsp symlink not modified in commit

Summary by CodeRabbit

Release Notes

  • New Features

    • Added "Reconciled" condition to cluster and nodepool statuses to indicate when adapters have fully reconciled desired state at the current generation.
    • Introduced "Finalized" condition type for adapter status tracking.
  • Deprecations

    • "Ready" condition is now deprecated in favor of "Reconciled" for cluster and nodepool status.
  • General

    • Updated API version to 1.0.8.

@openshift-ci openshift-ci Bot requested review from rh-amarin and vkareh April 28, 2026 03:16
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This pull request introduces two new condition types to the API schema and updates the API version from 1.0.7 to 1.0.8. A new mandatory Reconciled condition type is added for Cluster and NodePool resources, documenting when all adapters have fully reconciled the desired state at the current generation. The Ready condition is marked as deprecated in favor of Reconciled. Additionally, a Finalized condition type is introduced for adapter resources. Example data and documentation are updated across TypeSpec models and OpenAPI/Swagger schema files to reflect these additions, with proper timestamps and observed_generation values. No operational logic or endpoint behavior is changed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 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 clearly describes the main change: adding a Reconciled condition type to the OpenAPI spec with a version bump to 1.0.8, which aligns with the core changes across multiple model files and schema documents.
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.

✏️ 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
schemas/core/openapi.yaml (1)

171-189: ⚠️ Potential issue | 🟠 Major

Delete examples contradict the new Reconciled semantics.

Both delete response examples increment generation to 2 but show Reconciled: True with observed_generation: 1. That conflicts with the documented meaning (“fully reconciled … at the current generation”) and can cause clients to treat deletion as already reconciled.

Proposed fix (example direction)
                 generation: 2
                 status:
                   conditions:
                     - type: Reconciled
-                      status: 'True'
-                      reason: All adapters reported Reconciled True for the current generation
-                      message: All adapters reported Reconciled True for the current generation
-                      observed_generation: 1
+                      status: 'False'
+                      reason: ReconciliationPending
+                      message: Desired state for generation 2 is not yet fully reconciled
+                      observed_generation: 2

Also applies to: 370-392, 1185-1187, 1551-1553

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@schemas/core/openapi.yaml` around lines 171 - 189, The delete response
examples show generation: 2 but Reconciled type with observed_generation: 1,
which contradicts the Reconciled semantics; update those examples so Reconciled
is only true when observed_generation equals generation—either set
observed_generation: 2 to match generation or change the Reconciled condition to
status: 'False' (and keep observed_generation: 1) for the delete examples; apply
the same fix to the other occurrences referenced (around the blocks at the other
locations).
🧹 Nitpick comments (3)
services/clusters.tsp (1)

41-41: Clarify mandatory-condition wording to match enforceable schema.

Line 41 says all three conditions are mandatory, but the models currently allow @minItems(2). That mismatch can confuse client expectations and generated docs. Consider wording this as “initially includes”/“expected conditions” until the schema can enforce 3 in a breaking version.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@services/clusters.tsp` at line 41, Update the text that states
"status.conditions will include mandatory 'Available', 'Ready' and 'Reconciled'
conditions" to reflect the current schema by changing it to phrasing like
"status.conditions initially includes/is expected to include 'Available',
'Ready' and 'Reconciled' conditions" and add a short parenthetical noting the
models currently use `@minItems`(2) so enforcement of three conditions is not yet
in the schema; reference the status.conditions field and the `@minItems`(2)
constraint in your note so readers understand the mismatch until a breaking
schema change is made.
models/nodepools/model.tsp (1)

33-34: Avoid enforceability ambiguity in mandatory-condition docs.

Lines 33-34 describe three mandatory conditions, while conditions remains @minItems(2) (Line 39). Consider rephrasing to “expected/present on creation” to keep docs aligned with what schema validators can enforce today.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@models/nodepools/model.tsp` around lines 33 - 34, The doc text claims three
"mandatory" conditions but the schema for the conditions array is `@minItems`(2),
creating ambiguity; update the prose around the `conditions` field to avoid
enforceability language (e.g., change "mandatory" to "expected/present on
creation" or similar) and clarify that `type: "Ready"` is deprecated in favor of
`type: "Reconciled"`, without implying the schema enforces three items; edit the
comment block that lists `type: "Ready"` and `type: "Reconciled"` and the
surrounding description of `conditions` to reflect the two-item minimum and that
additional conditions may be present but are not strictly enforced by the
schema.
models/clusters/model.tsp (1)

36-37: Keep ClusterStatus wording consistent with schema constraints.

Lines 36-37 call out three mandatory conditions, but @minItems(2) (Line 42) does not enforce that. Rewording to “expected at creation” would reduce client-contract ambiguity until a stricter schema change is possible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@models/clusters/model.tsp` around lines 36 - 37, Update the ClusterStatus
conditions wording so it no longer claims three conditions are "mandatory";
change the phrasing around the `Ready` and `Reconciled` condition descriptions
to indicate they are "expected at creation" (or similar) to match the current
schema constraint `@minItems(2)` on the conditions array. Locate the
ClusterStatus documentation block that names `type: "Ready"` and `type:
"Reconciled"` and reword those lines to remove "mandatory" language and
explicitly note the schema currently requires at least two conditions
(`@minItems(2)`), reducing client-contract ambiguity until the schema is
tightened.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@schemas/core/openapi.yaml`:
- Around line 171-189: The delete response examples show generation: 2 but
Reconciled type with observed_generation: 1, which contradicts the Reconciled
semantics; update those examples so Reconciled is only true when
observed_generation equals generation—either set observed_generation: 2 to match
generation or change the Reconciled condition to status: 'False' (and keep
observed_generation: 1) for the delete examples; apply the same fix to the other
occurrences referenced (around the blocks at the other locations).

---

Nitpick comments:
In `@models/clusters/model.tsp`:
- Around line 36-37: Update the ClusterStatus conditions wording so it no longer
claims three conditions are "mandatory"; change the phrasing around the `Ready`
and `Reconciled` condition descriptions to indicate they are "expected at
creation" (or similar) to match the current schema constraint `@minItems(2)` on
the conditions array. Locate the ClusterStatus documentation block that names
`type: "Ready"` and `type: "Reconciled"` and reword those lines to remove
"mandatory" language and explicitly note the schema currently requires at least
two conditions (`@minItems(2)`), reducing client-contract ambiguity until the
schema is tightened.

In `@models/nodepools/model.tsp`:
- Around line 33-34: The doc text claims three "mandatory" conditions but the
schema for the conditions array is `@minItems`(2), creating ambiguity; update the
prose around the `conditions` field to avoid enforceability language (e.g.,
change "mandatory" to "expected/present on creation" or similar) and clarify
that `type: "Ready"` is deprecated in favor of `type: "Reconciled"`, without
implying the schema enforces three items; edit the comment block that lists
`type: "Ready"` and `type: "Reconciled"` and the surrounding description of
`conditions` to reflect the two-item minimum and that additional conditions may
be present but are not strictly enforced by the schema.

In `@services/clusters.tsp`:
- Line 41: Update the text that states "status.conditions will include mandatory
'Available', 'Ready' and 'Reconciled' conditions" to reflect the current schema
by changing it to phrasing like "status.conditions initially includes/is
expected to include 'Available', 'Ready' and 'Reconciled' conditions" and add a
short parenthetical noting the models currently use `@minItems`(2) so enforcement
of three conditions is not yet in the schema; reference the status.conditions
field and the `@minItems`(2) constraint in your note so readers understand the
mismatch until a breaking schema change is made.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 68c7cc2d-f4f1-4328-ad92-1050a3d487f5

📥 Commits

Reviewing files that changed from the base of the PR and between fe59c7a and c5756e7.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (13)
  • main.tsp
  • models-core/cluster/example_cluster.tsp
  • models-core/nodepool/example_nodepool.tsp
  • models-gcp/cluster/example_cluster.tsp
  • models-gcp/nodepool/example_nodepool.tsp
  • models/clusters/model.tsp
  • models/common/model.tsp
  • models/nodepools/model.tsp
  • schemas/core/openapi.yaml
  • schemas/core/swagger.yaml
  • schemas/gcp/openapi.yaml
  • schemas/gcp/swagger.yaml
  • services/clusters.tsp

Comment thread schemas/core/openapi.yaml Outdated
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

🧹 Nitpick comments (1)
schemas/core/openapi.yaml (1)

1194-1195: Add an explicit backward-compatibility note for minItems: 2.

The prose now says three conditions are mandatory, but schema validation still allows two (minItems: 2). Consider documenting this exception directly in these descriptions to avoid consumer confusion.

Proposed doc tweak
             **Mandatory conditions**: 
             - `type: "Ready"` *(deprecated — use Reconciled)*: Whether all adapters report successfully at the current generation.
             - `type: "Reconciled"`: Whether the resource's desired state has been fully reconciled by all adapters at the current generation.
             - `type: "Available"`: Aggregated adapter result for a common observed_generation.
+            Note: `minItems` remains `2` for backward compatibility with existing clients.

Also applies to: 1560-1561

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@schemas/core/openapi.yaml` around lines 1194 - 1195, The documentation text
says three conditions are mandatory but the OpenAPI schema still allows two via
"minItems: 2"; update the descriptions for the condition list (the prose entries
for `type: "Ready"` and `type: "Reconciled"`) to include a short
backward-compatibility note that explains "minItems: 2" is accepted for
compatibility (and new clients should expect three conditions), and apply the
same explanatory sentence to the analogous description block referenced around
the other occurrence (the lines noted in the review). Ensure you mention the
exact schema constraint `minItems: 2` in the note so consumers see why the prose
and schema differ.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@schemas/core/openapi.yaml`:
- Around line 182-189: The delete example's Reconciled condition is
inconsistent: resource `generation` is set to 2 but the Reconciled entry shows
observed_generation: 1 while the reason/message says "at the current
generation"; update the Reconciled entries (the block with type: Reconciled,
observed_generation, created_time, last_updated_time, last_transition_time) to
use observed_generation: 2 and adjust timestamps to match the delete example's
current generation, or alternatively change the reason/message to indicate the
observed generation is 1—apply the same fix to both occurrences (the Reconciled
blocks around lines with observed_generation: 1, including the one referenced at
186 and the similar block at 389).

---

Nitpick comments:
In `@schemas/core/openapi.yaml`:
- Around line 1194-1195: The documentation text says three conditions are
mandatory but the OpenAPI schema still allows two via "minItems: 2"; update the
descriptions for the condition list (the prose entries for `type: "Ready"` and
`type: "Reconciled"`) to include a short backward-compatibility note that
explains "minItems: 2" is accepted for compatibility (and new clients should
expect three conditions), and apply the same explanatory sentence to the
analogous description block referenced around the other occurrence (the lines
noted in the review). Ensure you mention the exact schema constraint `minItems:
2` in the note so consumers see why the prose and schema differ.
🪄 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: c0c14637-9ca8-4dd0-be39-db992db7b277

📥 Commits

Reviewing files that changed from the base of the PR and between 954d4fc and 649d9f1.

📒 Files selected for processing (7)
  • models/common/model.tsp
  • models/statuses/example_adapter_status.tsp
  • models/statuses/model.tsp
  • schemas/core/openapi.yaml
  • schemas/core/swagger.yaml
  • schemas/gcp/openapi.yaml
  • schemas/gcp/swagger.yaml
✅ Files skipped from review due to trivial changes (2)
  • models/statuses/model.tsp
  • models/statuses/example_adapter_status.tsp
🚧 Files skipped from review as they are similar to previous changes (3)
  • schemas/gcp/openapi.yaml
  • schemas/core/swagger.yaml
  • schemas/gcp/swagger.yaml

Comment thread schemas/core/openapi.yaml
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.

🧹 Nitpick comments (1)
schemas/core/swagger.yaml (1)

1363-1379: Clarify the “mandatory” wording vs minItems: 2 contract.

The descriptions now declare three mandatory conditions, but the schema still validates arrays with only 2 items. That creates a contract ambiguity for consumers and generated validators. If minItems must stay 2 for compatibility, please explicitly document that this is a backward-compatibility allowance.

Suggested non-breaking wording tweak
-          **Mandatory conditions**: 
+          **Mandatory conditions** (semantic requirement; schema keeps `minItems: 2` for backward compatibility):

Also applies to: 1750-1766

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@schemas/core/swagger.yaml` around lines 1363 - 1379, The docs list three
"Mandatory conditions" (types "Ready", "Reconciled", "Available") but the schema
property still has minItems: 2, causing ambiguity; update the swagger.yaml text
near the array schema (the array with items: $ref:
'#/definitions/ResourceCondition' and minItems: 2) to clarify the
backward-compatibility allowance by explicitly stating that although three
condition types are recommended/expected, minItems remains 2 for compatibility
with older clients, and add a short note which of the three may be omitted in
older contracts (or instruct consumers to expect the third condition when
supported).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@schemas/core/swagger.yaml`:
- Around line 1363-1379: The docs list three "Mandatory conditions" (types
"Ready", "Reconciled", "Available") but the schema property still has minItems:
2, causing ambiguity; update the swagger.yaml text near the array schema (the
array with items: $ref: '#/definitions/ResourceCondition' and minItems: 2) to
clarify the backward-compatibility allowance by explicitly stating that although
three condition types are recommended/expected, minItems remains 2 for
compatibility with older clients, and add a short note which of the three may be
omitted in older contracts (or instruct consumers to expect the third condition
when supported).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: c774788f-d010-4319-a54b-ee1213cd621c

📥 Commits

Reviewing files that changed from the base of the PR and between 649d9f1 and b9deb30.

📒 Files selected for processing (9)
  • aliases.tsp
  • models-core/cluster/example_cluster.tsp
  • models-core/nodepool/example_nodepool.tsp
  • models-gcp/cluster/example_cluster.tsp
  • models-gcp/nodepool/example_nodepool.tsp
  • schemas/core/openapi.yaml
  • schemas/core/swagger.yaml
  • schemas/gcp/openapi.yaml
  • schemas/gcp/swagger.yaml
✅ Files skipped from review due to trivial changes (1)
  • aliases.tsp
🚧 Files skipped from review as they are similar to previous changes (5)
  • models-gcp/nodepool/example_nodepool.tsp
  • models-core/nodepool/example_nodepool.tsp
  • models-gcp/cluster/example_cluster.tsp
  • schemas/core/openapi.yaml
  • schemas/gcp/openapi.yaml

@rh-amarin
Copy link
Copy Markdown
Collaborator

/lgtm

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 28, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rh-amarin

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

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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
models-gcp/nodepool/example_nodepool.tsp (1)

141-181: ⚠️ Potential issue | 🟠 Major

Don't move create-time success conditions onto the delete generation.

After these entries are advanced to observed_generation: 2, the delete example still says things like NodePool has 3 nodes running and All validations passed. That cannot describe the same generation as the new delete-side Reconciled=True example. Either keep those conditions on the prior generation until deletion is reported, or update their reason/message to deletion/finalization semantics so the example matches the current generation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@models-gcp/nodepool/example_nodepool.tsp` around lines 141 - 181, The example
advances create-time success conditions (e.g., the entries with type
"ValidationSuccessful", "NodePoolSuccessful", ConditionType.Available and their
messages like "NodePool has 3 nodes running" and "All validations passed") to
observed_generation: 2 which is the delete-generation and conflicts with the new
delete-side ConditionType.Reconciled=True; either move those create-time
conditions back to the prior generation (set their observed_generation to the
previous generation number) or change their reason/message and type to
deletion/finalization semantics (e.g., update reason to a
deletion/finalizer-specific value and message to reflect teardown) so the status
entries consistently correspond to the same observed_generation and accurately
reflect delete-time state.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@models-core/nodepool/example_nodepool.tsp`:
- Around line 98-101: The example's observed_generation (observed_generation: 2)
and the conditions block are inconsistent for a delete/finalization scenario;
either revert observed_generation to 1 or update the conditions (the entries
under conditions/Reconciled) to reflect deletion semantics (adjust reason and
message fields and timestamps such as last_transition_time/last_updated_time) so
the Reconciled condition no longer describes a successful active reconcile but a
delete/finalize state; locate the example_nodepool.tsp snippet with
observed_generation, conditions and Reconciled and make the timestamps and
reason/message consistent with the delete lifecycle.

In `@models-gcp/cluster/example_cluster.tsp`:
- Around line 132-145: The example's Reconciled conditions
(ConditionType.Reconciled with ResourceConditionStatus.True, using
ExampleReconciledReason/ExampleReconciledMessage) incorrectly use
adapter-availability wording for a deleted resource; update those entries to
reflect finalization/deletion semantics by either keeping observed_generation at
the prior generation (so adapter success refers to the previous generation) or
change the adapter reason/message to indicate Finalized/Deletion (e.g., replace
ExampleReconciledReason/ExampleReconciledMessage with finalization-oriented
text) for both the block around ConditionType.Reconciled and the similar block
at the later section (the blocks that currently show adapters "are available").

---

Outside diff comments:
In `@models-gcp/nodepool/example_nodepool.tsp`:
- Around line 141-181: The example advances create-time success conditions
(e.g., the entries with type "ValidationSuccessful", "NodePoolSuccessful",
ConditionType.Available and their messages like "NodePool has 3 nodes running"
and "All validations passed") to observed_generation: 2 which is the
delete-generation and conflicts with the new delete-side
ConditionType.Reconciled=True; either move those create-time conditions back to
the prior generation (set their observed_generation to the previous generation
number) or change their reason/message and type to deletion/finalization
semantics (e.g., update reason to a deletion/finalizer-specific value and
message to reflect teardown) so the status entries consistently correspond to
the same observed_generation and accurately reflect delete-time state.
🪄 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: 0161d27e-e620-4943-92d9-977a8c987ac4

📥 Commits

Reviewing files that changed from the base of the PR and between b9deb30 and 5194114.

📒 Files selected for processing (8)
  • models-core/cluster/example_cluster.tsp
  • models-core/nodepool/example_nodepool.tsp
  • models-gcp/cluster/example_cluster.tsp
  • models-gcp/nodepool/example_nodepool.tsp
  • schemas/core/openapi.yaml
  • schemas/core/swagger.yaml
  • schemas/gcp/openapi.yaml
  • schemas/gcp/swagger.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • models-core/cluster/example_cluster.tsp

Comment on lines +98 to +101
observed_generation: 2,
created_time: "2021-01-01T10:00:00Z",
last_updated_time: "2021-01-01T10:00:00Z",
last_transition_time: "2021-01-01T10:00:00Z",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Generation 2 still reads like the pre-delete nodepool state.

These conditions now claim to reflect generation 2, but the example still describes the old success path instead of deletion/finalization. That makes the delete example internally inconsistent with the new Reconciled semantics. Please either leave those stale conditions on generation 1 or rewrite their reason/message for the delete lifecycle.

Also applies to: 103-111, 118-138

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@models-core/nodepool/example_nodepool.tsp` around lines 98 - 101, The
example's observed_generation (observed_generation: 2) and the conditions block
are inconsistent for a delete/finalization scenario; either revert
observed_generation to 1 or update the conditions (the entries under
conditions/Reconciled) to reflect deletion semantics (adjust reason and message
fields and timestamps such as last_transition_time/last_updated_time) so the
Reconciled condition no longer describes a successful active reconcile but a
delete/finalize state; locate the example_nodepool.tsp snippet with
observed_generation, conditions and Reconciled and make the timestamps and
reason/message consistent with the delete lifecycle.

Comment on lines +132 to 145
observed_generation: 2,
created_time: "2021-01-01T10:00:00Z",
last_updated_time: "2021-01-01T10:00:00Z",
last_transition_time: "2021-01-01T10:00:00Z",
},
#{
type: ConditionType.Reconciled,
status: ResourceConditionStatus.True,
reason: ExampleReconciledReason,
message: ExampleReconciledMessage,
observed_generation: 2,
created_time: "2021-01-01T10:00:00Z",
last_updated_time: "2021-01-01T10:00:00Z",
last_transition_time: "2021-01-01T10:00:00Z",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

The delete example still reports adapter availability instead of finalization.

These conditions now reflect observed_generation: 2, but the adapter messages still say the adapters are available. For a deleted resource, the new Reconciled semantics are based on required adapters reporting Finalized=True at the current generation. Either keep those adapter-success conditions on the prior generation or update their reason/message to deletion/finalization wording.

Also applies to: 152-172

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@models-gcp/cluster/example_cluster.tsp` around lines 132 - 145, The example's
Reconciled conditions (ConditionType.Reconciled with
ResourceConditionStatus.True, using
ExampleReconciledReason/ExampleReconciledMessage) incorrectly use
adapter-availability wording for a deleted resource; update those entries to
reflect finalization/deletion semantics by either keeping observed_generation at
the prior generation (so adapter success refers to the previous generation) or
change the adapter reason/message to indicate Finalized/Deletion (e.g., replace
ExampleReconciledReason/ExampleReconciledMessage with finalization-oriented
text) for both the block around ConditionType.Reconciled and the similar block
at the later section (the blocks that currently show adapters "are available").

@openshift-merge-bot openshift-merge-bot Bot merged commit 31fbfe1 into openshift-hyperfleet:main Apr 28, 2026
2 checks passed
@tirthct tirthct deleted the hyperfleet-853 branch April 28, 2026 17:30
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