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
7 changes: 7 additions & 0 deletions .changeset/configuration-hub-sync-conflicts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@epilot/configuration-hub-client": minor
"@epilot/sdk": minor
"@epilot/cli": minor
---

Refresh the Configuration Hub API contract from the published spec: deterministic sync conflicts on plans (`SyncPlanConflict` with `target_edited`, `both_edited`, `target_only_removed`, `mostly_replaced`; `plan.conflicts`, `summary.conflicts`, `conflicts_checked_at`), the `has_conflicts` filter on `listSyncJobResources`, `overwrite_conflicts` on `applySyncPlan` (409 `unresolved_conflicts`), and the health finding codes `env_value_missing` / `secret_value_missing`.
4 changes: 4 additions & 0 deletions clients/configuration-hub-client/src/openapi-runtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@
{
"name": "plan_action",
"in": "query"
},
{
"name": "has_conflicts",
"in": "query"
}
],
"responses": {}
Expand Down
280 changes: 278 additions & 2 deletions clients/configuration-hub-client/src/openapi.d.ts

Large diffs are not rendered by default.

229 changes: 225 additions & 4 deletions clients/configuration-hub-client/src/openapi.json

Large diffs are not rendered by default.

229 changes: 225 additions & 4 deletions packages/cli/definitions/configuration-hub.json

Large diffs are not rendered by default.

114 changes: 67 additions & 47 deletions packages/cli/docs/configuration-hub.md
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,8 @@ epilot configuration-hub createSyncJob --jsonata 'id'
"no_change": 0,
"skip": 0,
"failed": 0,
"not_compared": 0
"not_compared": 0,
"conflicts": 0
},
"planned_at": "1970-01-01T00:00:00.000Z",
"expires_at": "1970-01-01T00:00:00.000Z",
Expand Down Expand Up @@ -1119,7 +1120,8 @@ epilot configuration-hub getSyncJob -p id=123e4567-e89b-12d3-a456-426614174000 -
"no_change": 0,
"skip": 0,
"failed": 0,
"not_compared": 0
"not_compared": 0,
"conflicts": 0
},
"planned_at": "1970-01-01T00:00:00.000Z",
"expires_at": "1970-01-01T00:00:00.000Z",
Expand Down Expand Up @@ -1369,7 +1371,8 @@ epilot configuration-hub retrySyncJob -p id=123e4567-e89b-12d3-a456-426614174000
"no_change": 0,
"skip": 0,
"failed": 0,
"not_compared": 0
"not_compared": 0,
"conflicts": 0
},
"planned_at": "1970-01-01T00:00:00.000Z",
"expires_at": "1970-01-01T00:00:00.000Z",
Expand Down Expand Up @@ -1449,33 +1452,15 @@ epilot configuration-hub planSyncJobRetry -p id=123e4567-e89b-12d3-a456-42661417
"source_id": "string",
"target_id": "string",
"title": "string",
"required_by": {
"type": "string",
"source_id": "string",
"title": "string",
"reason": "typed_reference"
},
"required_by": {},
"status": "pending",
"phase": "phase_0",
"attempt": 0,
"error": "string",
"updated_at": "1970-01-01T00:00:00.000Z",
"source_link": "string",
"target_link": "string",
"plan": {
"action": "create",
"match": "lineage",
"diff_status": "computed",
"change_count": 0,
"changed_paths": ["string"],
"note": "string",
"depends_on": [
{
"type": "string",
"source_id": "string"
}
]
},
"plan": {},
"excluded_from_apply": "unchanged"
}
],
Expand All @@ -1485,33 +1470,15 @@ epilot configuration-hub planSyncJobRetry -p id=123e4567-e89b-12d3-a456-42661417
"source_id": "string",
"target_id": "string",
"title": "string",
"required_by": {
"type": "string",
"source_id": "string",
"title": "string",
"reason": "typed_reference"
},
"required_by": {},
"status": "pending",
"phase": "phase_0",
"attempt": 0,
"error": "string",
"updated_at": "1970-01-01T00:00:00.000Z",
"source_link": "string",
"target_link": "string",
"plan": {
"action": "create",
"match": "lineage",
"diff_status": "computed",
"change_count": 0,
"changed_paths": ["string"],
"note": "string",
"depends_on": [
{
"type": "string",
"source_id": "string"
}
]
},
"plan": {},
"excluded_from_apply": "unchanged"
}
],
Expand Down Expand Up @@ -1619,7 +1586,8 @@ epilot configuration-hub cancelSyncJob -p id=123e4567-e89b-12d3-a456-42661417400
"no_change": 0,
"skip": 0,
"failed": 0,
"not_compared": 0
"not_compared": 0,
"conflicts": 0
},
"planned_at": "1970-01-01T00:00:00.000Z",
"expires_at": "1970-01-01T00:00:00.000Z",
Expand Down Expand Up @@ -1750,6 +1718,9 @@ List the per-resource rows for a sync job. Supports filtering by status
| `plan_action` | query | "create" \| "update" \| "no_change" \| "skip" | No | Filter resources by plan action (`plan.action`). Only rows of plan
jobs and of jobs applying a plan carry one.
|
| `has_conflicts` | query | boolean | No | `true`: only rows whose plan has conflicts (`plan.conflicts`), so
a client can load every conflict without paging through the plan.
|

**Sample Call**

Expand Down Expand Up @@ -1807,7 +1778,34 @@ epilot configuration-hub listSyncJobResources -p id=123e4567-e89b-12d3-a456-4266
"type": "string",
"source_id": "string"
}
]
],
"conflicts": [
{
"code": "mostly_replaced",
"certainty": "exact",
"requires_decision": true,
"paths": [
{
"path": "string",
"kind": "added",
"base": {},
"source": {},
"target": {}
}
],
"paths_truncated": true,
"total_paths": 0,
"last_synced_at": "1970-01-01T00:00:00.000Z",
"target_updated_at": "1970-01-01T00:00:00.000Z",
"target_updated_by": "string",
"target_updated_by_name": "string",
"source_updated_at": "1970-01-01T00:00:00.000Z",
"replaced_ratio": 0.92,
"replaced_fields": 198,
"total_fields": 214
}
],
"conflict_resolution": "overwrite"
},
"excluded_from_apply": "unchanged"
}
Expand Down Expand Up @@ -1862,6 +1860,7 @@ epilot configuration-hub getSyncPlan -p id=123e4567-e89b-12d3-a456-426614174000
"expires_at": "1970-01-01T00:00:00.000Z",
"planned_at": "1970-01-01T00:00:00.000Z",
"replanned_at": "1970-01-01T00:00:00.000Z",
"conflicts_checked_at": "1970-01-01T00:00:00.000Z",
"source_org_id": "string",
"target_org_id": "string",
"started_at": "1970-01-01T00:00:00.000Z",
Expand All @@ -1873,7 +1872,8 @@ epilot configuration-hub getSyncPlan -p id=123e4567-e89b-12d3-a456-426614174000
"no_change": 0,
"skip": 0,
"failed": 0,
"not_compared": 0
"not_compared": 0,
"conflicts": 0
},
"by_type": [
{
Expand All @@ -1884,6 +1884,7 @@ epilot configuration-hub getSyncPlan -p id=123e4567-e89b-12d3-a456-426614174000
"skip": 0,
"failed": 0,
"not_compared": 0,
"conflicts": 0,
"type": "string"
}
],
Expand Down Expand Up @@ -2073,6 +2074,12 @@ epilot configuration-hub applySyncPlan \
"source_id": "string"
}
],
"overwrite_conflicts": [
{
"type": "string",
"source_id": "string"
}
],
"allow_missing_dependencies": false
}'
```
Expand Down Expand Up @@ -2160,7 +2167,8 @@ epilot configuration-hub applySyncPlan -p id=123e4567-e89b-12d3-a456-42661417400
"no_change": 0,
"skip": 0,
"failed": 0,
"not_compared": 0
"not_compared": 0,
"conflicts": 0
},
"planned_at": "1970-01-01T00:00:00.000Z",
"expires_at": "1970-01-01T00:00:00.000Z",
Expand Down Expand Up @@ -2578,6 +2586,12 @@ epilot configuration-hub listPreviews --jsonata 'results[0]'
"preview_org_id": "string",
"sync_job_id": "string",
"sync_status": "string",
"skipped_types": [
{
"type": "string",
"reason": "string"
}
],
"requested_by": {
"user_id": "string",
"email": "string"
Expand Down Expand Up @@ -2666,6 +2680,12 @@ epilot configuration-hub getPreview -p id=123e4567-e89b-12d3-a456-426614174000 -
"preview_org_id": "string",
"sync_job_id": "string",
"sync_status": "string",
"skipped_types": [
{
"type": "string",
"reason": "string"
}
],
"requested_by": {
"user_id": "string",
"email": "string"
Expand Down
Loading
Loading