@wpmoo/toolkit 0.9.26 → 0.9.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -5
- package/dist/doctor.js +6 -266
- package/dist/postgres-diagnostics.js +646 -0
- package/docs/1-0-readiness.md +129 -0
- package/docs/command-reference.md +110 -0
- package/docs/generated-environment-verification.md +11 -11
- package/docs/handoff.md +11 -0
- package/docs/lifecycle-recipes.md +190 -0
- package/docs/troubleshooting.md +225 -0
- package/package.json +1 -1
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
This cookbook lists common WPMoo Toolkit failure states and the safest next
|
|
4
|
+
step for each one. Run commands from the generated environment root unless the
|
|
5
|
+
example explicitly starts with `npx @wpmoo/toolkit`.
|
|
6
|
+
|
|
7
|
+
## Docker Is Missing Or Stopped
|
|
8
|
+
|
|
9
|
+
Symptoms:
|
|
10
|
+
|
|
11
|
+
- The create wizard stops before writing files.
|
|
12
|
+
- `./moo start`, `./moo status`, or `./moo doctor` reports Docker or Docker
|
|
13
|
+
Compose as unavailable.
|
|
14
|
+
|
|
15
|
+
Check:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
docker version
|
|
19
|
+
docker compose version
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Next steps:
|
|
23
|
+
|
|
24
|
+
1. Install Docker Desktop or another Docker Engine distribution.
|
|
25
|
+
2. Start Docker Desktop and wait until the engine is ready.
|
|
26
|
+
3. Open a new terminal if Docker was added to `PATH`.
|
|
27
|
+
4. Run the WPMoo command again.
|
|
28
|
+
|
|
29
|
+
The create wizard intentionally stops before setup questions when required
|
|
30
|
+
runtime tools are missing. That protects the workspace from half-created
|
|
31
|
+
environments.
|
|
32
|
+
|
|
33
|
+
## No Modules Found
|
|
34
|
+
|
|
35
|
+
Symptoms:
|
|
36
|
+
|
|
37
|
+
- The cockpit disables module actions.
|
|
38
|
+
- `List modules`, `Install module`, `Update module`, `Run tests`, `Run
|
|
39
|
+
environment lint`, `Generate POT`, or `Remove module` says no modules are
|
|
40
|
+
available.
|
|
41
|
+
|
|
42
|
+
Check the source inventory:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
./moo status
|
|
46
|
+
npx @wpmoo/toolkit source list
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Next steps:
|
|
50
|
+
|
|
51
|
+
1. Add or sync a source repository.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx @wpmoo/toolkit add-repo --repo-url https://github.com/example-org/odoo-addons.git --source-type private
|
|
55
|
+
npx @wpmoo/toolkit source sync
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
2. Add a new module skeleton if the repository exists but has no installable
|
|
59
|
+
module yet.
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npx @wpmoo/toolkit add-module --repo odoo-addons --module moo_test --source-type private
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
3. Reopen the cockpit or run `./moo status` again.
|
|
66
|
+
|
|
67
|
+
Expected result:
|
|
68
|
+
|
|
69
|
+
- Module actions become selectable once at least one installable module is
|
|
70
|
+
detected.
|
|
71
|
+
- If a module has no actionable Odoo menu, `status` reports it so you can fix
|
|
72
|
+
the generated menu/action metadata.
|
|
73
|
+
|
|
74
|
+
## No Source Repositories
|
|
75
|
+
|
|
76
|
+
Symptoms:
|
|
77
|
+
|
|
78
|
+
- `source list` is empty.
|
|
79
|
+
- Module actions cannot find a target repository.
|
|
80
|
+
- The generated environment exists but `odoo/custom/src/private`,
|
|
81
|
+
`odoo/custom/src/oca`, and `odoo/custom/src/external` contain no usable
|
|
82
|
+
source checkout.
|
|
83
|
+
|
|
84
|
+
Check:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npx @wpmoo/toolkit source list --json
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Next steps:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
npx @wpmoo/toolkit add-repo --repo-url https://github.com/example-org/odoo-addons.git --source-type private
|
|
94
|
+
npx @wpmoo/toolkit source sync
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Use `--source-type oca` or `--source-type external` when the repository belongs
|
|
98
|
+
outside the private source category.
|
|
99
|
+
|
|
100
|
+
## Dirty Module Deletion Is Refused
|
|
101
|
+
|
|
102
|
+
Symptoms:
|
|
103
|
+
|
|
104
|
+
- `remove-module` refuses to delete module files.
|
|
105
|
+
- The command reports local changes or an unsafe module worktree.
|
|
106
|
+
|
|
107
|
+
Check the source repository directly:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
git -C odoo/custom/src/private/<repo> status --short
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Next steps:
|
|
114
|
+
|
|
115
|
+
1. Commit, stash, or intentionally discard the local module changes from inside
|
|
116
|
+
the source repository.
|
|
117
|
+
2. Re-run the removal.
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npx @wpmoo/toolkit remove-module --repo <repo> --module <module> --source-type private --delete-files
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
WPMoo refuses dirty deletion because module repositories are product source
|
|
124
|
+
code, not disposable generated files.
|
|
125
|
+
|
|
126
|
+
## Optional `wpmoo` Alias Reports E404
|
|
127
|
+
|
|
128
|
+
Symptoms:
|
|
129
|
+
|
|
130
|
+
- Release checks or manual npm checks report `wpmoo@<version>` as missing.
|
|
131
|
+
- Scoped packages are available.
|
|
132
|
+
|
|
133
|
+
Required packages:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npm view @wpmoo/toolkit@<version> version
|
|
137
|
+
npm view @wpmoo/odoo@<version> version
|
|
138
|
+
npm view @wpmoo/odoo-dev@<version> version
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Interpretation:
|
|
142
|
+
|
|
143
|
+
- `@wpmoo/toolkit`, `@wpmoo/odoo`, and `@wpmoo/odoo-dev` are the supported
|
|
144
|
+
release artifacts.
|
|
145
|
+
- The unscoped `wpmoo` short alias is best-effort. An E404 for `wpmoo` does not
|
|
146
|
+
invalidate a release when the three scoped packages verify.
|
|
147
|
+
|
|
148
|
+
Use the supported package path in automation:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
npx @wpmoo/toolkit --version
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## PostgreSQL Diagnostics Are Unavailable
|
|
155
|
+
|
|
156
|
+
Symptoms:
|
|
157
|
+
|
|
158
|
+
- `./moo doctor --postgres` prints an advisory warning.
|
|
159
|
+
- `./moo doctor --json --postgres` includes `postgres.available: false`.
|
|
160
|
+
|
|
161
|
+
Check that services are running:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
./moo status
|
|
165
|
+
./moo start
|
|
166
|
+
./moo doctor --postgres
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Next steps:
|
|
170
|
+
|
|
171
|
+
1. Confirm the database service is running and reachable.
|
|
172
|
+
2. Run the JSON form to inspect the structured reason.
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
./moo doctor --json --postgres
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
3. Treat PostgreSQL diagnostics as advisory. WPMoo only runs read-only checks
|
|
179
|
+
and does not tune PostgreSQL automatically.
|
|
180
|
+
|
|
181
|
+
Expected result when available:
|
|
182
|
+
|
|
183
|
+
- The JSON payload includes `postgres.contractVersion`.
|
|
184
|
+
- The diagnostics object includes `schemaVersion`.
|
|
185
|
+
- Missing or malformed metric rows are reported as unavailable diagnostics
|
|
186
|
+
instead of being treated as success.
|
|
187
|
+
|
|
188
|
+
## Stage Or Production Guard Failure
|
|
189
|
+
|
|
190
|
+
Symptoms:
|
|
191
|
+
|
|
192
|
+
- `install`, `update`, `test`, `resetdb`, or `restore-snapshot` is refused in
|
|
193
|
+
`WPMOO_ENV=stage` or `WPMOO_ENV=prod`.
|
|
194
|
+
- The message names a required `WPMOO_ALLOW_*` flag.
|
|
195
|
+
|
|
196
|
+
Safe preview commands:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
./moo restore-snapshot --dry-run <snapshot-name> devel
|
|
200
|
+
./moo doctor
|
|
201
|
+
./moo doctor --postgres
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Intentional stage lifecycle command:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
WPMOO_ENV=stage WPMOO_ALLOW_STAGE_LIFECYCLE=1 ./moo update <module> devel
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Intentional production lifecycle command:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
WPMOO_ENV=prod WPMOO_ALLOW_PROD_LIFECYCLE=1 ./moo test <module> --db devel
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Intentional destructive command:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
WPMOO_ENV=stage WPMOO_ALLOW_DESTRUCTIVE=1 WPMOO_ALLOW_NO_RECENT_SNAPSHOT=1 ./moo resetdb devel
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Use the guard flag only when the command is intentional, reviewed, and has an
|
|
223
|
+
appropriate rollback path. Migration-risk lifecycle commands may also require
|
|
224
|
+
`WPMOO_ALLOW_MIGRATIONS=1`.
|
|
225
|
+
|