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

[Discussion] Update to Jetty version 11 #699

Open
romanisb opened this issue Jul 20, 2023 · 5 comments
Open

[Discussion] Update to Jetty version 11 #699

romanisb opened this issue Jul 20, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@romanisb
Copy link
Contributor

What feature do you want to see added?

This is rather a follow up on a discussion from #696.

Copied from #696 (comment)

Everything looks good, thanks you! I would likely go straight to Jetty 11 but it is a separate topic
@oleg-nenashev

I've looked into updating to Jetty 11 and straight away the compilation will fail because auf the namespace change from javax.* to jakarta.*:

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /mnt/c/Users/dev/romanisb/jenkinsfile-runner/setup/src/main/java/io/jenkins/jenkinsfile/runner/JenkinsLauncher.java:[20,20] error: package javax.servlet does not exist
[ERROR] /mnt/c/Users/dev/romanisb/jenkinsfile-runner/setup/src/main/java/io/jenkins/jenkinsfile/runner/JenkinsLauncher.java:[21,20] error: package javax.servlet does not exist
[ERROR] /mnt/c/Users/dev/romanisb/jenkinsfile-runner/setup/src/main/java/io/jenkins/jenkinsfile/runner/JenkinsEmbedder.java:[77,20] error: package javax.servlet does not exist
[ERROR] /mnt/c/Users/dev/romanisb/jenkinsfile-runner/setup/src/main/java/io/jenkins/jenkinsfile/runner/JenkinsLauncher.java:[80,14] error: cannot find symbol
  symbol:   class ServletContext
  location: class JenkinsLauncher<T>
  where T is a type-variable:
    T extends JenkinsLauncherCommand declared in class JenkinsLauncher
[ERROR] /mnt/c/Users/dev/romanisb/jenkinsfile-runner/setup/src/main/java/io/jenkins/jenkinsfile/runner/JenkinsEmbedder.java:[375,23] error: cannot find symbol
  symbol:   class ServletContext
  location: class JenkinsEmbedder
[ERROR] /mnt/c/Users/dev/romanisb/jenkinsfile-runner/setup/src/main/java/io/jenkins/jenkinsfile/runner/PluginManagerImpl.java:[14,29] error: cannot find symbol
  symbol:   class ServletContext
  location: class PluginManagerImpl
[ERROR] /mnt/c/Users/dev/com/romanisb/jenkinsfile-runner/setup/src/main/java/io/jenkins/jenkinsfile/runner/NoListenerConfiguration.java:[8,20] error: package javax.servlet does not exist
[INFO] 7 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Jenkinsfile Runner 1.0-beta-32-SNAPSHOT:
[INFO]
[INFO] Jenkinsfile Runner ................................. SUCCESS [  1.422 s]
[INFO] bootstrap .......................................... SUCCESS [  7.175 s]
[INFO] setup .............................................. FAILURE [  7.503 s]
[INFO] Jenkinsfile Runner: Plugin dependencies ............ SKIPPED
[INFO] payload ............................................ SKIPPED
[INFO] jenkinsfile-runner ................................. SKIPPED
[INFO] packaging-parent-pom-resources ..................... SKIPPED
[INFO] packaging-parent-pom ............................... SKIPPED
[INFO] packaging-parent-pom-slim .......................... SKIPPED
[INFO] vanilla-package .................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  30.009 s
[INFO] Finished at: 2023-07-17T10:26:19+02:00
[INFO] ------------------------------------------------------------------------

Also I'm not sure if Jetty 11 will somehow work with Jenkins core in the future, but I do not have that much in-depth knowledge in this:
https://www.jenkins.io/doc/administration/requirements/servlet-containers/

Tested with romanisb/jenkinsfile-runner@update-jenkins-core-2.375...romanisb:jenkinsfile-runner:jenkins-core-2.387-jetty-11

Upstream changes

romanisb/jenkinsfile-runner@update-jenkins-core-2.375...romanisb:jenkinsfile-runner:jenkins-core-2.387-jetty-11

@romanisb romanisb added the enhancement New feature or request label Jul 20, 2023
@lhupfeldt
Copy link

Would that update fix #686 ?

@romanisb
Copy link
Contributor Author

I think the underlying issue in #686 and #656 could be fixed with #696. So with a new release of the current state of the main branch and a new docker image version you should be good to go.

@oleg-nenashev
Copy link
Member

Yes, let's definitely update to Jetty 11

@oleg-nenashev
Copy link
Member

I looked into building in the Jetty 10 => 11 polyfill we have in another project, but it does not run well. Jetty is too strictly tied to Jenkins internals. I think the best strategy would be to wait for jenkinsci/winstone#341 from @olamy , and then update straight to Jetty 12

@olamy
Copy link
Member

olamy commented Nov 12, 2023

I don't think upgrading to Jetty 11 is possible now.
Because Jetty 11 is ee9 (jakarta.* namespace) whereas Jetty 10 is ee8 (javax.* namespace)
This namespace will require some significant changes in Jenkins core itself. (stapler etc...)
Jetty 12 with ee8 is a better candidate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants