Skip to content

HIVE-28856: Remove Jetty-Runner #5720

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

Merged
merged 1 commit into from
Apr 11, 2025
Merged

Conversation

ramitg254
Copy link
Contributor

@ramitg254 ramitg254 commented Mar 28, 2025

What changes were proposed in this pull request?

Removal of jetty-runner dependency

Why are the changes needed?

Not jetty-runner as a whole was needed only tomcat-jasper was required

Does this PR introduce any user-facing change?

No

Is the change a dependency upgrade?

No

How was this patch tested?

on local machine, I tested it for successful mvn build and testing it with hive-precommit-tests .

<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-servlet-api</artifactId>
<version>9.0.82</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to create a variable for versions so that we can reuse them elsewhere. You can probably add

<tomcat.version>9.0.82</tomcat.version>

in the root pom's properties.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added variable

<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
<version>3.26.0</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

Create a property variable for this too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added variable

service/pom.xml Outdated
</exclusions>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jasper</artifactId>
<version>9.0.82</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace this with {tomcat.version}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

replaced

Copy link
Contributor

@soumyakanti3578 soumyakanti3578 left a comment

Choose a reason for hiding this comment

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

In the "How was this patch tested?" section, can you please include the tests that were run on your local machine?

It is easier for reviewers who are not familiar with the specifics to verify the tests if the steps are listed.

pom.xml Outdated
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-runner</artifactId>
<version>${jetty.version}</version>
<groupId>org.apache.tomcat</groupId>
Copy link
Member

@deniskuzZ deniskuzZ Apr 4, 2025

Choose a reason for hiding this comment

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

i think we should be using apache-jsp instead. that would simplify the upgrades of jetty dependencies

<groupId>org.eclipse.jetty</groupId>
<artifactId>apache-jsp</artifactId>
<version>${jetty.version}</version>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I thought of it but as per apache-jsp from org.eclipse.jetty has test dependencies with 3 cve for the current jetty version so i thought of not taking risk of adding it although it is under test scope and also as apache-jsp from org.mortbay.jasper was not alone enough to prevent compilation failures so i also dropped for apache-jsp from org.eclipse.jetty

Copy link
Contributor Author

Choose a reason for hiding this comment

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

also on using apache-jsp it is giving ant build error on service pom due to absance of org.apache.jasper.JspC so that's why only apache-jsp won't be enough

Copy link
Member

@deniskuzZ deniskuzZ Apr 8, 2025

Choose a reason for hiding this comment

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

@ramitg254, try

<jetty.version>9.4.57.v20241219</jetty.version>

<dependency>
  <groupId>org.eclipse.jetty</groupId>
  <artifactId>apache-jsp</artifactId>
  <version>${jetty.version}</version>
</dependency>

that removes a number of CVEs from org.eclipse.jetty deps:

Direct vulnerabilities:
[CVE-2024-8184](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-8184)
[CVE-2023-26049](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-26049)
[CVE-2023-26048](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-26048)

Vulnerabilities from dependencies:
[CVE-2023-40167](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-40167)
[CVE-2022-2047](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-2047)

ref: #5599 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

remove_jetty-runner.patch

mvn clean install -DskipTests -T4 -Pdist,itests -Dmaven.javadoc.skip=true -Drat.skip=true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

made the changes

@ramitg254
Copy link
Contributor Author

I have upgraded to 9.0.98 of tomcat-jasper because from version 10 and onwards there was migration from javax.servlet.* to jakarta.servlet.* and we are still using javax.servlet.* so it won't build

@ramitg254 ramitg254 requested a review from deniskuzZ April 7, 2025 08:49
Copy link
Member

@deniskuzZ deniskuzZ left a comment

Choose a reason for hiding this comment

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

LGTM, pending tests

@deniskuzZ
Copy link
Member

@ramitg254, have you tried to start HS2 in Docker and check the WebUI?

@ramitg254
Copy link
Contributor Author

@ramitg254, have you tried to start HS2 in Docker and check the WebUI?

Yeah, I am able to start hs2 in docker and see the webui of it

@deniskuzZ deniskuzZ merged commit db041fd into apache:master Apr 11, 2025
4 checks passed
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.

5 participants