flow icon indicating copy to clipboard operation
flow copied to clipboard

Log or throw for non-existent feature flags

Open tarekoraby opened this issue 1 year ago • 3 comments

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.

tarekoraby avatar Feb 12 '24 10:02 tarekoraby

Hi, I'd like to try to implement this feature)

schastlivcev avatar Feb 26 '24 06:02 schastlivcev

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.

caalador avatar Feb 26 '24 08:02 caalador

For contribution guidelines, please see these docs.

mshabarov avatar Feb 26 '24 09:02 mshabarov

This ticket/PR has been released with Vaadin 24.5.0.alpha1 and is also targeting the upcoming stable 24.5.0 version.

vaadin-bot avatar May 31 '24 11:05 vaadin-bot