Skip to content

Commit 98cfd7e

Browse files
Merge pull request #43 from rafabene/HYPERFLEET-1017-rename-available-to-last-known-reconciled
HYPERFLEET-1017 - refactor: rename Available to LastKnownReconciled and align example reasons
2 parents d8a0f05 + b77a76e commit 98cfd7e

7 files changed

Lines changed: 116 additions & 139 deletions

File tree

CLAUDE.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ alias ClusterSpec = Record<unknown>; // Generic
3535
alias ClusterSpec = GCPClusterSpec; // Provider-specific
3636
```
3737

38-
The `aliases.tsp` symlink determines which provider types are active. The `build-schema.sh` script automatically re-links this during builds.
38+
The `aliases.tsp` symlink determines which provider types are active. The `build-schema.sh` script automatically re-links this during builds. The symlink is tracked in git and should always point to `aliases-core.tsp` by default. Do not remove it from version control or add it to `.gitignore`.
3939

4040
**When adding new models:**
4141
- Shared models → `models/`
@@ -188,6 +188,15 @@ alias ClusterSpec = GCPClusterSpec;
188188

189189
Build: `npm run build:gcp`
190190

191+
## Version Bump and Changelog
192+
193+
When bumping the version in `main.tsp`, always update `CHANGELOG.md`:
194+
195+
1. Keep `## [Unreleased]` at the top, then add a new version section as `## [X.Y.Z] - YYYY-MM-DD`
196+
2. List changes under appropriate headings (`Added`, `Changed`, `Fixed`, `Removed`)
197+
3. Update the comparison links at the bottom of the file
198+
4. Follow [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format
199+
191200
## Validation Checklist
192201

193202
Before submitting changes:

main.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ using OpenAPI;
2020
*
2121
*/
2222
@service(#{ title: "HyperFleet API" })
23-
@info(#{ version: "1.0.11", contact: #{ name: "HyperFleet Team" }, license: #{ name: "Apache 2.0" ,url: "https://www.apache.org/licenses/LICENSE-2.0"} })
23+
@info(#{ version: "1.0.12", contact: #{ name: "HyperFleet Team" }, license: #{ name: "Apache 2.0" ,url: "https://www.apache.org/licenses/LICENSE-2.0"} })
2424
@server("https://hyperfleet.redhat.com", "Production")
2525
@route("/api/hyperfleet/v1")
2626
namespace HyperFleet;

models/common/model.tsp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,11 @@ model ResourceCondition {
244244
@format("date-time") last_updated_time: string;
245245
}
246246

247-
const ExampleLastKnownReconciledReason: string = "All required adapters were reconciled at a common observed generation";
248-
const ExampleLastKnownReconciledMessage: string = "All required adapters were reconciled at a common observed generation";
249-
const ExampleReadyReason: string = "All adapters reported Available=True for the current generation";
250-
const ExampleReadyMessage: string = "All adapters reported Available=True for the current generation";
251-
const ExampleReconciledReason: string = "All required adapters reported Available=True or Finalized=True at the current generation";
247+
const ExampleLastKnownReconciledReason: string = "AllAdaptersReconciled";
248+
const ExampleLastKnownReconciledMessage: string = "All required adapters report Available=True for the tracked generation";
249+
const ExampleReadyReason: string = "ReconciledAll";
250+
const ExampleReadyMessage: string = "All required adapters reported Available=True or Finalized=True at the current generation";
251+
const ExampleReconciledReason: string = "ReconciledAll";
252252
const ExampleReconciledMessage: string = "All required adapters reported Available=True or Finalized=True at the current generation";
253253
const ExampleAdapter1: string = "adapter1";
254254
const ExampleAdapter2: string = "adapter2";

schemas/core/openapi.yaml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: 3.0.0
22
info:
33
title: HyperFleet API
4-
version: 1.0.11
4+
version: 1.0.12
55
contact:
66
name: HyperFleet Team
77
license:
@@ -189,24 +189,24 @@ paths:
189189
conditions:
190190
- type: Ready
191191
status: 'True'
192-
reason: All adapters reported Available=True for the current generation
193-
message: All adapters reported Available=True for the current generation
192+
reason: ReconciledAll
193+
message: All required adapters reported Available=True or Finalized=True at the current generation
194194
observed_generation: 2
195195
created_time: '2021-01-01T10:00:00Z'
196196
last_updated_time: '2021-01-01T10:00:00Z'
197197
last_transition_time: '2021-01-01T10:00:00Z'
198198
- type: Reconciled
199199
status: 'True'
200-
reason: All required adapters reported Available=True or Finalized=True at the current generation
200+
reason: ReconciledAll
201201
message: All required adapters reported Available=True or Finalized=True at the current generation
202202
observed_generation: 2
203203
created_time: '2021-01-01T10:00:00Z'
204204
last_updated_time: '2021-01-01T10:00:00Z'
205205
last_transition_time: '2021-01-01T10:00:00Z'
206206
- type: LastKnownReconciled
207207
status: 'True'
208-
reason: All required adapters were reconciled at a common observed generation
209-
message: All required adapters were reconciled at a common observed generation
208+
reason: AllAdaptersReconciled
209+
message: All required adapters report Available=True for the tracked generation
210210
observed_generation: 2
211211
created_time: '2021-01-01T10:00:00Z'
212212
last_updated_time: '2021-01-01T10:00:00Z'
@@ -402,24 +402,24 @@ paths:
402402
conditions:
403403
- type: Ready
404404
status: 'True'
405-
reason: All adapters reported Available=True for the current generation
406-
message: All adapters reported Available=True for the current generation
405+
reason: ReconciledAll
406+
message: All required adapters reported Available=True or Finalized=True at the current generation
407407
observed_generation: 2
408408
created_time: '2021-01-01T10:00:00Z'
409409
last_updated_time: '2021-01-01T10:00:00Z'
410410
last_transition_time: '2021-01-01T10:00:00Z'
411411
- type: Reconciled
412412
status: 'True'
413-
reason: All required adapters reported Available=True or Finalized=True at the current generation
413+
reason: ReconciledAll
414414
message: All required adapters reported Available=True or Finalized=True at the current generation
415415
observed_generation: 2
416416
created_time: '2021-01-01T10:00:00Z'
417417
last_updated_time: '2021-01-01T10:00:00Z'
418418
last_transition_time: '2021-01-01T10:00:00Z'
419419
- type: LastKnownReconciled
420420
status: 'True'
421-
reason: All required adapters were reconciled at a common observed generation
422-
message: All required adapters were reconciled at a common observed generation
421+
reason: AllAdaptersReconciled
422+
message: All required adapters report Available=True for the tracked generation
423423
observed_generation: 2
424424
created_time: '2021-01-01T10:00:00Z'
425425
last_updated_time: '2021-01-01T10:00:00Z'
@@ -1174,24 +1174,24 @@ components:
11741174
conditions:
11751175
- type: Ready
11761176
status: 'True'
1177-
reason: All adapters reported Available=True for the current generation
1178-
message: All adapters reported Available=True for the current generation
1177+
reason: ReconciledAll
1178+
message: All required adapters reported Available=True or Finalized=True at the current generation
11791179
observed_generation: 1
11801180
created_time: '2021-01-01T10:00:00Z'
11811181
last_updated_time: '2021-01-01T10:00:00Z'
11821182
last_transition_time: '2021-01-01T10:00:00Z'
11831183
- type: Reconciled
11841184
status: 'True'
1185-
reason: All required adapters reported Available=True or Finalized=True at the current generation
1185+
reason: ReconciledAll
11861186
message: All required adapters reported Available=True or Finalized=True at the current generation
11871187
observed_generation: 1
11881188
created_time: '2021-01-01T10:00:00Z'
11891189
last_updated_time: '2021-01-01T10:00:00Z'
11901190
last_transition_time: '2021-01-01T10:00:00Z'
11911191
- type: LastKnownReconciled
11921192
status: 'True'
1193-
reason: All required adapters were reconciled at a common observed generation
1194-
message: All required adapters were reconciled at a common observed generation
1193+
reason: AllAdaptersReconciled
1194+
message: All required adapters report Available=True for the tracked generation
11951195
observed_generation: 1
11961196
created_time: '2021-01-01T10:00:00Z'
11971197
last_updated_time: '2021-01-01T10:00:00Z'
@@ -1473,24 +1473,24 @@ components:
14731473
conditions:
14741474
- type: Ready
14751475
status: 'True'
1476-
reason: All adapters reported Available=True for the current generation
1477-
message: All adapters reported Available=True for the current generation
1476+
reason: ReconciledAll
1477+
message: All required adapters reported Available=True or Finalized=True at the current generation
14781478
observed_generation: 1
14791479
created_time: '2021-01-01T10:00:00Z'
14801480
last_updated_time: '2021-01-01T10:00:00Z'
14811481
last_transition_time: '2021-01-01T10:00:00Z'
14821482
- type: Reconciled
14831483
status: 'True'
1484-
reason: All required adapters reported Available=True or Finalized=True at the current generation
1484+
reason: ReconciledAll
14851485
message: All required adapters reported Available=True or Finalized=True at the current generation
14861486
observed_generation: 1
14871487
created_time: '2021-01-01T10:00:00Z'
14881488
last_updated_time: '2021-01-01T10:00:00Z'
14891489
last_transition_time: '2021-01-01T10:00:00Z'
14901490
- type: LastKnownReconciled
14911491
status: 'True'
1492-
reason: All required adapters were reconciled at a common observed generation
1493-
message: All required adapters were reconciled at a common observed generation
1492+
reason: AllAdaptersReconciled
1493+
message: All required adapters report Available=True for the tracked generation
14941494
observed_generation: 1
14951495
created_time: '2021-01-01T10:00:00Z'
14961496
last_updated_time: '2021-01-01T10:00:00Z'

schemas/core/swagger.yaml

Lines changed: 29 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ info:
1616
name: Apache 2.0
1717
url: 'https://www.apache.org/licenses/LICENSE-2.0'
1818
title: HyperFleet API
19-
version: 1.0.11
19+
version: 1.0.12
2020
host: hyperfleet.redhat.com
2121
basePath: /
2222
schemes:
@@ -158,12 +158,10 @@ paths:
158158
last_transition_time: '2021-01-01T10:00:00Z'
159159
last_updated_time: '2021-01-01T10:00:00Z'
160160
message: >-
161-
All adapters reported Available=True for the current
162-
generation
161+
All required adapters reported Available=True or
162+
Finalized=True at the current generation
163163
observed_generation: 2
164-
reason: >-
165-
All adapters reported Available=True for the current
166-
generation
164+
reason: ReconciledAll
167165
status: 'True'
168166
type: Ready
169167
- created_time: '2021-01-01T10:00:00Z'
@@ -173,21 +171,17 @@ paths:
173171
All required adapters reported Available=True or
174172
Finalized=True at the current generation
175173
observed_generation: 2
176-
reason: >-
177-
All required adapters reported Available=True or
178-
Finalized=True at the current generation
174+
reason: ReconciledAll
179175
status: 'True'
180176
type: Reconciled
181177
- created_time: '2021-01-01T10:00:00Z'
182178
last_transition_time: '2021-01-01T10:00:00Z'
183179
last_updated_time: '2021-01-01T10:00:00Z'
184180
message: >-
185-
All required adapters were reconciled at a common observed
186-
generation
181+
All required adapters report Available=True for the
182+
tracked generation
187183
observed_generation: 2
188-
reason: >-
189-
All required adapters were reconciled at a common observed
190-
generation
184+
reason: AllAdaptersReconciled
191185
status: 'True'
192186
type: LastKnownReconciled
193187
- created_time: '2021-01-01T10:00:00Z'
@@ -455,12 +449,10 @@ paths:
455449
last_transition_time: '2021-01-01T10:00:00Z'
456450
last_updated_time: '2021-01-01T10:00:00Z'
457451
message: >-
458-
All adapters reported Available=True for the current
459-
generation
452+
All required adapters reported Available=True or
453+
Finalized=True at the current generation
460454
observed_generation: 2
461-
reason: >-
462-
All adapters reported Available=True for the current
463-
generation
455+
reason: ReconciledAll
464456
status: 'True'
465457
type: Ready
466458
- created_time: '2021-01-01T10:00:00Z'
@@ -470,21 +462,17 @@ paths:
470462
All required adapters reported Available=True or
471463
Finalized=True at the current generation
472464
observed_generation: 2
473-
reason: >-
474-
All required adapters reported Available=True or
475-
Finalized=True at the current generation
465+
reason: ReconciledAll
476466
status: 'True'
477467
type: Reconciled
478468
- created_time: '2021-01-01T10:00:00Z'
479469
last_transition_time: '2021-01-01T10:00:00Z'
480470
last_updated_time: '2021-01-01T10:00:00Z'
481471
message: >-
482-
All required adapters were reconciled at a common observed
483-
generation
472+
All required adapters report Available=True for the
473+
tracked generation
484474
observed_generation: 2
485-
reason: >-
486-
All required adapters were reconciled at a common observed
487-
generation
475+
reason: AllAdaptersReconciled
488476
status: 'True'
489477
type: LastKnownReconciled
490478
- created_time: '2021-01-01T10:00:00Z'
@@ -1273,9 +1261,11 @@ definitions:
12731261
- created_time: '2021-01-01T10:00:00Z'
12741262
last_transition_time: '2021-01-01T10:00:00Z'
12751263
last_updated_time: '2021-01-01T10:00:00Z'
1276-
message: All adapters reported Available=True for the current generation
1264+
message: >-
1265+
All required adapters reported Available=True or Finalized=True at
1266+
the current generation
12771267
observed_generation: 1
1278-
reason: All adapters reported Available=True for the current generation
1268+
reason: ReconciledAll
12791269
status: 'True'
12801270
type: Ready
12811271
- created_time: '2021-01-01T10:00:00Z'
@@ -1285,21 +1275,17 @@ definitions:
12851275
All required adapters reported Available=True or Finalized=True at
12861276
the current generation
12871277
observed_generation: 1
1288-
reason: >-
1289-
All required adapters reported Available=True or Finalized=True at
1290-
the current generation
1278+
reason: ReconciledAll
12911279
status: 'True'
12921280
type: Reconciled
12931281
- created_time: '2021-01-01T10:00:00Z'
12941282
last_transition_time: '2021-01-01T10:00:00Z'
12951283
last_updated_time: '2021-01-01T10:00:00Z'
12961284
message: >-
1297-
All required adapters were reconciled at a common observed
1285+
All required adapters report Available=True for the tracked
12981286
generation
12991287
observed_generation: 1
1300-
reason: >-
1301-
All required adapters were reconciled at a common observed
1302-
generation
1288+
reason: AllAdaptersReconciled
13031289
status: 'True'
13041290
type: LastKnownReconciled
13051291
- created_time: '2021-01-01T10:00:00Z'
@@ -1599,9 +1585,11 @@ definitions:
15991585
- created_time: '2021-01-01T10:00:00Z'
16001586
last_transition_time: '2021-01-01T10:00:00Z'
16011587
last_updated_time: '2021-01-01T10:00:00Z'
1602-
message: All adapters reported Available=True for the current generation
1588+
message: >-
1589+
All required adapters reported Available=True or Finalized=True at
1590+
the current generation
16031591
observed_generation: 1
1604-
reason: All adapters reported Available=True for the current generation
1592+
reason: ReconciledAll
16051593
status: 'True'
16061594
type: Ready
16071595
- created_time: '2021-01-01T10:00:00Z'
@@ -1611,21 +1599,17 @@ definitions:
16111599
All required adapters reported Available=True or Finalized=True at
16121600
the current generation
16131601
observed_generation: 1
1614-
reason: >-
1615-
All required adapters reported Available=True or Finalized=True at
1616-
the current generation
1602+
reason: ReconciledAll
16171603
status: 'True'
16181604
type: Reconciled
16191605
- created_time: '2021-01-01T10:00:00Z'
16201606
last_transition_time: '2021-01-01T10:00:00Z'
16211607
last_updated_time: '2021-01-01T10:00:00Z'
16221608
message: >-
1623-
All required adapters were reconciled at a common observed
1609+
All required adapters report Available=True for the tracked
16241610
generation
16251611
observed_generation: 1
1626-
reason: >-
1627-
All required adapters were reconciled at a common observed
1628-
generation
1612+
reason: AllAdaptersReconciled
16291613
status: 'True'
16301614
type: LastKnownReconciled
16311615
- created_time: '2021-01-01T10:00:00Z'

0 commit comments

Comments
 (0)