Skip to content

Commit 6d2259c

Browse files
modified some example output sections
1 parent c4c8457 commit 6d2259c

File tree

1 file changed

+38
-8
lines changed
  • content/en/docs/neo-porch/4_tutorials_and_how-tos/working_with_package_revisions

1 file changed

+38
-8
lines changed

content/en/docs/neo-porch/4_tutorials_and_how-tos/working_with_package_revisions/deleting-packages.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ Replace any "porch-test" value with your repository's name in the commands below
2626
PackageRevision deletion in Porch follows different workflows depending on the lifecycle state:
2727

2828
**Direct Deletion:**
29+
2930
- **Draft** and **Proposed** PackageRevisions can be deleted immediately
3031
- No approval process required
3132
- Permanently removes the PackageRevision and its Git branch
3233

3334
**Deletion Proposal Workflow:**
35+
3436
- **Published** PackageRevisions require a two-step deletion process
3537
- First propose deletion, then approve the proposal
3638
- Provides safety mechanism to prevent accidental deletion of production packages
@@ -89,6 +91,7 @@ You should see output similar to:
8991
NAME PACKAGE WORKSPACENAME REVISION LATEST LIFECYCLE REPOSITORY
9092
porch-test.test-draft-package.draft-v1 test-draft-package draft-v1 0 false Draft porch-test
9193
porch-test.test-proposed-package.proposed-v1 test-proposed-package proposed-v1 0 false Proposed porch-test
94+
porch-test.test-published-package.main test-published-package main -1 false Published porch-test
9295
porch-test.test-published-package.published-v1 test-published-package published-v1 1 true Published porch-test
9396
```
9497

@@ -111,10 +114,17 @@ porchctl rpkg del porch-test.test-draft-package.draft-v1 --namespace=default
111114
**Verify deletion:**
112115

113116
```bash
114-
porchctl rpkg get --namespace=default --name=test-draft-package
117+
porchctl rpkg get --namespace=default
115118
```
116119

117-
The Draft PackageRevision should no longer appear in the list.
120+
The Draft PackageRevision should no longer appear in the list:
121+
122+
```bash
123+
NAME PACKAGE WORKSPACENAME REVISION LATEST LIFECYCLE REPOSITORY
124+
porch-test.test-proposed-package.proposed-v1 test-proposed-package proposed-v1 0 false Proposed porch-test
125+
porch-test.test-published-package.main test-published-package main -1 false Published porch-test
126+
porch-test.test-published-package.published-v1 test-published-package published-v1 1 true Published porch-test
127+
```
118128

119129
---
120130

@@ -135,10 +145,16 @@ porchctl rpkg del porch-test.test-proposed-package.proposed-v1 --namespace=defau
135145
**Verify deletion:**
136146

137147
```bash
138-
porchctl rpkg get --namespace=default --name=test-proposed-package
148+
porchctl rpkg get --namespace=default
139149
```
140150

141-
The Proposed PackageRevision should no longer appear in the list.
151+
The Proposed PackageRevision should no longer appear in the list:
152+
153+
```bash
154+
NAME PACKAGE WORKSPACENAME REVISION LATEST LIFECYCLE REPOSITORY
155+
porch-test.test-published-package.main test-published-package main -1 false Published porch-test
156+
porch-test.test-published-package.published-v1 test-published-package published-v1 1 true Published porch-test
157+
```
142158

143159
---
144160

@@ -166,6 +182,7 @@ The lifecycle should now show `DeletionProposed`:
166182

167183
```bash
168184
NAME PACKAGE WORKSPACENAME REVISION LATEST LIFECYCLE REPOSITORY
185+
porch-test.test-published-package.main test-published-package main -1 false Published porch-test
169186
porch-test.test-published-package.published-v1 test-published-package published-v1 1 true DeletionProposed porch-test
170187
```
171188

@@ -188,10 +205,15 @@ porchctl rpkg del porch-test.test-published-package.published-v1 --namespace=def
188205
**Verify deletion:**
189206

190207
```bash
191-
porchctl rpkg get --namespace=default --name=test-published-package
208+
porchctl rpkg get --namespace=default
192209
```
193210

194-
The PackageRevision should no longer exist.
211+
The published PackageRevision should no longer exist, but the main branch-tracking PackageRevision remains:
212+
213+
```bash
214+
NAME PACKAGE WORKSPACENAME REVISION LATEST LIFECYCLE REPOSITORY
215+
porch-test.test-published-package.main test-published-package main -1 false Published porch-test
216+
```
195217

196218
---
197219

@@ -229,7 +251,12 @@ porchctl rpkg reject porch-test.test-reject-delete.reject-v1 --namespace=default
229251
porchctl rpkg get porch-test.test-reject-delete.reject-v1 --namespace=default
230252
```
231253

232-
The lifecycle should be back to `Published`.
254+
The lifecycle should be back to `Published`:
255+
256+
```bash
257+
NAME PACKAGE WORKSPACENAME REVISION LATEST LIFECYCLE REPOSITORY
258+
porch-test.test-reject-delete.reject-v1 test-reject-delete reject-v1 1 true Published porch-test
259+
```
233260

234261
---
235262

@@ -281,16 +308,19 @@ graph TD
281308
## Safety Considerations
282309

283310
**Published PackageRevision Protection:**
311+
284312
- Two-step deletion process prevents accidental removal
285313
- Deletion proposals can be reviewed before approval
286314
- Rejected proposals restore the PackageRevision to Published state
287315

288316
**Git Repository Impact:**
317+
289318
- Draft/Proposed deletions remove Git branches
290319
- Published deletions remove Git tags and references
291320
- Deletion is permanent and cannot be undone
292321

293322
**Dependency Considerations:**
323+
294324
- Check if other PackageRevisions depend on the one being deleted
295325
- Deleting upstream packages may affect downstream clones
296326
- Consider the impact on deployed workloads
@@ -368,4 +398,4 @@ porchctl rpkg get --namespace=default
368398

369399
All test PackageRevisions should now be removed.
370400

371-
---
401+
---

0 commit comments

Comments
 (0)