Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log or throw for non-existent feature flags #18672

Closed
tarekoraby opened this issue Feb 12, 2024 · 4 comments · Fixed by #19345
Closed

Log or throw for non-existent feature flags #18672

tarekoraby opened this issue Feb 12, 2024 · 4 comments · Fixed by #19345

Comments

@tarekoraby
Copy link
Contributor

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.

@schastlivcev
Copy link
Contributor

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

@caalador
Copy link
Contributor

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.

@mshabarov
Copy link
Contributor

For contribution guidelines, please see these docs.

schastlivcev pushed a commit to schastlivcev/vaadin-flow that referenced this issue Mar 26, 2024
mshabarov added a commit that referenced this issue May 10, 2024
There was no indication if you were using non-existent or unsupported feature flags at startup. This change brings log warnings about existence of such feature flags

Fixes #18672
mcollovati pushed a commit that referenced this issue May 10, 2024
There was no indication if you were using non-existent or unsupported feature flags at startup. This change brings log warnings about existence of such feature flags

Fixes #18672

Co-authored-by: Mikhail Schastlivtsev <rodsher111@gmail.com>
Vaadin Flow enhancements backlog (Vaadin 10+) automation moved this from Maybe to Done / Pending Release May 10, 2024
@vaadin-bot
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment