Skip to content

[ZEPPELIN-6435] Remove frontend build dependency from IndexHtmlServletTest#5314

Merged
tbonelee merged 3 commits into
apache:masterfrom
gyowoo1113:ZEPPELIN-6435-index-html-servlet-test-frontend-independence
Jul 19, 2026
Merged

[ZEPPELIN-6435] Remove frontend build dependency from IndexHtmlServletTest#5314
tbonelee merged 3 commits into
apache:masterfrom
gyowoo1113:ZEPPELIN-6435-index-html-servlet-test-frontend-independence

Conversation

@gyowoo1113

Copy link
Copy Markdown
Contributor

What is this PR for?

IndexHtmlServletTest included a disabled Angular HTML addon test because it depended on the generated file at zeppelin-web-angular/dist/zeppelin/index.html. That artifact is not built during normal zeppelin-server tests, so the test could not run independently.

This PR replaces the frontend build dependency with a temporary, test-owned index.html file and re-enables testZeppelinWebAngularHtmlAddon.

The zeppelin-web index and the Angular-style index exercise different branches in IndexHtmlServlet. The zeppelin-web index does not contain explicit </head> and </body> closing tags, so the servlet falls back to inserting the head addon before <body> and the body addon before </html>. The Angular-style index contains both closing tags, so the re-enabled test verifies that the configured head and body addons are inserted immediately before </head> and </body>.

What type of PR is it?

Improvement

Todos

  • Remove the dependency on zeppelin-web-angular/dist/zeppelin/index.html
  • Create a temporary, test-owned Angular-style index.html
  • Re-enable testZeppelinWebAngularHtmlAddon
  • Verify addon insertion before </head> and </body>

What is the Jira issue?

[ZEPPELIN-6435]

How should this be tested?

./mvnw test -pl zeppelin-server -Dtest=IndexHtmlServletTest passes successfully.

Screenshots (if appropriate)

N/A

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@tbonelee

Copy link
Copy Markdown
Contributor

Since the PR's goal is to make IndexHtmlServletTest independent of the frontend build, could we apply the same treatment to testZeppelinWebHtmlAddon in this PR? It still hardcodes ../zeppelin-web/dist/index.html, another git-ignored build artifact. It only passes in CI because the core job builds zeppelin-web via -Pweb-classic; a clean local ./mvnw test -pl zeppelin-server would fail it for the exact reason you're fixing on the Angular side. Reusing the @TempDir pattern here (with a document that omits the closing tags, so it exercises the fallback branch in IndexHtmlServlet) would make both tests fully self-contained and complete the stated goal.

@gyowoo1113
gyowoo1113 force-pushed the ZEPPELIN-6435-index-html-servlet-test-frontend-independence branch from 8810c0d to e50081d Compare July 19, 2026 06:46
@gyowoo1113

Copy link
Copy Markdown
Contributor Author

Thanks for catching this. I updated testZeppelinWebHtmlAddon to use @TempDir as well and to verify the fallback behavior using an HTML document without closing tags.

@tbonelee
tbonelee merged commit 1355de1 into apache:master Jul 19, 2026
18 checks passed
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