You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "ideas-into-software (via GitHub)" <gi...@apache.org> on 2023/07/30 22:11:25 UTC
[GitHub] [felix-dev] ideas-into-software opened a new pull request, #218: Upgrade Apache Felix to Jakarta Servlet API 6.x (milestone 2)
ideas-into-software opened a new pull request, #218:
URL: https://github.com/apache/felix-dev/pull/218
As initiated and discussed via https://issues.apache.org/jira/browse/FELIX-6612, final milestone of migrating 30 Apache Felix modules to Jakarta Servlet API 6.0 (https://jakarta.ee/specifications/servlet/5.0/) and Whiteboard Specification for Jakarta™ Servlet (https://docs.osgi.org/specification/osgi.cmpn/8.1.0/service.servlet.html) is now complete. A separate branch and pull request for Jakarta Servlet API 5.0 was made 3 days ago: https://github.com/apache/felix-dev/pull/217
Following modules were affected, including Apache Felix HTTP, Apache Felix Webconsole, Apache Felix Healthcheck, as well as Apache Felix Webconsole plugins and Apache Felix Parent:
- `felix-parent`
- `org.apache.felix.healthcheck.core`
- `org.apache.felix.healthcheck.webconsoleplugin`
- `org.apache.felix.http`
- `org.apache.felix.http.base`
- `org.apache.felix.http.bridge`
- `org.apache.felix.http.inventoryprinter`
- `org.apache.felix.http.itest`
- `org.apache.felix.http.jetty`
- `org.apache.felix.http.parent`
- `org.apache.felix.http.proxy`
- `org.apache.felix.http.samples.whiteboard`
- `org.apache.felix.http.servlet-api`
- `org.apache.felix.http.sslfilter`
- `org.apache.felix.http.webconsoleplugin`
- `org.apache.felix.inventory`
- `org.apache.felix.webconsole`
- `org.apache.felix.webconsole.plugins.deppack`
- `org.apache.felix.webconsole.plugins.ds`
- `org.apache.felix.webconsole.plugins.event`
- `org.apache.felix.webconsole.plugins.gogo`
- `org.apache.felix.webconsole.plugins.memoryusage`
- `org.apache.felix.webconsole.plugins.metatype`
- `org.apache.felix.webconsole.plugins.obr`
- `org.apache.felix.webconsole.plugins.packageadmin`
- `org.apache.felix.webconsole.plugins.scriptconsole`
- `org.apache.felix.webconsole.plugins.shell`
- `org.apache.felix.webconsole.plugins.subsystems`
- `org.apache.felix.webconsole.plugins.upnp`
- `org.apache.felix.webconsole.plugins.useradmin`
All unit tests and integration tests pass, with one exception: `org.apache.felix.webconsole.plugins.scriptconsole` – here, all unit tests work, but Pax Exam Integration tests fail with error "Problem starting test container" due to old dependencies / transitive dependencies having "http://repo1.maven.org/maven2/" Maven repository defined (instead of HTTPS). I do know how to fix that problem, however, since I did not work with Pax Exam prior to this project, I will leave this to someone more experienced with Pax Exam.
Since I cannot create new branches on https://github.com/apache/felix-dev, please create a dedicated branch (e.g. `jakarta-servlet-6-x`) – due to reasons mentioned in https://issues.apache.org/jira/browse/FELIX-6612 discussion, the `jakarta-servlet-6-x` should be kept separate from `master`.. unless that decision changed in the meantime.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [felix-dev] rakeshk15 commented on pull request #218: Upgrade Apache Felix to Jakarta Servlet API 6.x (milestone 2)
Posted by "rakeshk15 (via GitHub)" <gi...@apache.org>.
rakeshk15 commented on PR #218:
URL: https://github.com/apache/felix-dev/pull/218#issuecomment-1676374045
@cziegeler I have not seen the latest code here but will this jakarta-servlet-6 branch have the javax/jakarta wrappers approach which you did earlier or is this all new for Servlet 6 only.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [felix-dev] cziegeler commented on pull request #218: Upgrade Apache Felix to Jakarta Servlet API 6.x (milestone 2)
Posted by "cziegeler (via GitHub)" <gi...@apache.org>.
cziegeler commented on PR #218:
URL: https://github.com/apache/felix-dev/pull/218#issuecomment-1676293641
Thanks for updating the PR; there will be a constant battle of keeping the branches in sync; but for the time being I think we don't have any other option. So changes to the main branch need to be ported to the jakarta 6 branch as well.
For any improvements or changes on the existing modules, if these don't break current usage, its best to apply those to the main branch first; avoiding that the code drifts too far apart
But I think all of that should be handled in separate issues to make tracking easier.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [felix-dev] cziegeler commented on pull request #218: Upgrade Apache Felix to Jakarta Servlet API 6.x (milestone 2)
Posted by "cziegeler (via GitHub)" <gi...@apache.org>.
cziegeler commented on PR #218:
URL: https://github.com/apache/felix-dev/pull/218#issuecomment-1672724842
@ideas-into-software Thanks for the updated PR and description; In general it looks good to me; however there is a conflict that needs to be resolved before applying
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [felix-dev] cziegeler merged pull request #218: Upgrade Apache Felix to Jakarta Servlet API 6.x (milestone 2)
Posted by "cziegeler (via GitHub)" <gi...@apache.org>.
cziegeler merged PR #218:
URL: https://github.com/apache/felix-dev/pull/218
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [felix-dev] rakeshk15 commented on pull request #218: Upgrade Apache Felix to Jakarta Servlet API 6.x (milestone 2)
Posted by "rakeshk15 (via GitHub)" <gi...@apache.org>.
rakeshk15 commented on PR #218:
URL: https://github.com/apache/felix-dev/pull/218#issuecomment-1676420064
Understood, thanks for clarification.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [felix-dev] cziegeler commented on pull request #218: Upgrade Apache Felix to Jakarta Servlet API 6.x (milestone 2)
Posted by "cziegeler (via GitHub)" <gi...@apache.org>.
cziegeler commented on PR #218:
URL: https://github.com/apache/felix-dev/pull/218#issuecomment-1676393339
@rakeshk15 No wrappers, as Servlet 6 is not fully compatible to Servlet 5 (and earlier). We'll continue to have the wrappers with the Servlet 5 implementation on the main branch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [felix-dev] cziegeler commented on pull request #218: Upgrade Apache Felix to Jakarta Servlet API 6.x (milestone 2)
Posted by "cziegeler (via GitHub)" <gi...@apache.org>.
cziegeler commented on PR #218:
URL: https://github.com/apache/felix-dev/pull/218#issuecomment-1664038544
I created a new branch for jakarta-servlet-6; please recreate this PR against that branch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [felix-dev] ideas-into-software commented on pull request #218: Upgrade Apache Felix to Jakarta Servlet API 6.x (milestone 2)
Posted by "ideas-into-software (via GitHub)" <gi...@apache.org>.
ideas-into-software commented on PR #218:
URL: https://github.com/apache/felix-dev/pull/218#issuecomment-1672266266
@cziegeler
As per your request, I switched this PR to https://github.com/apache/felix-dev/tree/jakarta-servlet-6 branch you created.
I also took care of verifying upgraded artifacts (Apache Felix HTTP, Apache Felix Inventory as well as Apache Felix Web Console and plugins) as part of an actual project.
The tests apparently do not have sufficient coverage, because even though all tests passed (see my earlier comment, https://github.com/apache/felix-dev/pull/218#issue-1828103395, for more info about tests and the `org.apache.felix.webconsole.plugins.scriptconsole` exception), there were multiple issues which came up when integrating these artifacts into actual project.
All those issues were fixed and that’s what those latest commits in this PR address, i.e. fixes for issues with Felix Web Console, Web Console plugins & related, including propagation of custom configuration, missing Whiteboard service parameters resulting in plugins not being registered properly, path resolution issues, etc.
As mentioned, those cases are not covered by any of the existing tests and were discovered during exploratory testing as part of an actual project. That project is https://github.com/geckoprojects-org/org.gecko.graphql and in this PR (and its commits) you will find more details: https://github.com/geckoprojects-org/org.gecko.graphql/pull/8
Just in case this is not clear (and I do not mean you, @cziegeler): since there are multiple artifacts from 3 different projects (Apache Felix being one of those 3), such must be first build and installed into local Maven repository before being used in a project, until they’re officially released, i.e. :
- `org.apache.commons:commons-fileupload2-core:2.0.0-M3-SNAPSHOT` and `org.apache.commons:commons-fileupload2-jakarta-servlet6:2.0.0-M3-SNAPSHOT` artifacts – until they’re released, you can build and install those into your local Maven repository from https://github.com/ideas-into-software/commons-fileupload/tree/osgi-enhancements branch
- `org.osgi:org.osgi.service.servlet:3.0.0-SNAPSHOT` – until it’s released, build and install it from https://github.com/ideas-into-software/osgi/tree/requirements/597 branch
- upgraded Apache Felix artifacts – until it’s released, build and install it from https://github.com/DataInMotion/felix-dev/tree/jakarta-servlet-6-x branch (soon https://github.com/apache/felix-dev/tree/jakarta-servlet-6 branch)
I am not sure when you or Felix team will conduct review of code in this PR, but I would like to ask for clarification regarding creation of pattern matcher dependent on service ID of handler used (previously `HttpServiceFactory.HTTP_SERVICE_CONTEXT_SERVICE_ID`) – prior to this upgrade/refactor, such was checked in `org.apache.felix.http.base.internal.registry.PathResolverFactory.createPatternMatcher(ServletHandler, String)` and instance of `org.apache.felix.http.base.internal.registry.PathResolverFactory.ExactAndPathMatcher.ExactAndPathMatcher(ServletHandler, String)` created; should such exceptional case still exist, e.g. `org.apache.felix.http.base.internal.registry.PathResolverFactory.ExactAndPathMatcher.ExactAndPathMatcher(ServletHandler, String)` pattern matcher created if given handler is for default context ?
Also, some improvement suggestions:
- add tests to cover cases which were only discovered during exploratory testing (and hence these new commits);
- consistent registration of internal / external web console plugins – currently, those are registered in four different ways, including via `org.apache.felix.webconsole.SimpleWebConsolePlugin.register(BundleContext)`, as well as via their activators (`org.apache.felix.webconsole.plugins.event.internal.Activator`), constructors (`org.apache.felix.webconsole.plugins.scriptconsole.internal.ScriptConsolePlugin`, `org.apache.felix.inventory.impl.InventoryPrinterManagerImpl.InventoryPrinterManagerImpl(BundleContext)`) and specialized methods (`org.apache.felix.inventory.impl.InventoryPrinterAdapter.registerConsole(BundleContext, InventoryPrinterManagerImpl)`;
- refactor Apache Felix Inventory Web Console plugin to Apache Felix Webconsole as internal plugin – currently, class hierarchy and constants are duplicated as to avoid cyclic dependencies, but this looks like a candidate for another internal Web Console plugin, instead of being maintained separately;
I will appreciate providing improvement suggestions for any of the new / refactored code in this PR, where needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [felix-dev] ideas-into-software commented on pull request #218: Upgrade Apache Felix to Jakarta Servlet API 6.x (milestone 2)
Posted by "ideas-into-software (via GitHub)" <gi...@apache.org>.
ideas-into-software commented on PR #218:
URL: https://github.com/apache/felix-dev/pull/218#issuecomment-1675401257
@cziegeler
Conflicting file was updated, so now it's all green for merge.
Now that PR is approved, and conflict resolved, can PR be merged and can JIRA issue (https://issues.apache.org/jira/browse/FELIX-6612) be marked as resolved, or do you wish to conduct code review, including follow up on question I asked in previous comment (https://github.com/apache/felix-dev/pull/218#issuecomment-1672266266), regarding `org.apache.felix.http.base.internal.registry.PathResolverFactory.createPatternMatcher(ServletHandler, String)`?
I already merged latest from `master` branch on August 9th, before submitting this PR, but new commits are merged to `master` frequently, so unfortunately new conflicts may arise, as you know, depending on how long these next steps take.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org