Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Renamed aggregated condition `Available` to `LastKnownReconciled` in cluster and nodepool status conditions (HYPERFLEET-1017)
- Updated condition examples and descriptions to reflect `LastKnownReconciled` semantics
- Fixed typo `Avaliable``Available` in adapter example constants (HYPERFLEET-971)
- Improved README.md structure to align with HyperFleet documentation standards

## [1.0.10] - 2026-05-05
Expand Down
2 changes: 1 addition & 1 deletion aliases.tsp
2 changes: 1 addition & 1 deletion main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ using OpenAPI;
*
*/
@service(#{ title: "HyperFleet API" })
@info(#{ version: "1.0.10", contact: #{ name: "HyperFleet Team" }, license: #{ name: "Apache 2.0" ,url: "https://www.apache.org/licenses/LICENSE-2.0"} })
@info(#{ version: "1.0.11", contact: #{ name: "HyperFleet Team" }, license: #{ name: "Apache 2.0" ,url: "https://www.apache.org/licenses/LICENSE-2.0"} })
@server("https://hyperfleet.redhat.com", "Production")
@route("/api/hyperfleet/v1")
namespace HyperFleet;
Expand Down
12 changes: 6 additions & 6 deletions models-core/cluster/example_cluster.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ const exampleCluster: Cluster = #{
last_transition_time: "2021-01-01T10:00:00Z",
},
#{
type: ConditionType.Available,
type: ConditionType.LastKnownReconciled,
status: ResourceConditionStatus.True,
reason: ExampleAvailableReason,
message: ExampleAvailableMessage,
reason: ExampleLastKnownReconciledReason,
message: ExampleLastKnownReconciledMessage,
observed_generation: 1,
created_time: "2021-01-01T10:00:00Z",
last_updated_time: "2021-01-01T10:00:00Z",
Expand Down Expand Up @@ -101,10 +101,10 @@ const exampleDeletedCluster: Cluster = #{
last_transition_time: "2021-01-01T10:00:00Z",
},
#{
type: ConditionType.Available,
type: ConditionType.LastKnownReconciled,
status: ResourceConditionStatus.True,
reason: ExampleAvailableReason,
message: ExampleAvailableMessage,
reason: ExampleLastKnownReconciledReason,
message: ExampleLastKnownReconciledMessage,
observed_generation: 2,
created_time: "2021-01-01T10:00:00Z",
last_updated_time: "2021-01-01T10:00:00Z",
Expand Down
12 changes: 6 additions & 6 deletions models-core/nodepool/example_nodepool.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ const exampleNodePool: NodePool = #{
last_transition_time: "2021-01-01T10:00:00Z",
},
#{
type: ConditionType.Available,
type: ConditionType.LastKnownReconciled,
status: ResourceConditionStatus.True,
reason: ExampleAvailableReason,
message: ExampleAvailableMessage,
reason: ExampleLastKnownReconciledReason,
message: ExampleLastKnownReconciledMessage,
observed_generation: 1,
created_time: "2021-01-01T10:00:00Z",
last_updated_time: "2021-01-01T10:00:00Z",
Expand Down Expand Up @@ -111,10 +111,10 @@ const exampleDeletedNodePool: NodePool = #{
last_transition_time: "2021-01-01T10:00:00Z",
},
#{
type: ConditionType.Available,
type: ConditionType.LastKnownReconciled,
status: ResourceConditionStatus.True,
reason: ExampleAvailableReason,
message: ExampleAvailableMessage,
reason: ExampleLastKnownReconciledReason,
message: ExampleLastKnownReconciledMessage,
observed_generation: 2,
created_time: "2021-01-01T10:00:00Z",
last_updated_time: "2021-01-01T10:00:00Z",
Expand Down
12 changes: 6 additions & 6 deletions models-gcp/cluster/example_cluster.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ const exampleCluster: Cluster = #{
last_transition_time: "2021-01-01T10:00:00Z",
},
#{
type: ConditionType.Available,
type: ConditionType.LastKnownReconciled,
status: ResourceConditionStatus.True,
reason: ExampleAvailableReason,
message: ExampleAvailableMessage,
reason: ExampleLastKnownReconciledReason,
message: ExampleLastKnownReconciledMessage,
observed_generation: 1,
created_time: "2021-01-01T10:00:00Z",
last_updated_time: "2021-01-01T10:00:00Z",
Expand Down Expand Up @@ -145,10 +145,10 @@ const exampleDeletedCluster: Cluster = #{
last_transition_time: "2021-01-01T10:00:00Z",
},
#{
type: ConditionType.Available,
type: ConditionType.LastKnownReconciled,
status: ResourceConditionStatus.True,
reason: ExampleAvailableReason,
message: ExampleAvailableMessage,
reason: ExampleLastKnownReconciledReason,
message: ExampleLastKnownReconciledMessage,
observed_generation: 2,
created_time: "2021-01-01T10:00:00Z",
last_updated_time: "2021-01-01T10:00:00Z",
Expand Down
12 changes: 6 additions & 6 deletions models-gcp/nodepool/example_nodepool.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ const exampleNodePool: NodePool = #{
last_transition_time: "2021-01-01T10:00:00Z",
},
#{
type: ConditionType.Available,
type: ConditionType.LastKnownReconciled,
status: ResourceConditionStatus.True,
reason: ExampleAvailableReason,
message: ExampleAvailableMessage,
reason: ExampleLastKnownReconciledReason,
message: ExampleLastKnownReconciledMessage,
observed_generation: 1,
created_time: "2021-01-01T10:00:00Z",
last_updated_time: "2021-01-01T10:00:00Z",
Expand Down Expand Up @@ -155,10 +155,10 @@ const exampleDeletedNodePool: NodePool = #{
last_transition_time: "2021-01-01T10:00:00Z",
},
#{
type: ConditionType.Available,
type: ConditionType.LastKnownReconciled,
status: ResourceConditionStatus.True,
reason: ExampleAvailableReason,
message: ExampleAvailableMessage,
reason: ExampleLastKnownReconciledReason,
message: ExampleLastKnownReconciledMessage,
observed_generation: 2,
created_time: "2021-01-01T10:00:00Z",
last_updated_time: "2021-01-01T10:00:00Z",
Expand Down
2 changes: 1 addition & 1 deletion models/clusters/model.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ model ClusterStatus {
* **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.
* - `type: "LastKnownReconciled"`: Sticky cross-generation condition — stays True as long as all required adapters were reconciled at a common observed generation, even if a newer generation is being processed.
*
* These conditions are present immediately upon resource creation.
*/
Expand Down
7 changes: 4 additions & 3 deletions models/common/model.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ union ConditionType {
string,
Available: "Available",
Ready: "Ready",
Reconciled: "Reconciled"
Reconciled: "Reconciled",
LastKnownReconciled: "LastKnownReconciled"
Comment on lines 178 to +181
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.

Should we remove Available from here?

ConditionType.Available appears in example_adapter_status.tsp but it may be better defined as a new AdapterConditionType and define also Applied, Health, Finalized for reuse

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point! I kept Available here intentionally since adapters still reference ConditionType.Available in their status reports. Splitting adapter-specific conditions (Available, Applied, Health, Finalized) into a dedicated AdapterConditionType union is a great idea — I'll create a follow-up ticket for that so we can handle it cleanly without expanding the scope of this rename.

}

/**
Expand Down Expand Up @@ -243,8 +244,8 @@ model ResourceCondition {
@format("date-time") last_updated_time: string;
}

const ExampleAvailableReason: string = "All adapters reported Available True for the same generation";
const ExampleAvailableMessage: string = "All adapters reported Available True for the same generation";
const ExampleLastKnownReconciledReason: string = "All required adapters were reconciled at a common observed generation";
const ExampleLastKnownReconciledMessage: string = "All required adapters were reconciled at a common observed generation";
const ExampleReadyReason: string = "All adapters reported Available=True for the current generation";
const ExampleReadyMessage: string = "All adapters reported Available=True for the current generation";
const ExampleReconciledReason: string = "All required adapters reported Available=True or Finalized=True at the current generation";
Expand Down
2 changes: 1 addition & 1 deletion models/nodepools/model.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ model NodePoolStatus {
* **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.
* - `type: "LastKnownReconciled"`: Sticky cross-generation condition — stays True as long as all required adapters were reconciled at a common observed generation, even if a newer generation is being processed.
*
* These conditions are present immediately upon resource creation.
*/
Expand Down
32 changes: 16 additions & 16 deletions schemas/core/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: HyperFleet API
version: 1.0.10
version: 1.0.11
contact:
name: HyperFleet Team
license:
Expand Down Expand Up @@ -50,7 +50,7 @@ paths:

**Note**: The `status` object in the response is read-only and computed by the service.
It is NOT part of the request body. Initially,
status.conditions will include mandatory "Available", "Ready" and "Reconciled" conditions.
status.conditions will include mandatory "LastKnownReconciled", "Ready" and "Reconciled" conditions.
parameters: []
responses:
'201':
Expand Down Expand Up @@ -189,10 +189,10 @@ paths:
created_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
last_transition_time: '2021-01-01T10:00:00Z'
- type: Available
- type: LastKnownReconciled
status: 'True'
reason: All adapters reported Available True for the same generation
message: All adapters reported Available True for the same generation
reason: All required adapters were reconciled at a common observed generation
message: All required adapters were reconciled at a common observed generation
observed_generation: 2
created_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
Expand Down Expand Up @@ -394,10 +394,10 @@ paths:
created_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
last_transition_time: '2021-01-01T10:00:00Z'
- type: Available
- type: LastKnownReconciled
status: 'True'
reason: All adapters reported Available True for the same generation
message: All adapters reported Available True for the same generation
reason: All required adapters were reconciled at a common observed generation
message: All required adapters were reconciled at a common observed generation
observed_generation: 2
created_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
Expand Down Expand Up @@ -1146,10 +1146,10 @@ components:
created_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
last_transition_time: '2021-01-01T10:00:00Z'
- type: Available
- type: LastKnownReconciled
status: 'True'
reason: All adapters reported Available True for the same generation
message: All adapters reported Available True for the same generation
reason: All required adapters were reconciled at a common observed generation
message: All required adapters were reconciled at a common observed generation
observed_generation: 1
created_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
Expand Down Expand Up @@ -1270,7 +1270,7 @@ components:
**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.
- `type: "LastKnownReconciled"`: Sticky cross-generation condition — stays True as long as all required adapters were reconciled at a common observed generation, even if a newer generation is being processed.
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 | ⚡ Quick win

minItems contradicts the new mandatory-condition contract.

After adding LastKnownReconciled as mandatory, conditions still allows only minItems: 2 (Line 1266 and Line 1632). This weakens schema validation versus documented behavior.

Suggested fix
   ClusterStatus:
@@
         conditions:
@@
-          minItems: 2
+          minItems: 3
@@
   NodePoolStatus:
@@
         conditions:
@@
-          minItems: 2
+          minItems: 3

Also applies to: 1639-1639

🤖 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 `@schemas/core/openapi.yaml` at line 1273, The OpenAPI schema's conditions
array still uses minItems: 2 which conflicts with adding the new mandatory
condition LastKnownReconciled; update the conditions schema to require minItems:
3 (and any other places where minItems is 2 for conditions, e.g., the other
occurrence around the same conditions definition) and ensure the
required/must-have list for the conditions array includes "LastKnownReconciled"
so the schema enforces the new mandatory-condition contract.


These conditions are present immediately upon resource creation.
description: |-
Expand Down Expand Up @@ -1445,10 +1445,10 @@ components:
created_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
last_transition_time: '2021-01-01T10:00:00Z'
- type: Available
- type: LastKnownReconciled
status: 'True'
reason: All adapters reported Available True for the same generation
message: All adapters reported Available True for the same generation
reason: All required adapters were reconciled at a common observed generation
message: All required adapters were reconciled at a common observed generation
observed_generation: 1
created_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
Expand Down Expand Up @@ -1636,7 +1636,7 @@ components:
**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.
- `type: "LastKnownReconciled"`: Sticky cross-generation condition — stays True as long as all required adapters were reconciled at a common observed generation, even if a newer generation is being processed.

These conditions are present immediately upon resource creation.
description: |-
Expand Down
50 changes: 31 additions & 19 deletions schemas/core/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ info:
name: Apache 2.0
url: 'https://www.apache.org/licenses/LICENSE-2.0'
title: HyperFleet API
version: 1.0.10
version: 1.0.11
host: hyperfleet.redhat.com
basePath: /
schemes:
Expand Down Expand Up @@ -112,8 +112,8 @@ paths:

It is NOT part of the request body. Initially,

status.conditions will include mandatory "Available", "Ready" and
"Reconciled" conditions.
status.conditions will include mandatory "LastKnownReconciled", "Ready"
and "Reconciled" conditions.
operationId: postCluster
summary: Create cluster
'/api/hyperfleet/v1/clusters/{cluster_id}':
Expand Down Expand Up @@ -177,14 +177,14 @@ paths:
last_transition_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
message: >-
All adapters reported Available True for the same
All required adapters were reconciled at a common observed
generation
observed_generation: 2
reason: >-
All adapters reported Available True for the same
All required adapters were reconciled at a common observed
generation
status: 'True'
type: Available
type: LastKnownReconciled
- created_time: '2021-01-01T10:00:00Z'
last_transition_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
Expand Down Expand Up @@ -463,14 +463,14 @@ paths:
last_transition_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
message: >-
All adapters reported Available True for the same
All required adapters were reconciled at a common observed
generation
observed_generation: 2
reason: >-
All adapters reported Available True for the same
All required adapters were reconciled at a common observed
generation
status: 'True'
type: Available
type: LastKnownReconciled
- created_time: '2021-01-01T10:00:00Z'
last_transition_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
Expand Down Expand Up @@ -1251,11 +1251,15 @@ definitions:
- created_time: '2021-01-01T10:00:00Z'
last_transition_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
message: All adapters reported Available True for the same generation
message: >-
All required adapters were reconciled at a common observed
generation
observed_generation: 1
reason: All adapters reported Available True for the same generation
reason: >-
All required adapters were reconciled at a common observed
generation
status: 'True'
type: Available
type: LastKnownReconciled
- created_time: '2021-01-01T10:00:00Z'
last_transition_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
Expand Down Expand Up @@ -1448,8 +1452,10 @@ definitions:
- `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.
- `type: "LastKnownReconciled"`: Sticky cross-generation condition —
stays True as long as all required adapters were reconciled at a
common observed generation, even if a newer generation is being
processed.


These conditions are present immediately upon resource creation.
Expand Down Expand Up @@ -1571,11 +1577,15 @@ definitions:
- created_time: '2021-01-01T10:00:00Z'
last_transition_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
message: All adapters reported Available True for the same generation
message: >-
All required adapters were reconciled at a common observed
generation
observed_generation: 1
reason: All adapters reported Available True for the same generation
reason: >-
All required adapters were reconciled at a common observed
generation
status: 'True'
type: Available
type: LastKnownReconciled
- created_time: '2021-01-01T10:00:00Z'
last_transition_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
Expand Down Expand Up @@ -1835,8 +1845,10 @@ definitions:
- `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.
- `type: "LastKnownReconciled"`: Sticky cross-generation condition —
stays True as long as all required adapters were reconciled at a
common observed generation, even if a newer generation is being
processed.


These conditions are present immediately upon resource creation.
Expand Down
Loading