open-feature / open-feature/cli
feat(manifest): add expiry field and deprecation workflow support
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 63
- Forks
- 22
- Avg merge
- 1h 27m
- Merged PRs (30d)
- 19
Description
Add an optional expiry field to the flag manifest schema to indicate flag deprecation/removal dates. This enables a complete lifecycle management workflow for feature flags, including:
- Manifest schema enhancement: Add
expiryfield toBaseFlagstruct supporting ISO 8601 date format - Code generation updates: Modify all language generators (Go, Node.js, React, Python, Java, C#, NestJS) to emit deprecation annotations when flags have expiry dates
- Enhanced CLI commands: Update
compareandmanifest listcommands to visually highlight deprecated flags - New usage analysis command: Add
manifest usagecommand to search codebase for flag references, reporting file paths, line numbers, and occurrence counts
This feature addresses a common pain point in feature flag management: understanding when flags are no longer needed and measuring the scope of work required to safely remove them.
Acceptance Criteria
Schema and Core Changes
- Add optional
expiryfield toBaseFlagstruct ininternal/manifest/json-schema.go - Field should accept ISO 8601 date strings (e.g., "2025-12-31")
- Update JSON schema generation to include the new field
- Add validation to ensure expiry dates are properly formatted
- Ensure backward compatibility (field is optional)
Generator Updates
- Update Go generator to add
// Deprecated: expires on YYYY-MM-DDcomments for expired flags - Update Node.js generator to add
@deprecated expires on YYYY-MM-DDJSDoc tags - Update React generator to add deprecation comments/JSDoc
- Update Python generator to add deprecation warnings/docstrings
- Update Java generator to add
@Deprecatedannotations with comments - Update C# generator to add
[Obsolete("expires on YYYY-MM-DD")]attributes - Update NestJS generator to add deprecation JSDoc tags
CLI Command Enhancements
- Update
manifest listcommand to visually indicate deprecated flags (e.g., with warning icon or color) - Show expiry date in the flag list table output
- Update
comparecommand to highlight when deprecation status changes between manifests - Add special notation for flags that have already expired vs. future expiry
New Usage Analysis Command
- Create new
manifest usagecommand with flag key parameter - Implement file search functionality to find flag usage patterns across codebase
- Support common flag access patterns for each supported language:
- Go:
flags.MyFlag() - JavaScript/TypeScript:
flags.myFlag(),getStringValue('my-flag') - Python:
flags.my_flag() - Java:
flags.getMyFlag() - C#:
flags.MyFlag
- Go:
- Output format should include:
- Total occurrence count
- File paths with line numbers
- Context line showing the usage
- Add
--formatflag supporting table, JSON, and YAML output - Add
--pathflag to limit search scope to specific directories
Documentation and Testing
- Update manifest schema documentation/examples with expiry field
- Add tests for expiry field parsing and validation
- Add tests for deprecated flag handling in generators
- Add integration tests for usage analysis command
- Update CLI documentation to explain deprecation workflow
Notes
- The expiry field should be purely informational and not affect runtime behavior
- Consider adding a future enhancement for warning users about flags that are past their expiry date
- The usage analysis command will help teams estimate the effort required to remove deprecated flags
- Deprecation annotations will provide IDE warnings to developers using deprecated flags
- Consider adding
--include-expiredand--exclude-expiredfilters tomanifest listcommand
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with internal/manifest/json-schema.go to understand BaseFlag and the generated JSON schema. Then trace the existing manifest list and compare commands and each named language generator before planning the manifest usage command. Done means the optional ISO 8601 field, validation, annotations, CLI output, usage reporting, documentation, and tests meet the listed acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100