Feature request: Time based feature flags actions
See original GitHub issueUse case
I’ve got a few use cases for feature flags rule actions. It’s possible to due that today but its really finicky.
- I’d like to turn on/enable a feature flags rule only during a certain time of the day (between 10:00-23:00 24 hours clock)
- i’d like to turn on/enable a feature flags rule during a certain date range (UTC time)
- i’d like to turn on/enable a feature flags rule only during weekends, or just weekdays
- i’d like to turn on/enable a feature flags rule during certain week days and certain hours
I’d like to be able to do combine these conditions with other conditions.
I think the implementation is simple, just need to define the UX.
Solution/User Experience
Time based conditions are sorely missing from the current solution.
Alternative solutions
use regular actions. Use rules that define time as unix time ints and define actions like KEY_GREATER_THAN_VALUE and KEY_LESS_THAN_VALUE.
Not really readable when using unix time ints but it can work.
Not agreat UX.
Acknowledgment
- This feature request meets Lambda Powertools Tenets
- Should this be considered in other Lambda Powertools languages? i.e. Java, TypeScript
Issue Analytics
- State:
- Created a year ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Testing Time-Based Features with Feature Flags - Reflectoring
Time -based features in a software application are a pain to test. To test such a feature, you can (and should) write unit...
Read more >Feature Flags: The Hidden Switch Behind Continuous ...
Feature flags allows you to ship code more frequently, test on production, and wow your users by revealing the feature at the right...
Read more >Feature Toggles (aka Feature Flags) - Martin Fowler
These are feature flags used to enable trunk-based development for teams practicing Continuous Delivery. They allow in-progress features to be checked into a ......
Read more >How we ship code faster and safer with feature flags
Using feature flags allows us to work on features incrementally. Only staff members working on the project have the corresponding feature flag ......
Read more >Feature Flags Best Practices (Feature Toggles) - Harness
We recommend giving feature flags human-readable names to help make feature flag management easier over time. While this won't solve the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@leandrodamascena I’ve also been working on a PR. I’ll create a PR later today so we could merge the code.
Hi @heitorlessa and @ran-isenberg! First of all, thank you so much for sharing your code with us Ran! This made the initial steps much easier.
I’m still at the beginning of the code but I can already validate a feature flag with a condition for specific days of the week. What do you think about me opening a PR in the next few days and we can work to improve and validate that @ran-isenberg? There will definitely be things to change or improve and we can work together on that.
For now, see this example:
SAM app.py
JSON
Lambda execution