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: set load-on-startup for automatically registered Vaadin servlet #14501

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

mcollovati
Copy link
Collaborator

@mcollovati mcollovati commented Sep 12, 2022

Description

When using Vite, DevModeInitializer blocks dev-server startup until a VaadinServlet is deployed because it needs to get the servlet path to use. If the container lazily loads servlets, Vite will not start until the first HTTP request for the Vaadin servlet is received.
This change sets load-on-startup feature for automatically deployed Vaadin servlet, to ensure that the servlet and Vite are loaded on the startup of the Web application

Part of #14479

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.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

When using Vite, DevModeInitializer blocks dev-server startup until a
VaadinServlet is deployed because it needs to get the servlet path to use.
If the container lazily loads servlets, Vite will not start until the first
HTTP request for the Vaadin servlet is received.
This change sets load-on-startup feature for automatically deployed Vaadin
servlet, to ensure that the servlet and Vite are loaded on the startup of the
Web application

Part of #14479
@sonarqubecloud
Copy link

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

@github-actions
Copy link

Unit Test Results

   919 files  ±0     919 suites  ±0   48m 57s ⏱️ - 2m 32s
6 027 tests ±0  5 974 ✔️ ±0  53 💤 ±0  0 ±0 
6 246 runs   - 6  6 186 ✔️  - 6  60 💤 ±0  0 ±0 

Results for commit 622dc04. ± Comparison against base commit 0261622.

@MarcinVaadin
Copy link
Member

MarcinVaadin commented Sep 13, 2022

Shouldn't be a feature instead of bugfix?

@mcollovati
Copy link
Collaborator Author

Shouldn't be a feature instead of bugfix?

Good question. I would say it is a bug fix because if we need a servlet to be initialized to start Vite, we should provide an eager initialization out of the box.

@mshabarov mshabarov merged commit 814373d into master Sep 13, 2022
@mshabarov mshabarov deleted the issues/14479_servlet_load_on_startup branch September 13, 2022 11:00
vaadin-bot pushed a commit that referenced this pull request Sep 13, 2022
…14501)

When using Vite, DevModeInitializer blocks dev-server startup until a
VaadinServlet is deployed because it needs to get the servlet path to use.
If the container lazily loads servlets, Vite will not start until the first
HTTP request for the Vaadin servlet is received.
This change sets load-on-startup feature for automatically deployed Vaadin
servlet, to ensure that the servlet and Vite are loaded on the startup of the
Web application

Part of #14479
mshabarov pushed a commit that referenced this pull request Sep 13, 2022
…14501) (#14513)

When using Vite, DevModeInitializer blocks dev-server startup until a
VaadinServlet is deployed because it needs to get the servlet path to use.
If the container lazily loads servlets, Vite will not start until the first
HTTP request for the Vaadin servlet is received.
This change sets load-on-startup feature for automatically deployed Vaadin
servlet, to ensure that the servlet and Vite are loaded on the startup of the
Web application

Part of #14479

Co-authored-by: Marco Collovati <[email protected]>
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.3.0.alpha1 and is also targeting the upcoming stable 23.3.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.

4 participants