You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Only available for `staged_to_members` during tagging/release operations.**
346
347
347
348
If a conflict occurs during a tagging/release operation (`POST /api/release-tracks/:id/bump`), reject and abort the entire release. The snapshot will NOT be tagged, and no immutable snapshot will be created.
348
349
349
-
**Example:**
350
+
**The error response will include ALL conflicting objects**, not just the first one encountered. This allows editors to see the full scope of conflicts that must be resolved before the release can proceed.
// - Editor must resolve both conflicts before retrying
379
414
```
380
415
381
416
**Use case:** "Never accidentally overwrite released content during a release; require explicit conflict resolution"
382
417
383
418
**Why abort is important:** Once a snapshot is tagged and released, it becomes immutable. The `abort` policy ensures that releases don't inadvertently overwrite existing released content, providing an additional safety guardrail for critical release operations.
384
419
420
+
**Why report all conflicts:** When multiple conflicts exist, reporting all of them in a single error response allows editors to address all issues at once, rather than discovering them one at a time through repeated release attempts. This significantly improves the workflow efficiency when dealing with complex release scenarios.
421
+
385
422
#### Configuring Conflict Resolution Policies
386
423
387
424
**Update release track configuration:**
@@ -459,12 +496,13 @@ GET /api/release-tracks/:id?include=all
459
496
460
497
### 6. Preview Release
461
498
462
-
Compute a release preview, which outputs a verbose diff of what will change in the next release.
499
+
Compute a release preview, which outputs a verbose diff of what will change in the next release. **This endpoint will detect and report all conflicts** that would prevent the release from proceeding, allowing editors to resolve issues before attempting to tag.
500
+
463
501
```
464
502
GET /api/release-tracks/:id/bump/preview
465
503
```
466
504
467
-
**Response:**
505
+
**Response (success - no conflicts):**
468
506
```json
469
507
{
470
508
"current_version": "1.1",
@@ -507,6 +545,35 @@ GET /api/release-tracks/:id/bump/preview
507
545
}
508
546
```
509
547
548
+
**Response (with conflicts detected):**
549
+
```json
550
+
{
551
+
"track_id": "release-track--123",
552
+
"snapshot_modified": "2024-01-15T16:20:00.000Z",
553
+
"is_already_tagged": false,
554
+
"current_version": null,
555
+
"next_version_minor": "1.2",
556
+
"next_version_major": "2.0",
557
+
"staged_count": 3,
558
+
"members_count": 2,
559
+
"candidates_count": 1,
560
+
"conflicts": [
561
+
{
562
+
"object_ref": "attack-pattern--T1234",
563
+
"incumbent_version": "2024-01-15T10:00:00Z",
564
+
"incoming_version": "2024-02-20T10:00:00Z"
565
+
},
566
+
{
567
+
"object_ref": "attack-pattern--T5678",
568
+
"incumbent_version": "2024-01-16T10:00:00Z",
569
+
"incoming_version": "2024-02-21T10:00:00Z"
570
+
}
571
+
]
572
+
}
573
+
```
574
+
575
+
**Note:** When the `staged_to_members` conflict policy is set to `abort` and conflicts are detected, the preview will include a `conflicts` array listing **all** conflicting objects, not just the first one encountered.
0 commit comments