Skip to content

fix: Only run new license checker when flag is enabled - #13666

Merged
Artur- merged 3 commits into
masterfrom
guard-fallback-check-with-flag
May 3, 2022
Merged

Artur- merged 3 commits into
masterfrom
guard-fallback-check-with-flag

Conversation

@Artur-

@Artur- Artur- commented May 3, 2022

Copy link
Copy Markdown
Member

The checker is invoked in three places:

  1. After production build with the plugin
  2. For fallback chunk in production build
  3. Development time through dev mode gizmo

With this addition, all the three places are guarded by the feature flag

The checker is invoked in three places:
1. After production build with the plugin
2. For fallback chunk in production build
3. Development time through dev mode gizmo

With this addition, all the three places are guarded by the feature flag
@Artur-
Artur- requested a review from mcollovati May 3, 2022 13:25
@Artur- Artur- changed the title fix: Only run new license checker when enabled fix: Only run new license checker when flag is enabled May 3, 2022
@github-actions

github-actions Bot commented May 3, 2022 •

Copy link
Copy Markdown
Contributor

Unit Test Results

   961 files  ±0     961 suites  ±0   52m 59s ⏱️ -19s
6 263 tests ±0  6 214 ✔️ ±0  49 💤 ±0  0 ❌ ±0 
6 491 runs  ±0  6 436 ✔️ ±0  55 💤 ±0  0 ❌ ±0 

Results for commit cda5228. ± Comparison against base commit bda7f16.

♻️ This comment has been updated with latest results.

Comment on lines +481 to +482
if (!productionMode
|| !featureFlags.isEnabled(FeatureFlags.NEW_LICENSE_CHECKER)) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I correctly understand with this change we filter modules only if we are in production mode and the feature flag is enabled. If so, maybe inverting the condition may be easier to understand (at least for me)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't you not a not-fan of weird logic? Fixed

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I see more that one not, I need pen and paper to figure out how the condition works

@Artur-
Artur- enabled auto-merge (squash) May 3, 2022 15:59
@sonarqubecloud

sonarqubecloud Bot commented May 3, 2022

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Artur-
Artur- merged commit 007913b into master May 3, 2022
@Artur-
Artur- deleted the guard-fallback-check-with-flag branch May 3, 2022 16:46
@vaadin-bot

Copy link
Copy Markdown
Collaborator

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants