Installer should stop deleting Jetty jars from `lib/` now that Jetty is shaded and relocated

Open Beginner friendly
#186 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
backend

Research direction

Start by reading com.blazemeter.jmeter.http2.Installer and the tests that cover its install behavior. Remove the cleanup of older jetty-* and http2-* jars while preserving the unsupported Java version warning. Done means installation leaves those jars untouched regardless of version and the Java warning still works.

Written by the indexing model from the issue text.

Description

bug

Background

When the Plugins Manager installs this plugin, it runs com.blazemeter.jmeter.http2.Installer. Besides checking the Java version, the installer deletes from JMeter's lib/ every jetty-* and http2-* jar whose major version is older than the Jetty version the plugin uses (currently 12):

jetty-client, jetty-util, jetty-http, jetty-io, jetty-alpn-client, http2-client, http2-common, http2-hpack, jetty-osgi-alpn

This cleanup was needed while the plugin loaded Jetty from lib/. Each time we moved to a newer Jetty, the old jars stayed on the classpath, could be loaded first, and caused conflicts.

Since 3.0.0, Jetty is bundled inside the plugin jar and relocated to com.blazemeter.jmeter.http2.shaded.org.eclipse.jetty, and the Plugins Manager no longer downloads separate libraries for this plugin. Jetty jars in lib/ can no longer conflict with the plugin, so the cleanup is no longer needed.

Problem

The cleanup removes jars that other plugins still need. From the Plugins Manager repository descriptors:

Plugin Jetty jars it installs Deleted by our installer
WebSocket Sampler by Maciej Zaleski (websocket-sampler) jetty-http, jetty-io, jetty-util 9.1.1 yes
UbikLoadPack Observability Plugin (ulp-observability-plugin) jetty-http, jetty-io, jetty-util 11.0.13 yes

Installing or upgrading the BlazeMeter HTTP plugin can therefore break these plugins without any warning. This is the same kind of problem as #68, where the installer of 2.0.5 and earlier removed jmeter-plugins-cmn-jmeter.

Proposal

  • Remove the Jetty and HTTP/2 jar cleanup from the installer.
  • Leave removing dependency jars that are no longer used to the Plugins Manager or the user, as with any other plugin.
  • Keep the Java version check and its message.

Out of scope

  • Removing old jmeter-bzm-http2-1.x plugin jars. Those are earlier copies of this plugin, whose classes are not relocated, so they can still conflict with the current jar.

Acceptance criteria

  • Installing the plugin through the Plugins Manager leaves existing jetty-* and http2-* jars in lib/ untouched, whatever their version.
  • WebSocket Sampler by Maciej Zaleski and UbikLoadPack Observability Plugin keep working after installing or upgrading the BlazeMeter HTTP plugin.
  • The installer still warns when the Java version is not supported.
Dominant language
Java
Stars
51
Forks
30
Avg merge
2d 22h
Merged PRs (30d)
8

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Blazemeter/jmeter-http-plugin

All issues in Blazemeter/jmeter-http-plugin

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.