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: Initialize VaadinServlet after Lookup is available #9500

Merged
merged 6 commits into from
Nov 26, 2020

Conversation

denis-anisimov
Copy link
Contributor

@denis-anisimov denis-anisimov commented Nov 26, 2020

  • In WAR case init will be called as usual without any changes
  • IN OSGi ServletContextListener::contextInitialized may be called after Servet::init is called and in this case info necessary for the servlet won't be available yet.
  • ServletContextListener::contextInitialized will call Servet::init one more time to complete initialization.

Copy link
Contributor

@caalador caalador left a comment

Choose a reason for hiding this comment

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

I guess the topic is Initialize VaadinServlet after Lookup is available, but who will recall the init method of VaadinServlet again?
Also some information what the problem is in what situation would be helpful.

@denis-anisimov denis-anisimov changed the title fix: don't initialize Vaadin servlet until Lookup is not available fix: Initialize VaadinServlet after Lookup is available Nov 26, 2020
@denis-anisimov
Copy link
Contributor Author

I guess the topic is Initialize VaadinServlet after Lookup is available, but who will recall the init method of VaadinServlet again?
Also some information what the problem is in what situation would be helpful.

Done: in the title and description

Copy link
Contributor

@pleku pleku left a comment

Choose a reason for hiding this comment

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

This fix lacks an issue it is addressing and the details on what is happening.

@denis-anisimov
Copy link
Contributor Author

This fix lacks an issue it is addressing and the details on what is happening.

Quite hard to address OSGi issue in non OSGi repo.

@pleku
Copy link
Contributor

pleku commented Nov 26, 2020

Quite hard to address OSGi issue in non OSGi repo.

You can refer to and close an issue in another repository with syntax e.g. Fixes vaadin/osgi#123.

Would it be possible to have a OsgiVaadinServlet (in flow-osgi) and use that so that the changes would go there ?

@denis-anisimov
Copy link
Contributor Author

denis-anisimov commented Nov 26, 2020

Quite hard to address OSGi issue in non OSGi repo.

You can refer to and close an issue in another repository with syntax e.g. Fixes vaadin/osgi#123.

Would it be possible to have a OsgiVaadinServlet (in flow-osgi) and use that so that the changes would go there ?

The issue can't be fixed by one fix in Flow.
Extracting OSGi into osgi repo complicated things a lot.
To be able to fix one issue I have to make two PRs in different repos.

OsgiVaadinServlet will solve the issue. And that means that developer has to be aware of the this class and may not use VaadinServlet for OSGi . That will produce user errors.
And in fact I still need to introduce some changes into VaadinServlet anyway.
I'm trying to reduce OSGi specific classes usage as much as possible.

VaadinServlet will work exactly in the same way in WAR case without any single behavioral change.
This change affects only OSGi. I don't see serious reasons for now to introduce a new servlet class for OSGi at the moment.

I can introduce one more method doInit (or whatever) in the VaadinServlet which will do this intialization.

But if API is designed so that there is a public method then this method may be called any times by anyone.
I just don't want to introduce one more extra method with almost the same semantic.

@denis-anisimov
Copy link
Contributor Author

is the initial context more valuable than the secondary?
Shouldn't they be the same so setting it shouldn't be a problem as super.init(context) only stores the reference.

by the context you mean config ?
This question is about weakness of init method API.
init is always called first time by the servlet container.
init method should be protected to avoid changing the config : because there is no way to get info that the config is changed. All these things had to be solved via Java API. But they are not.
This is done by the code (in runtime) : config should be set only once. And this is exactly done.
Again: anyone may call this method with anything passed there. And this is the problem of API.

This PR prevents changing the config after the very first call. And it's meaningful even if there is no any need to call this method in OSGi.

In OSGi code I call init from the method which is called also by the Servlet container second time with exactly the same config parameter passed.

What can I do here in addition : check that if init is called second time then config instance is exactly the same as the one which is already stored.
It makes sense.

@pleku
Copy link
Contributor

pleku commented Nov 26, 2020

OsgiVaadinServlet will solve the issue. And that means that developer has to be aware of the this class and may not use VaadinServlet for OSGi . That will produce user errors.

This is the same as for Portlet, and Spring ... and has been pretty much always. And in the same way it is already the issue with VaadinServlet for anything.
So I don't know if it is really an issue - and if we we're to register the servlet automatically for vaadin-osgi then they would not need to know about it until they decide to register one themselves ?

@denis-anisimov
Copy link
Contributor Author

denis-anisimov commented Nov 26, 2020

OsgiVaadinServlet will solve the issue. And that means that developer has to be aware of the this class and may not use VaadinServlet for OSGi . That will produce user errors.

This is the same as for Portlet, and Spring ... and has been pretty much always. And in the same way it is already the issue with VaadinServlet for anything.
So I don't know if it is really an issue - and if we we're to register the servlet automatically for vaadin-osgi then they would not need to know about it until they decide to register one themselves ?

It is an issue. A proven one.

Portlet : nobody uses Portlets . The number of user is vanishingly small. So this issue just had no chance to appear.

Spring: exactly the case.
Spring has it's own servlet because of just one reason: it's not supposed to be used at all.
You don't register and never uses the servlet in Spring normally. It's registered for you automatically and you may pass to it all the configuration which you want.
And there are quite many cases when users wanted to use a custom servlet for Spring every now and then.
And it's quite common mistake that they register a VaadinServlet in this case instead of SpringServlet.

OSGi: we don't have at the moment automatic servlet registration. But regardless of automatic servlet registrations I'm pretty sure there will be a lot of users who will want to register the servlet manually .
It's easier for users to have only one class instead of number of public classes for every framework.

I would just have made OSGiVaadinServlet without any doubt if it had been just an impl detail with no visibility.
But it's not the case.

@caalador
Copy link
Contributor

Note that the Mock service is in 3 places flow-server, polymer and lit

* ServletCointextListener} may be called after the servlet
* initialized. To be able to initialize the VaadinServlet properly
* its "init" method is called from the {@code
* ServletCointextListener} with the same ServletConfig instance.
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocking: typoed servletcontextlistener. Also I don't think it is necessary to lecture about how "anyone call this method at any time" and "weak API". I would have just settled for the reason:
"This init method is called twice in some scenarios, like with OSGi {@code ServletContextListener} because not all things are available when the container triggers the first init. Duplicate initialization needs to be avoided and creation of service needs lookup to be present."

