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

Feature flag changes are ignored on client side when default bundle is used #20991

Open
vursen opened this issue Feb 13, 2025 · 1 comment
Open

Comments

@vursen
Copy link
Contributor

vursen commented Feb 13, 2025

Description of the bug

I downloaded a project from Vaadin Start and enabled the accessibleDisabledButtons feature flag via Copilot. When the server starts, the logs show that the feature flag is activated, but it remains false on the client-side. On the contrary, the dashboardComponent flag appears as true on the client-side even though it's not present in vaadin-featureflags.properties.

Setting vaadin.frontend.hotdeploy=true resolves the issue, which suggests that it's related to the default bundle, which Vaadin start projects use by default.

Expected behavior

It should be possible to activate / deactivate feature flags in Vaadin start projects without setting any additional parameters.

Minimal reproducible example

button-test.zip

Versions

  • Vaadin / Flow version: 24.7.0.alpha8
  • Java version: 23
  • OS version: Mac OS
@vursen vursen changed the title Feature flag changes are ignored on client side when using default bundle Feature flag changes are ignored on client side when default bundle is used Feb 13, 2025
@mshabarov
Copy link
Contributor

mshabarov commented Feb 13, 2025

Looks like a bug indeed.
At least Flow should re-build the bundle in that case, as the default bundle has empty feature flags file.
Better to keep the default bundle and handle feature flags as a separate static resource, so that you don't need to rebuild a bundle. On the other hand, if a feature behind a flag needs some extra JS/TS, then Flow should rebuild the bundle.

We can agreed to always rebuild in this case, if the feature flags config is changed comparing to what is in the default/custom bundle.

UPD: to optimise this, we would need an extra flag in each feature flag that tells if a feature has only Java or JS/TS codes. Flow will re-build bundle only if it spots a new feature flag (or removing a feature flag) that corresponds to a feature that has JS/TS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Normal Priority (P2)
Status: 🟢Ready to Go
Development

No branches or pull requests

2 participants