Week 12: Feature Flags & Release Management
Theme: Feature flags with LaunchDarkly/Unleash, release trains, semantic versioning.
Learning Objectives
- Implement feature flags in Go using Unleash (open-source)
- Manage release trains and semantic versioning
- Use feature flags for gradual rollout and kill switches
- Separate deploy from release
Reading Materials
- Unleash Documentation
- Unleash Go SDK
- LaunchDarkly Feature Flag Fundamentals
- Feature Toggles (Martin Fowler)
- Semantic Versioning
- Release Management Best Practices (Google)
Finger Exercises (choose 2)
- Deploy Unleash server to kind. Create a feature flag called "new-checkout-flow" with 50% rollout.
- In the Go app, use the Unleash Go SDK to check "new-checkout-flow". Route to new or old handler.
- Create a kill switch flag: if toggled off, the app returns a maintenance page.
Project
Integrate Unleash into the Go app:
- Flag:
new-authentication-flow(gradual rollout to 25%, 50%, 100%) - Flag:
enable-order-cancellation(kill switch) - Flag:
promotion-engine-v2(internal beta users only by user ID)
Build a release pipeline:
- Release train: every Friday, cut a release branch from main
- Release candidate: deploy to staging via ArgoCD, run integration tests
- Production rollout: auto-promote through Argo Rollouts
- Rollback: revert the feature flag, not the code
Document the release process in RELEASE.md
Time Budget
| Activity | Time |
|---|---|
| Reading | 1.5 hrs |
| Finger exercises | 1.5 hrs |
| Project | 3 hrs |
| Total | 6 hrs |