Skip to content

HBASE-30338 Restore the shaded jar content check - #8561

Open
junegunn wants to merge 1 commit into
apache:masterfrom
junegunn:HBASE-30338
Open

HBASE-30338 Restore the shaded jar content check#8561
junegunn wants to merge 1 commit into
apache:masterfrom
junegunn:HBASE-30338

Conversation

@junegunn

Copy link
Copy Markdown
Member

HBASE-29226 changed the line to a plain assignment and wrapped the new rule in
a group with an empty alternative:

  allowed_expr="(|^javax/$)"

The assignment discarded every rule built up above it. The empty alternative
makes grep abort with "empty (sub)expression", and the `|| true` on that grep
swallows the failure, so bad_contents comes back empty and every artifact is
reported correct. The check has enforced nothing since.

Restoring it exposes 139 javax/servlet entries in hbase-shaded-mapreduce, which
jetty 12 on ee8 requires unrelocated. The original line was trying to allow
those but ^javax/$ only matches the bare directory, so allow the package too.

master and branch-3 only; branch-2 never carried the change.
@junegunn
junegunn requested review from NihalJain and a lite review from Copilot August 22, 2026 14:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Restores enforcement of shaded-jar content invariants in the hbase-shaded build by fixing the allowlist regex construction in the jar-contents check scripts, and explicitly allowing the unrelocated Servlet API entries required for Jetty 12 (EE8).

Changes:

  • Fixes the allowlist construction so it appends Jetty/Servlet-related allowances instead of overwriting the entire allowlist (which previously effectively disabled the check).
  • Allows javax/servlet/ contents (and the javax/ directory entry) as expected for the unrelocated Servlet API shipped in hbase-shaded-mapreduce.
  • Applies the same correction to both invariant-check modules (with and without Hadoop allowances).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
hbase-shaded/hbase-shaded-with-hadoop-check-invariants/src/test/resources/ensure-jars-have-correct-contents.sh Restores correct allowlist regex behavior and permits javax/servlet/ entries needed by Jetty 12 (EE8).
hbase-shaded/hbase-shaded-check-invariants/src/test/resources/ensure-jars-have-correct-contents.sh Same allowlist fix and Servlet API allowance for the non-Hadoop variant of the invariants check.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants