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

fix: add warnings for unsupported feature flags (#18672) #19049

Conversation

schastlivcev
Copy link
Contributor

Description

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

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

@CLAassistant
Copy link

CLAassistant commented Mar 26, 2024

CLA assistant check
All committers have signed the CLA.

@schastlivcev schastlivcev marked this pull request as draft March 26, 2024 23:18
@schastlivcev schastlivcev force-pushed the fix/18672-unsupported-feature-flags branch from c3b2464 to f24304b Compare March 26, 2024 23:44
@schastlivcev
Copy link
Contributor Author

Hi, I'm sorry for taking so long, have some questions:

  1. I saw "expressBuild" feature flag in some .properties files, should I add it to the FeatureFlags class? Add a feature flag for Express Build #15375
  2. I checked against the ids in the class, is it correct or is there another place to look?
  3. Original issue was about the .properties file, should I expand it to the system properties?
  4. Do I need to put a boolean check flag into a synchronized block?

@caalador caalador added the Contribution PRs coming from the community or external to the team label Mar 27, 2024
@mshabarov
Copy link
Contributor

Thanks for your contribution @schastlivcev !

Some suggestions:

  1. ExpressBuild flag has been removed and isn't used anymore. It was related to pre-compiled bundles feature, but can be removed now from everywhere in Flow.
  2. I think the com.vaadin.experimental. + flag's id is enough for matching.
  3. Would be better to apply to system properties, as this might be a common case to set flags in CI for instance.

Copy link

github-actions bot commented Apr 2, 2024

Test Results

1 099 files  ±0  1 099 suites  ±0   1h 19m 50s ⏱️ -31s
7 012 tests +3  6 963 ✅ +3  49 💤 ±0  0 ❌ ±0 
7 356 runs  +4  7 295 ✅ +4  61 💤 ±0  0 ❌ ±0 

Results for commit b320073. ± Comparison against base commit 63e6dfd.

♻️ This comment has been updated with latest results.

@mshabarov
Copy link
Contributor

@schastlivcev anything else you wanted to add? Otherwise, I'll merge this pull request.
Thanks again for contribution!

@vaadin-bot
Copy link
Collaborator

TC Format Checker Report - 12:39 - 19 - Apr

BLOCKER There are 2 files with format errors

  • To see a complete report of formatting issues, download the differences file

  • To fix the build, please run mvn formatter:format in your branch and commit the changes.

  • Optionally you might add the following line in your .git/hooks/pre-commit file:

    mvn formatter:format
    

Here is the list of files with format issues in your PR:

flow-server/src/main/java/com/vaadin/experimental/FeatureFlags.java
flow-server/src/test/java/com/vaadin/experimental/FeatureFlagsTest.java

@mshabarov
Copy link
Contributor

@schastlivcev could you please run mvn formatter:format and push changes? formatting blocks this PR and I cannot access your fork branch.

Copy link

sonarcloud bot commented Apr 19, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@schastlivcev
Copy link
Contributor Author

Sorry for so long replies, lots of work. I'll deal with changes by the end of the week

@mshabarov
Copy link
Contributor

Sorry for so long replies, lots of work. I'll deal with changes by the end of the week

Thanks! And no worries, let me know if you need any support.

@mshabarov
Copy link
Contributor

Closed in favour of #19345.

@mshabarov mshabarov closed this May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contribution PRs coming from the community or external to the team +0.0.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log or throw for non-existent feature flags
5 participants