flow
flow copied to clipboard
Log or throw for non-existent feature flags
Describe your motivation
When adding a non-existent feature flag to vaadin-featureflags.properties, the app starts normally without errors or any indication in the logs that something unexpected happened. This behavior is problematic (a) for people upgrading to newer versions where the feature flag is no longer working, and (b) when typos are made in the feature flag name.
Describe the solution you'd like
During startup, an error should be thrown, or a warning should be logged, if a non-supported feature flag is present in vaadin-featureflags.properties.
Hi, I'd like to try to implement this feature)
The feature should be added into loadProperties in the FeatureFlags class.
So basically get the keys from the Properties and check those keys against the available feature IDs.
One thing to note is that there should be a static flag that even if we get multiple calls to loadProperties we should only log the faulty keys once and not multiple times.
For contribution guidelines, please see these docs.
This ticket/PR has been released with Vaadin 24.5.0.alpha1 and is also targeting the upcoming stable 24.5.0 version.