jenkinsci / jenkinsci/junit-plugin

Make it possible to disable test report path validation

Open
#728 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
87
Forks
351
Avg merge
1d 19h
Merged PRs (30d)
2

Description

### What feature do you want to see added?

Currently when adding a `Publish JUnit test result report` step, this step will validate whether whatever paths are provided under `Test report XMLs` exist or not.

This causes issues with very large workspaces with millions of files. In particular the issue we've seen was that the Jenkins Agent will attempt to find the specific path e.g., `html/report.xml` and when it doesn't find it, it'll expand the path to be `**/html/report.xml` to be able to provide suggestions (e.g., `html/report.xml` doesn't exist but `results/html/report.xml` does).

By doing so, the underlying `DirectoryScanner` that's used to do this will accumulate a `VectorSet` of `String` that has all the filepaths of **not-matched** files.

When a workspace has millions of files, this'll eventually cause the JVM to run out of heap space, the Agent to fall over and with it, bring down all jobs that were running on the Agent.

I'm proposing that by default this validation is disabled (its only purpose seems to make it more user-friendly but serves no practical purpose) and that we maybe expose a checkbox that allows that validation to be optionally enabled.

Thoughts?

### Upstream changes

_No response_

### Are you interested in contributing this feature?

Yes, I'd like to contribute to this since this is impacting my work.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Jenkins "Publish JUnit test result report" step and the validation that invokes DirectoryScanner for Test report XMLs. Define how validation is disabled by default and optionally enabled, then verify that large workspaces no longer perform the costly validation unless requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.