@denis-anisimov denis-anisimov merged commit 47e9a17 into master Nov 26, 2020
@denis-anisimov denis-anisimov deleted the fix-early-init branch November 26, 2020 12:37
pleku pushed a commit that referenced this pull request Dec 7, 2020
fix: don't initialize Vaadin servlet until Lookup is not available
TatuLund added a commit that referenced this pull request Dec 16, 2020
* test: Fix duplicate registration (#9233)

Lock the registry when registering
dynamic route in serviceInit to not have
a race where 2 inits note that path is not
registered and then try to register the route.

Fixes #9223

* refactor: Remove log usage in embedded components (#9254)

8d012f7 removed some log and converted others into debug
but log in disconnectedCallback was left.

* refactor: expose the items count API to components (#9257)

Exposes DataCommunicator::getDataProviderSize to the components, in order to get the items count taking into account the countCallback, if it has been set previously.

Related-to: vaadin/flow-components#282

* chore: unit test for devmode-not-ready page contents and type (#9266)

* chore: do not depend on commons.lang3 (#9271)

* chore: fix typo (#9272)

Fix typo in DataCommunicator::getDataProviderSize() javadoc.

* fix: Sync HierarchicalDataCommunicator's expand state with client side (#9275)

HierarchicalDataCommunicator's expanded state were not being synchronised with client side and TreeGrid's expanded nodes were being collapsed after re-attaching.

Warranty: Sync TreeGrid expanded items state with the client side when detaching and reattaching

Fixes: #9175

* chore: Bump version to 6.0-SNAPSHOT (#9279)

* refactor: make web browser immutable (#9298)

* feat: Create Flow plugins for webpack (#9295)

* feat: Create Flow plugins for webpack

Moved stats file handling to a custom plugin.
Added feature for copying custom Flow plugins
for use with webpack.

Fixes #9283

* fix: AppShellConfigurator is now considered for theme endpoint (#9332)

AppShellConfigurator is now also considered when
scanning for annotations and deciding theme.

Fixes #9110

* fix: fix TreeGrid updating wrong expanded items state on setDataProvider (#9336)

Fixes: #9328
Details: HierarchicalDataProvider's reset method was called before recreating the HierrarchyMapper in setDataProvider. This was creating wrong updates for the client side.

* feat!: Theme annotation should be only on AppShellConfigurator (#9313)

Having the `@Theme` annotation on Flow views or router layouts will not be allowed anymore, it should be on `AppShellConfigurator` instead.

Fixes #9092

* test(TypeScript): ensure CSRF token is updated when session is invalidated (#9329)

* test(TypeScript): ensure CSRF token is updated when session is invalidated

Fixes #9164

* add log message

* fix: increase threshold for performance test (#9381)

* fix: hide loading indicator when endpoint call fails (#9380)

* feat: tree-shakeable ES imports for TS form validators (#9374)

- Use tree-shakeable ES imports for TS form validators based on the latest version of validators lib.
- Add missing `return` in the `submit()` method

* feat: Theme can be defined as string or class (#9349)

Add a string definition for theme that matches the "application theme" in the theme folder inside /frontend/theme/, loading the css automatically from there. This is based on Lumo theme, always.
Change old class based theme to use themeClass for theme selection.

Fixes #9281

* fix!: Use data view filter and sorting only to that component (#9315)

In-memory filtering and sorting are now stored directly in component, which gives an opportunity to change it through the data view API for a certain component separately from other components bound to the same data provider.

Fixes #8655

* fix: support Range requests with either start or end byte index omitted (#9368)

Supports headers of the type Range: -123 and Range: 123-.

Fixes #9083.

* refactor: revert 'Use data view filter and sorting only to that component' (#9390)

Revert the changes for #8655 to be able to bump the version of components and avoid compile errors.

* chore: remove test module test-subcontext (#9394)

This module is subsumed by test-router-custom-context.

* chore: update readme with discord link (#9382)

* test: remove Theme annotation from demo helpers module (#9395)

* feat: Do not allow themeClass and themeName in same annotation (#9389)

Theme Class and Theme Name is not supported in
the same Theme annotation as theme name builds
on the Lumo theme.

test-themes is now for testing the Application theme only.
Old theme test was moved into test-misc.

Fixes #9370

* fix!: Use data view filter and sorting only to that component (#9315)

In-memory filtering and sorting are now stored directly in component, which gives an opportunity to change it through the data view API for a certain component separately from other components bound to the same data provider.

Fixes: #8655

* feat: Only use one theme and fail for duplicates (#9406)

Now we only handle the theme with the name inside the Theme annotation.

Fixes #9383

* Read stats.json content as a bundle resource in OSGi
Read token file as a bundle resource in OSGi

Fixes #9146
Fix NPE
Revert logic back to the previous state
# Conflicts:
#	flow-server/src/main/java/com/vaadin/flow/server/DeploymentConfigurationFactory.java
#	flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendUtils.java
#	flow-server/src/main/java/com/vaadin/flow/server/osgi/OSGiAccess.java

* Refactor Instantiator and resources access

Fixes #9185
Exclude non-serializable classes
Drop dependency to flow-push from flow-server
# Conflicts:
#	flow-server/src/main/java/com/vaadin/flow/server/BootstrapHandler.java
#	flow-server/src/main/java/com/vaadin/flow/server/DeploymentConfigurationFactory.java
#	flow-server/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer
#	flow-server/src/test/java/com/vaadin/flow/server/connect/generator/endpoints/model/OSGiInstantiatorFactory.java
#	flow-server/src/test/java/com/vaadin/flow/server/connect/generator/endpoints/model/OSGiResourceProvider.java
#	flow-server/src/test/java/com/vaadin/flow/server/connect/typeconversion/StringConversionTest.java

* Remove flow-osgi dep from flow-push, increase osgi cmpn version
# Conflicts:
#	flow-push/pom.xml
#	flow-server/src/main/java/com/vaadin/flow/server/osgi/VaadinBundleTracker.java

* Correct unit tests after refactoring: make them compiling
Mock VaadinServlet in MockVaadinServletService
Adapt unit tests for refactored code
Adapt more unti tests and add one more new SPI method
Fix serializable test, proceed with unit tests adaption
Adapt unit tests for classes in com.vaadin.flow.server
Adapt unit tests in the com.vaadin.flow.server.communication package
* Adapt more unit tests

* Make sure that ServletContextInitializers are executed after
LookupInitializer
Fix OSGi presence check to be able to run unit test
Adapt servlet deployer unit tests
Exclude OSGi related classes from test
Exclude all OSGi impl classes from serializable test
# Conflicts:
#	flow-polymer-template/src/test/java/com/vaadin/flow/component/polymertemplate/NpmTemplateParserTest.java
#	flow-server/src/main/java/com/vaadin/flow/server/DeploymentConfigurationFactory.java
#	flow-server/src/main/java/com/vaadin/flow/server/startup/ApplicationRouteRegistry.java
#	flow-server/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer
#	flow-server/src/test/java/com/vaadin/flow/component/InvalidUrlTest.java
#	flow-server/src/test/java/com/vaadin/flow/component/UITest.java
#	flow-server/src/test/java/com/vaadin/flow/server/BootstrapHandlerDependenciesTest.java
#	flow-server/src/test/java/com/vaadin/flow/server/BootstrapHandlerTest.java
#	flow-server/src/test/java/com/vaadin/flow/server/DeploymentConfigurationFactoryTest.java
#	flow-server/src/test/java/com/vaadin/flow/server/I18NProviderTest.java
#	flow-server/src/test/java/com/vaadin/flow/server/MockServletServiceSessionSetup.java
#	flow-server/src/test/java/com/vaadin/flow/server/MockVaadinServletService.java
#	flow-server/src/test/java/com/vaadin/flow/server/VaadinServiceTest.java
#	flow-server/src/test/java/com/vaadin/flow/server/VaadinServletConfigurationTest.java
#	flow-server/src/test/java/com/vaadin/flow/server/VaadinServletServiceTest.java
#	flow-server/src/test/java/com/vaadin/flow/server/VaadinSessionTest.java
#	flow-server/src/test/java/com/vaadin/flow/server/communication/PushHandlerTest.java
#	flow-server/src/test/java/com/vaadin/flow/server/communication/WebComponentBootstrapHandlerTest.java
#	flow-server/src/test/java/com/vaadin/flow/server/frontend/FrontendUtilsTest.java
#	flow-server/src/test/java/com/vaadin/flow/server/startup/DevModeInitializerTestBase.java
#	flow-server/src/test/java/com/vaadin/flow/server/startup/EnableOSGiRunner.java
#	flow-server/src/test/java/com/vaadin/flow/server/startup/ServletDeployerTest.java

* Fix OSGi Lookup related issues
Fix OSGi related unit test one more time

# Conflicts:
#	flow-osgi/src/main/java/com/vaadin/flow/osgi/support/OSGiResourceProvider.java
#	flow-server/src/main/java/com/vaadin/flow/server/VaadinServlet.java
#	flow-server/src/main/java/com/vaadin/flow/server/osgi/OSGiAccess.java
#	flow-server/src/main/java/com/vaadin/flow/server/osgi/VaadinBundleTracker.java
#	flow-server/src/main/java/com/vaadin/flow/server/startup/LookupInitializer.java
#	flow-server/src/test/java/com/vaadin/flow/server/startup/EnableOSGiRunner.java
#	flow-server/src/test/java/com/vaadin/flow/server/startup/OSGiInitApplicationRouteRegistryTest.java
#	flow-server/src/test/java/com/vaadin/flow/server/webcomponent/OSGiWebComponentConfigurationRegistryTest.java
#	flow-tests/test-root-context/src/main/java/com/vaadin/flow/osgi/Activator.java

* Correct the resource access for VaadinService

* Extend SPI, provide javadocs some unit tests fixes
Minor code corrections, javadocs
Correct unit test
# Conflicts:
#	flow-polymer-template/src/test/java/com/vaadin/flow/component/polymertemplate/NpmTemplateParserTest.java
#	flow-server/src/test/java/com/vaadin/flow/server/communication/WebComponentBootstrapHandlerTest.java

* test: add unit tests

# Conflicts:
#	flow-tests/test-root-context/src/main/java/com/vaadin/flow/osgi/Activator.java

* test: make it possible to run felix-jetty in npm mode
# Conflicts:
#	flow-tests/servlet-containers/felix-jetty/pom.xml
#	flow-tests/test-root-context/pom-npm.xml

* Make httpclient dependency optional for now. (#9262)

* refactoring: move OSGi resource provider impl to flow-server (#9268)

OSGi ResourceProvider impl should be available as a service at the moment when Vaadin WAB register a servlet.
It's not possible without extra unclear config to make sure that the service is registered if it's in the flow-osgi : the bundle may be activated at any moment regardless of servlet registration.
The issue doesn't appear if the service is registered at the flow-bundle start phase.

* refactor: review fixes for OSGi (#9289)

* refactoring: review fixes

* chore: add a comment about Jar packaging in test-root-context module

* fix: ensureServletContext should be always called

* fix: fix review comments
# Conflicts:
#	flow-tests/test-root-context/pom-npm.xml

* refactor: get rid of cmpn osgi dependency (#9307)

Not needed for flow-server.

* refactoring: App classpath resources should be access via
ResourceProvider (#9278)

Fixes #9269
# Conflicts:
#	flow-polymer-template/src/main/java/com/vaadin/flow/component/polymertemplate/NpmTemplateParser.java
#	flow-server/src/main/java/com/vaadin/flow/server/BootstrapUtils.java

* test: update unit tests

* refactor: fix various OSGi related issues

* add back lost classes during cherry-picks
* fix unit tests
* rewrite polymer template RPC

* fix: fix javadocs after merge conflicts

* fix: fix mocks in unit tests

* test: Correct activator

* refactor: correct lookup initializer filtering code

* fix: fix javadocs (SQ)

* refactor: Remove OSGi related ITs and osgi module from the repo

* fix: fix some review comments

* fix: test unstable test

* refactor: get rid of OSGiClientStaticResource (#9277)

* fix: use content parameter in the activate method

* fix: Make OSGi incompatible vaadin-connect dependencies optional

* fix: make Spring deps optional

* fix: make a workaround for broken Route registry API

* fix: avoid not-breaking exception ojn loading class from another bundle

* fix: workaround for possible bug in route registry (like #9360).

* [OSGi] - Cleanup BudleActivator and Service registration, Update bnd and osgi deps (#9361)

refactor: OSGi improvements 

* update bnd-version

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>

* update osgi dependency and version

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>

* fix mocking osgi-classes

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>

* OSGiResourceProvider uses @component to declare the service

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>

* VaadinBundleTracker uses @component to declare the service

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>

* Remove `empty` BundleActivator

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>

* use constants for osgi.http.whiteboard.servlet.pattern

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>

* fix unregister Service PolymerPublishedEventRpcHandler

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>

* registers PolymerPublishedEventRpcHandler as a declarative service

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>

* fix: add explanation why OSGi Component annotation is safe to use

* fix: code review fixes

* fix: return back accidentially removed method and call init for service

* fix: remove non-existent class pattern from test

* fix: fix import order

* fix: extract code to a separate method

* fix: correct unit test

* fix: fix unit test

* refactor: simplify list merging

* fix: return back lost code after review

* fix: imports order

* fix: revert bnd version

* fix: imports order, review comments

* fix: restore lost test method

* fix: import orders

* fix: revert not working deployment of test-root-context ui classifier

* fix: check if Url contains directory change in Dev Mode (#9392)

Checks whether the Url contains a directory change and a double encoding in Dev Mode. Returns 403 Forbidden immediately and skip the request handling, if does.

* fix: preserve filter to not lose it between page requests (#9421)

Data communicator's filter removal, which has been introduced for components with internal filtering (like a ComboBox), may lead to filter loss during the items scrolling. This fix reverts the filter removal and the components should implement this feature on their side, if necessary.

Related-to: vaadin/flow-components#388

* chore: Update issue template with discord link (#9426)

* chore: update chrome expectation to 87 (#9445)

* fix: revert changes which broke route registration (#9432)

Need to active the tracker from an servlet context initializer because @activate doesn't work on CTOR with parameter

* chore: fix outdated AppShell javadoc (#9453)

* test: add test for setting global font (#9436)

Fixes #9409

* fix race-condition in IT-Tests (#9416)

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>

* fix: mark tests that should not be executed in OSGi (#9456)

* fix: mark tests that should not be executed in OSGi

* fix: don't use push in route not found error page in OSGi

* fix: avoid route with wildcard parameter which doesn't work in OSGi

* fix: exclude wildcard parameter IT and devmode IT

* fix: exclude "context" resource IT from OSGi tests

* fix: make annotation packages optional in OSGi (#9465)

Also fix test to first open page before checking client.

fixes #9463

* fix: made VaadinRequest available in endpoint (#9442)

* fix: made vaadinrequest available in endpoint

* clear VaadinRequest instance after endpoint call

* chore: remove mentions of “Connect” (#9151)

* Rename “Connect” to “Fusion”

* Remove “Fusion” naming

* feat: Serve theme static files from VAADIN/static (#9451)

Static files in META-INF/VAADIN/static will now be served
on request to VAADIN/static.
Added new webpack loader that changes app theme
css urls targeting ./ and ../ to be VAADIN/static/ instead.
Where ../ can not go outside of the application theme folder.

Fixes #9405

* refactor: Remove OSGi code from flow-server (#9472)

* refactor: Remove OSGi code from flow-server

Fixes #9219

* chore: update Flow versions description (#9469)

* feat: Theme component with app theme. (#9418)

Added the feature that you can theme components
with the app theme by creating a css file in
'frontend/theme/myTheme/components' with the
component tag name e.g. 'my-field'  should have 'my-field.css'

Fixes #9348

* fix: check whether class implements an interface first directly (#9486)

Part of #9480

* fix: remove instance field from singleton IndexHtmlRequestHandler (#9475)

* fix: remove instance field from singleton IndexHtmlRequestHandler

* apply code review suggestions

* Stop logging error when updating dev dependencies (#9476)

As there is a conflict with the dependencies and prevent adding
the flow-dev-dependencies package to the platform (#9345), this will hide
the unavoidable error that was logged for Vaadin apps.
 
Fixes #9251

* fix: optimize handling of requests containing Range header (#9484)

More efficient parsing of the header value. Also, range count is capped at 16
(additional will be ignored) and overlapping ranges at 2 (request will be denied
if above).

* fix: Correct regexp to only match when digit first (#9496)

Use Matcher::find instead of Matcher::matches as matches never matched.

Fixes #9494

* test: add test that external urls are not touched (#9482)

Added test that we don't touch external
urls (relative or abosolute).
Moved flow to be under path so we can have
jetty serve "external" resources.

Fixes #9430

* fix: Add polyfill for constructable stylesheets (#9489)

Add the constructable stylesheets polyfill so
app theme also works with non chrome based browsers.

Fixes #9488

* fix: Initialize VaadinServlet after Lookup is available (#9500)

fix: don't initialize Vaadin servlet until Lookup is not available

* feat: Enable adding assets from node_modules (#9495)

* feat: Enable adding assets from node_modules

It is now possible to import resources from
installed node_modules by adding the asset to
theme/my-theme/theme.json

Fixes #9468

* Add comment to doc on copyStaticAssets

* Fix url expectation after merge

* format lines

* test: add unit test for clear all in the servlet init method (#9507)

* Fix: fix file system traversal of theme-loader to stop at root (#9505)

The theme-loader recursion for themeFolder should stop
at the root level. Also if no theme folder found we should
not spend time on replacement.

* fix: enable PlainScriptViaJavaScriptIT in OSGi (#9520)

fixes #9461

* fix: enable PushRouteWildcardParameterIT in OSGi (#9518)

fixes #9459

* fix: enable BaseHref IT back (#9515)

Fixes #9458

* chore: Add information on logging in webpack (#9527)

Added information on log levels
with webpack loaders and plugins.

* test: fix test class and register view servlet with a context in OSGi (#9528)

Part of vaadin/osgi#5

* fix: removed `hasClientIssue("8236")` guard as ITs now pass (#9536)

* Fix: Update Lit bundle parser regex. (#9546)

Now the pattern will not fail with a StackOverflowException
as we will search from the start character accepting
any characters until we reach the caught start character with ;

* fix: Enable lit css importing (#9550)

Fixes #9532

* fix: use provided executor for frontend tools (#9553)

fixes vaadin/spring#691

* feat: Resource handling to not need plugin copying (#9558)

Fixed the url handling so that theme resources
get prepended with theme/[themeName] while
having the correct absolute path. With this we can handle
these url resources with the css-loader which in turn
leads to file-loader gettign the files for copying.

External url are still not touched in any way.

part of #9410 and #9533

* fix: file-loader name for windows execution (#9575)

Windows file path separator \ should not
be used as it will result in %0B when it should
be /

* test: Fixed flaky tests caused by variable ui in ValidatorTestBase.java (#9524)

Added a ui variable in the ValidatorTestBase class to attach strong reference, in order to avoid garbage collecting it during the test run.

* refactor: get Executor service from Lookup instead init params (#9572)

fixes #9570

* fix: Add missing refreshAll method to data view

Adds the missed refresh all method to data view API.

Fixes: #9574

* chore: Update contributing guide with setup info (#9576)

The contribution guide was missing the project setup information.

There were outdated instructions in the readme, which was on the other hand not up to date and only had instructions for Eclipse. Now everything is in contribution guide and readme is short and simple, pointing to contribution guide for those who want to work with the project.

* fix!: Make VaadinService.dependencyFilters unmodifiable

While the change is backwards compatible from API perspective, it could be considered a behavior change although there is quite low risk of exposure in apps. Thus targeting 2.5 for the LTS and the recently released 5.0.

* fix: encode attribute value during transfer from embedded web app (#9583)

encode attribute value during transfer from embedded web app

* chore: move fusion endpoint code to fusion-endpoint module (#9499)

Fixes: #9354
move fusion code to a separate fusion-endpoint module, so that the fusion dependencies which are not OSGi compatible can be removed from the flow-server module.

- move the code in the connect package  to fusion-server
- removed the non OSGi compatible packages from the bnd file in flow-server
- change  `TaskGenerateOpenApi` and `TaskGenerateConnect` to interfaces in flow-server, have the implementations in fusion-endpoint since they are using code inside the connect package
- Move endpoint related tests:
   - from NodeTasksTest to  NodeTasksEndpointTest, 
   - from DevModeInitializerTest to DevModeInitializerEndpointTest 
- Add a `LookupImpl` class in the `flow-maven-plugin` module for finding endpoint services.
- Introduce a `isInstantiableService`method in `ReflectTools`

* feat: Embedded component appTheme support (#9588)

Add support for application theme with
embedded components.

Fixes #8564

* feat: Enable importing CSS from node_modules (#9543)

Enable using CSS files from installed node_modules by adding 'importCss' to theme/my-theme/theme.json.

Fixes #9410

* refactor: simplify ResourceProvider (#9609)

fixes #9605

* chore: add internal classes to access classloader and init context (#9618)

* chore: add internal classes to access classloader and init context

related to #9601 : needed to restore OSGi resource provider

* fix: loading indicator visible and isActive true while endpoint fetch (#9593)

* fix: loading indicator visible and isActive true while endpoint fetch

* Clarified code and added test

* fix: theme files can now be referenced as theme/theme-name (#9590)

Theme files are now copied under theme/[theme-name]
and can be referenced by theme/them-name/path/file.ff
even though they are located at VAADIN/static

Fixes: #9405 and #9535

* Fix: Generated theme.js is now named theme.generated.js (#9616)

my-theme.js is now generated as my-theme.generated.js

Fixes #9595

* Feat: Check that npm resources are available (#9617)

Check that we have named npm resources
available or throw an exception informing
the user to install it using a NpmPackage
annotation or manually with (p)npm i

Fixes #9615

* refactor: rename the app-theme root folder from theme to themes (#9626)

Fixes #9611

* refactor: refine renaming and incorrect paths in ThemeIT (#9634)

* rename app-theme root folder to themes

* chore: fix flaky tests that depends on mock count (#9631)

* chore: create deepClean profile (#9311)

Using the deepClean profile one can
clean up all the generated files and
node_modules folders from all test modules.

* test: add document.css level styles tests (#9646)

Adds a tests for checking that the document.css file is injected to the document scope and not injected to embedded element shadow root.

Fixes #9552

* refactor: extract common config functionality and introduce add config (#9635)

refactor: extract common config functionality and introduce add config

part of #9417

Co-authored-by: caalador <mikael.grankvist@gmail.com>
Co-authored-by: Guille <alvarezguille@users.noreply.github.com>
Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Johannes Eriksson <joheriks@vaadin.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
Co-authored-by: Denis <denis@vaadin.com>
Co-authored-by: Artem Godin <fluorumlabs@users.noreply.github.com>
Co-authored-by: Anton Platonov <anton@vaadin.com>
Co-authored-by: Haijian Wang <30408303+haijian-vaadin@users.noreply.github.com>
Co-authored-by: Pekka Hyvönen <pekka@vaadin.com>
Co-authored-by: Manuel Carrasco Moñino <manolo@vaadin.com>
Co-authored-by: Stefan Bischof <33224746+stbischof@users.noreply.github.com>
Co-authored-by: Jouni Koivuviita <jouni@vaadin.com>
Co-authored-by: Jialin Shao <jialin_shao@outlook.com>
Co-authored-by: Tan Bui <tan@vaadin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants