Practice ยท 3 of 3
Canary Cohort Picker
Write canaryFor(user, rollout) โ user is { id: string, internal: bool, betaOptIn: bool }, rollout is { percent, excludeInternals: bool }. A user is in the canary if: internals are in whenever excludeInternals is false; betaOptIn users are always in; otherwise hash(id) % 100 < percent (hash is provided in the boilerplate). Return true/false.
Difficulty: advanced
Press Submit to check your solution.
Back to lesson: Practice: Release Engineering โ Practice