From 8a18548a80b7bfa75e85dfe1ea784f4c56c702fb Mon Sep 17 00:00:00 2001 From: dmc Date: Mon, 7 Oct 2024 15:16:42 +0200 Subject: [PATCH 1/7] checklist & prune script field --- CHECKLIST.md | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 3 +- 2 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 CHECKLIST.md diff --git a/CHECKLIST.md b/CHECKLIST.md new file mode 100644 index 000000000..329a606a3 --- /dev/null +++ b/CHECKLIST.md @@ -0,0 +1,107 @@ +# Platform Release Checklist + +## Dev + +- [ ] `./pear.dev sidecar shutdown` +- [ ] `git pull` +- **Build Update?** + - [ ] NO: continue + - [ ] YES: + - [ ] `npm install` + - [ ] `npm run bootstrap -- --dlruntime` +- [ ] `rm -fr node_modules` +- [ ] `npm install --omit=dev` +- [ ] `npm run prune` +- [ ] `./pear.dev sidecar` (own terminal) +- [ ] `./pear.dev seed dev` (own terminal) +- [ ] `./pear.dev stage --dry-run dev` +- **Dry Run Correct?** + - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) + - [ ] - YES: + - [ ] - [ SECOND MACHINE ] `pear sidecar --key=[devkey]` + - [ ] - [ SECOND MACHINE ] `pear sidecar` + - **Version is latest?** + - [ ] NO: wait for update, then `pear sidecar` + - [ ] YES: continue + - [ ] - [ SECOND MACHINE ] Open Keet + - [ ] - `./pear.dev stage dev` + - **[ SECOND MACHINE ] Update observed in Sidecar and Keet?** + - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) + - [ ] - YES: + - **[ SECOND MACHINE ] Platform Restart via Keet Button successful?** + - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) + - [ ] - YES: + - [ ] - `pear sidecar` (own terminal) + - **System Pear is Latest `dev`?** + - [ ] - NO: diagnose, correct, if platform issue resolved, [restart](./CHECKLIST.md), if system issue resolved, continue to **Staging** + - [ ] - YES: continue to **Staging** + +## Staging + +- **Staging RC Versioned?** + - [ ] - NO: + - [ ] - `npm version `, `git push --follow-tags` + - [ ] - Complete Dev Checklists to update +- [ ] - `pear seed staging` (own terminal) +- [ ] - `pear dump .` +- [ ] - `pear stage --dry-run staging` +- **Dry Run Correct?** + - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) + - [ ] - YES: + - [ ] - [ SECOND MACHINE ] `pear sidecar --key=[stagekey]` + - [ ] - [ SECOND MACHINE ] `pear sidecar` + - **Version is latest?** + - [ ] NO: wait for update, then `pear sidecar` + - [ ] YES: continue + - [ ] - [ SECOND MACHINE ] Open Keet + - [ ] - `pear stage staging` + - **[ SECOND MACHINE ] Update observed in Sidecar and Keet?** + - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) + - [ ] - YES: + - **[ SECOND MACHINE ] Platform Restart via Keet Button successful?** + - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) + - [ ] - YES: + - [ ] - `pear sidecar` (own terminal) + - **System Pear is Latest `staging`?** + - [ ] - NO: diagnose, correct, if platform issue resolved, [restart](./CHECKLIST.md) + - [ ] - YES: + - **Only Changelog and/or Version update?** + - [ ] NO: await QA Approval then continue + - [ ] YES: continue + +## Release-Candidate + +- **Changelog Updated & Versioned?** + - [ ] - NO: + - [ ] - Update Changelog, `git push` + - [ ] - `npm version `, `git push --follow-tags` + - [ ] - Complete Dev & Stage Checklists to update +- [ ] - `pear seed rc` (own terminal) +- [ ] - `pear dump .` +- [ ] - `pear stage --dry-run rc` +- **Dry Run Correct?** + - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) + - [ ] - YES: + - [ ] - [ SECOND MACHINE ] `pear sidecar --key=[stagekey]` + - [ ] - [ SECOND MACHINE ] `pear sidecar` + - **Version is latest?** + - [ ] NO: wait for update, then `pear sidecar` + - [ ] YES: continue + - [ ] - [ SECOND MACHINE ] Open Keet + - [ ] - `pear stage staging` + - **[ SECOND MACHINE ] Update observed in Sidecar and Keet?** + - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) + - [ ] - YES: + - **[ SECOND MACHINE ] Platform Restart via Keet Button successful?** + - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) + - [ ] - YES: + - [ ] - `pear sidecar` (own terminal) + - **System Pear is Latest Release-Candidate?** + - [ ] - NO: diagnose, correct, if platform issue resolved, [restart](./CHECKLIST.md) + - [ ] - YES: await QA Approval then continue to **Production** + +## Production + +- **Has Drive Watcher triggered in Keet Multisig Room and have two stakeholders signed blobs and drive?** + - [ ] - NO: await stakeholder signing + - [ ] - YES: use signatures to write to production hypercore [ TODO: SPECIFIC STEPS ] \ No newline at end of file diff --git a/package.json b/package.json index e0f64c9bf..92ac4edc1 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "lint": "standard", "lint:fix": "standard --fix", "archdump": "node scripts/bootstrap.js --archdump", - "bootstrap": "node scripts/bootstrap.js" + "bootstrap": "node scripts/bootstrap.js", + "prune": "node scripts/prune-dual-prebuilds.mjs" }, "author": "Holepunch", "pear": { From 5a993f917737570d2a17468d20db048be7aeb28e Mon Sep 17 00:00:00 2001 From: dmc Date: Mon, 7 Oct 2024 15:37:30 +0200 Subject: [PATCH 2/7] improve versioning flow --- CHECKLIST.md | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/CHECKLIST.md b/CHECKLIST.md index 329a606a3..2ae53340a 100644 --- a/CHECKLIST.md +++ b/CHECKLIST.md @@ -33,15 +33,20 @@ - [ ] - YES: - [ ] - `pear sidecar` (own terminal) - **System Pear is Latest `dev`?** - - [ ] - NO: diagnose, correct, if platform issue resolved, [restart](./CHECKLIST.md), if system issue resolved, continue to **Staging** - - [ ] - YES: continue to **Staging** + - [ ] - NO: diagnose, correct, if platform issue resolved, [restart](./CHECKLIST.md), if system issue resolved then YES + - [ ] - YES: + - **RC Versioned?** + - [ ] - NO: + - [ ] - `npm version `, `git push --follow-tags` + - [ ] - [restart](./CHECKLIST.md) + - [ ] - YES: continue to **Staging** + ## Staging -- **Staging RC Versioned?** - - [ ] - NO: - - [ ] - `npm version `, `git push --follow-tags` - - [ ] - Complete Dev Checklists to update +- **RC Versioned?** + - [ ] - NO: complete **Dev** + - [ ] - YES: continue - [ ] - `pear seed staging` (own terminal) - [ ] - `pear dump .` - [ ] - `pear stage --dry-run staging` @@ -66,16 +71,22 @@ - [ ] - NO: diagnose, correct, if platform issue resolved, [restart](./CHECKLIST.md) - [ ] - YES: - **Only Changelog and/or Version update?** - - [ ] NO: await QA Approval then continue - - [ ] YES: continue + - [ ] NO: await QA Approval then YES + - [ ] YES: + - **Changelog Updated & Versioned?** + - [ ] - NO: + - [ ] - Update Changelog, `git push` + - [ ] - `npm version `, `git push --follow-tags` + - [ ] - Complete **Dev** & **Staging** Checklists + - [ ] - YES: continue to **Release-Candidate** + ## Release-Candidate - **Changelog Updated & Versioned?** - [ ] - NO: - - [ ] - Update Changelog, `git push` - - [ ] - `npm version `, `git push --follow-tags` - - [ ] - Complete Dev & Stage Checklists to update + - [ ] - complete **Staging** + - [ ] YES: continue - [ ] - `pear seed rc` (own terminal) - [ ] - `pear dump .` - [ ] - `pear stage --dry-run rc` From 5c25dd0d27d5d1545dbd52861953b4f6c50ca972 Mon Sep 17 00:00:00 2001 From: dmc Date: Mon, 7 Oct 2024 15:47:07 +0200 Subject: [PATCH 3/7] git clean, bootstrap -> archdump, always archdump --- CHECKLIST.md | 8 +++----- scripts/bootstrap.js | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CHECKLIST.md b/CHECKLIST.md index 2ae53340a..63908b597 100644 --- a/CHECKLIST.md +++ b/CHECKLIST.md @@ -3,12 +3,10 @@ ## Dev - [ ] `./pear.dev sidecar shutdown` +- [ ] `git clean -x -f -d` - [ ] `git pull` -- **Build Update?** - - [ ] NO: continue - - [ ] YES: - - [ ] `npm install` - - [ ] `npm run bootstrap -- --dlruntime` +- [ ] `npm install` +- [ ] `npm run archdump` - [ ] `rm -fr node_modules` - [ ] `npm install --omit=dev` - [ ] `npm run prune` diff --git a/scripts/bootstrap.js b/scripts/bootstrap.js index d8aa7fd10..4e87d3874 100755 --- a/scripts/bootstrap.js +++ b/scripts/bootstrap.js @@ -1,6 +1,5 @@ #!/usr/bin/env bare 'use strict' - const { platform, arch, isWindows, isBare } = require('which-runtime') const fs = isBare ? require('bare-fs') : require('fs') const path = isBare ? require('bare-path') : require('path') From 79a49e7f4651074ae1c5cbd28f0df3e5f37958e1 Mon Sep 17 00:00:00 2001 From: dmc Date: Mon, 7 Oct 2024 16:08:57 +0200 Subject: [PATCH 4/7] improve clarity of what runs where --- CHECKLIST.md | 54 +++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/CHECKLIST.md b/CHECKLIST.md index 63908b597..5be8a8750 100644 --- a/CHECKLIST.md +++ b/CHECKLIST.md @@ -1,5 +1,7 @@ # Platform Release Checklist +**Legend:** [ 2M ] - Second Machine + ## Dev - [ ] `./pear.dev sidecar shutdown` @@ -16,21 +18,21 @@ - **Dry Run Correct?** - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) - [ ] - YES: - - [ ] - [ SECOND MACHINE ] `pear sidecar --key=[devkey]` - - [ ] - [ SECOND MACHINE ] `pear sidecar` - - **Version is latest?** - - [ ] NO: wait for update, then `pear sidecar` + - [ ] - [ 2M ] `pear sidecar --key=[devkey]` + - [ ] - [ 2M ] `pear sidecar` + - **[ 2M ] Version is latest?** + - [ ] NO: wait for update, then [ 2M ] `pear sidecar` - [ ] YES: continue - - [ ] - [ SECOND MACHINE ] Open Keet + - [ ] - [ 2M ] Open Keet - [ ] - `./pear.dev stage dev` - - **[ SECOND MACHINE ] Update observed in Sidecar and Keet?** + - **[ 2M ] Update observed in Sidecar and Keet?** - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) - [ ] - YES: - - **[ SECOND MACHINE ] Platform Restart via Keet Button successful?** + - **[ 2M ] Platform Restart via Keet Button successful?** - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) - [ ] - YES: - - [ ] - `pear sidecar` (own terminal) - - **System Pear is Latest `dev`?** + - [ ] - [ 2M ] `pear sidecar` + - **[ 2M ] System Pear is Latest `dev`?** - [ ] - NO: diagnose, correct, if platform issue resolved, [restart](./CHECKLIST.md), if system issue resolved then YES - [ ] - YES: - **RC Versioned?** @@ -51,21 +53,21 @@ - **Dry Run Correct?** - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) - [ ] - YES: - - [ ] - [ SECOND MACHINE ] `pear sidecar --key=[stagekey]` - - [ ] - [ SECOND MACHINE ] `pear sidecar` - - **Version is latest?** - - [ ] NO: wait for update, then `pear sidecar` + - [ ] - [ 2M ] `pear sidecar --key=[stagekey]` + - [ ] - [ 2M ] `pear sidecar` + - **[ 2M ] Version is latest?** + - [ ] NO: wait for update, then [ 2M ] `pear sidecar` - [ ] YES: continue - - [ ] - [ SECOND MACHINE ] Open Keet + - [ ] - [ 2M ] Open Keet - [ ] - `pear stage staging` - - **[ SECOND MACHINE ] Update observed in Sidecar and Keet?** + - **[ 2M ] Update observed in Sidecar and Keet?** - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) - [ ] - YES: - - **[ SECOND MACHINE ] Platform Restart via Keet Button successful?** + - **[ 2M ] Platform Restart via Keet Button successful?** - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) - [ ] - YES: - - [ ] - `pear sidecar` (own terminal) - - **System Pear is Latest `staging`?** + - [ ] - [ 2M ] `pear sidecar` + - **[ 2M ] System Pear is Latest `staging`?** - [ ] - NO: diagnose, correct, if platform issue resolved, [restart](./CHECKLIST.md) - [ ] - YES: - **Only Changelog and/or Version update?** @@ -91,20 +93,20 @@ - **Dry Run Correct?** - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) - [ ] - YES: - - [ ] - [ SECOND MACHINE ] `pear sidecar --key=[stagekey]` - - [ ] - [ SECOND MACHINE ] `pear sidecar` - - **Version is latest?** - - [ ] NO: wait for update, then `pear sidecar` + - [ ] - [ 2M ] `pear sidecar --key=[stagekey]` + - [ ] - [ 2M ] `pear sidecar` + - **[ 2M ] Version is latest?** + - [ ] NO: wait for update, then [ 2M ] `pear sidecar` - [ ] YES: continue - - [ ] - [ SECOND MACHINE ] Open Keet + - [ ] - [ 2M ] Open Keet - [ ] - `pear stage staging` - - **[ SECOND MACHINE ] Update observed in Sidecar and Keet?** + - **[ 2M ] Update observed in Sidecar and Keet?** - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) - [ ] - YES: - - **[ SECOND MACHINE ] Platform Restart via Keet Button successful?** + - **[ 2M ] Platform Restart via Keet Button successful?** - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md) - [ ] - YES: - - [ ] - `pear sidecar` (own terminal) + - [ ] - [ 2M ] `pear sidecar` - **System Pear is Latest Release-Candidate?** - [ ] - NO: diagnose, correct, if platform issue resolved, [restart](./CHECKLIST.md) - [ ] - YES: await QA Approval then continue to **Production** From fa9b07381cc1688f29a63c80bf285254b8c9977c Mon Sep 17 00:00:00 2001 From: dmc Date: Mon, 7 Oct 2024 16:16:17 +0200 Subject: [PATCH 5/7] ensure sys pear is correct pear when staging --- CHECKLIST.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHECKLIST.md b/CHECKLIST.md index 5be8a8750..82c500366 100644 --- a/CHECKLIST.md +++ b/CHECKLIST.md @@ -47,6 +47,9 @@ - **RC Versioned?** - [ ] - NO: complete **Dev** - [ ] - YES: continue +- **System Pear is on Latest Devkey?** + - [ ] - NO: ensure devkey is seeding, ensure pear sidecar --key is correct, ensure sys sidecar is on latest, then continue + - [ ] - YES: continue - [ ] - `pear seed staging` (own terminal) - [ ] - `pear dump .` - [ ] - `pear stage --dry-run staging` @@ -87,6 +90,12 @@ - [ ] - NO: - [ ] - complete **Staging** - [ ] YES: continue +- **System Pear is on Latest Stagekey or on Devkey matching Stagekey?** + - [ ] - NO: ensure stagekey is seeding, ensure `pear sidecar --key` is correct, ensure sys sidecar is on latest, then continue + - [ ] - YES: continue +- [ ] - `pear seed staging` (own terminal) +- [ ] - `pear dump .` +- [ ] - `pear stage --dry-run staging` - [ ] - `pear seed rc` (own terminal) - [ ] - `pear dump .` - [ ] - `pear stage --dry-run rc` From 4246b15511884896d149c9925e05fc019f355882 Mon Sep 17 00:00:00 2001 From: dmc Date: Mon, 7 Oct 2024 17:15:01 +0200 Subject: [PATCH 6/7] no git clean --- CHECKLIST.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHECKLIST.md b/CHECKLIST.md index 82c500366..21e76659c 100644 --- a/CHECKLIST.md +++ b/CHECKLIST.md @@ -5,9 +5,9 @@ ## Dev - [ ] `./pear.dev sidecar shutdown` -- [ ] `git clean -x -f -d` - [ ] `git pull` - [ ] `npm install` +- [ ] `rm -fr by-arch` - [ ] `npm run archdump` - [ ] `rm -fr node_modules` - [ ] `npm install --omit=dev` From 270900acd244b90c3f3b0cff84e2a46fb7ce2297 Mon Sep 17 00:00:00 2001 From: dmc Date: Tue, 8 Oct 2024 16:40:09 +0200 Subject: [PATCH 7/7] rm package-lock before stage --- CHECKLIST.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHECKLIST.md b/CHECKLIST.md index 21e76659c..17d9f655c 100644 --- a/CHECKLIST.md +++ b/CHECKLIST.md @@ -14,6 +14,7 @@ - [ ] `npm run prune` - [ ] `./pear.dev sidecar` (own terminal) - [ ] `./pear.dev seed dev` (own terminal) +- [ ] `rm package-lock.json` - [ ] `./pear.dev stage --dry-run dev` - **Dry Run Correct?** - [ ] - NO: diagnose, correct, [restart](./CHECKLIST.md)