Hooks: Run Something, Gate Something
Add a pre-upgrade gate that refuses a bad upgrade before any object changes, with a weight and a delete policy — then make it fail on purpose.
Skill labintermediate~45 minPro
What you'll do
- ✓Attach a Job to a lifecycle point with a hook annotation
- ✓Order hooks with weights and clean them up with a delete policy
- ✓See that hooks are run rather than installed
- ✓Stop an upgrade before it touches anything
Lab outline
- 01A gate
- 02Prove it stops
Before you start
- Tests: One Kind That Renders, One That Runs
Every lab runs on a real machine of your own in the browser — no installs, nothing to clean up — and checks your work automatically as you go.