Skip to content

feature-hide N/A tests configurable - #161

Open
pfeilh wants to merge 12 commits into
jenkinsci:masterfrom
pfeilh:feature-hide-na-tests-configurable
Open

feature-hide N/A tests configurable#161
pfeilh wants to merge 12 commits into
jenkinsci:masterfrom
pfeilh:feature-hide-na-tests-configurable

Conversation

@pfeilh

@pfeilh pfeilh commented Aug 3, 2026

Copy link
Copy Markdown

https://issues.jenkins.io/browse/JENKINS-75315?jql=resolution%20is%20EMPTY%20and%20component%3D19327

See #XXXXX

Testing done

Proposed upgrade guidelines

N/A

Submitter checklist

  • The Jira / Github issue, if it exists, is well-described.
  • The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood.
    • The changelog generator for plugins uses the pull request title as the changelog entry.
    • Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during the upgrade.
  • There is automated testing or an explanation that explains why this change has no tests.
  • New public functions for internal use only are annotated with @NoExternalUse. In case it is used by non java code the Used by {@code <panel>.jelly} Javadocs are annotated.
  • New or substantially changed JavaScript is not defined inline and does not call eval to ease the future introduction of Content Security Policy (CSP) directives (see documentation).
  • For dependency updates, there are links to external changelogs and, if possible, full differentials.
  • For new APIs and extension points, there is a link to at least one consumer.
  • Changes in the interface are documented.

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
  • Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
  • Proper changelog labels are set so that the changelog can be generated automatically. See also release-drafter-labels.

@pfeilh
pfeilh requested a review from a team as a code owner August 3, 2026 07:53
@pfeilh

pfeilh commented Aug 3, 2026

Copy link
Copy Markdown
Author

CI failure appears infrastructure-related, not code-related:
Windows checkout failed with GitHub 503 Service Unavailable.
Linux failed while extracting Maven cache archive with Unexpected EOF in archive.
Will re-run the build.

@pfeilh

pfeilh commented Aug 3, 2026

Copy link
Copy Markdown
Author

CI still fails due to infrastructure, not code changes.
Linux checkout fails with GitHub 503 during fetch, and Windows branch is then interrupted as a consequence.
Could a maintainer please re-run the PR build?

Comment thread src/main/java/org/jenkinsci/plugins/testresultsanalyzer/config/UserConfig.java Outdated

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

Adds a new user-configurable threshold to hide tests that have N/A results across recent builds, reducing noise in the Test Results Analyzer report and improving readability over time.

Changes:

  • Extend JsTreeUtil#getJsTree(...) to optionally omit tests (and now-empty parent nodes) based on an N/A threshold.
  • Add UI inputs for the new threshold in both global configuration and the report page, and pass it via UserConfig.
  • Add/adjust unit tests for the new JsTreeUtil behavior and update call sites for the new method signature.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/test/java/org/jenkinsci/plugins/testresultsanalyzer/JsTreeUtilTest.java Updates existing tests for the new getJsTree signature and adds coverage for hiding behavior.
src/main/webapp/js/testresult.js Includes the new threshold value in the per-page user configuration payload.
src/main/resources/org/jenkinsci/plugins/testresultsanalyzer/TestResultsAnalyzerExtension/global.jelly Adds a global configuration field for the N/A hiding threshold.
src/main/resources/org/jenkinsci/plugins/testresultsanalyzer/TestResultsAnalyzerAction/index.jelly Adds a per-page numeric input for the threshold in the report UI.
src/main/java/org/jenkinsci/plugins/testresultsanalyzer/TestResultsAnalyzerExtension.java Persists the new global config value and adds server-side validation hook.
src/main/java/org/jenkinsci/plugins/testresultsanalyzer/TestResultsAnalyzerAction.java Parses/clamps the threshold from UserConfig, falling back to the global default, and passes it into JsTreeUtil.
src/main/java/org/jenkinsci/plugins/testresultsanalyzer/JsTreeUtil.java Implements filtering/hiding logic based on N/A threshold while building the tree JSON.
src/main/java/org/jenkinsci/plugins/testresultsanalyzer/config/UserConfig.java Extends user config model/binding to carry the new threshold value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/java/org/jenkinsci/plugins/testresultsanalyzer/JsTreeUtil.java Outdated
@pfeilh

pfeilh commented Aug 3, 2026

Copy link
Copy Markdown
Author

@MarkEWaite Can you have a look again?

@pfeilh
pfeilh requested a review from MarkEWaite August 3, 2026 14:01
@pfeilh

pfeilh commented Aug 4, 2026

Copy link
Copy Markdown
Author

@MarkEWaite Hello Mark, can you review again:)

Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>

@MarkEWaite MarkEWaite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@pfeilh I'm not a primary maintainer of the plugin. I reviewed the initial changes because I had a few minutes to do so. I don't have the capacity right now to complete a full review. That will need to be done by other maintainers.

Comment thread src/main/java/org/jenkinsci/plugins/testresultsanalyzer/config/UserConfig.java Outdated
@pfeilh

pfeilh commented Aug 4, 2026

Copy link
Copy Markdown
Author

For the others maintainers. I tested this feature locally in a separate Jenkins instance and the N/A threshold behavior works as expected. The implementation looks correct for me and the checks are green. From my side this is ready for review.

@pfeilh
pfeilh requested a review from MarkEWaite August 4, 2026 12:30
@pfeilh

pfeilh commented Aug 4, 2026

Copy link
Copy Markdown
Author

Sorry @MarkEWaite, I wait for the other maintainers;) Thanks for now

@MarkEWaite

Copy link
Copy Markdown
Contributor

Sorry @MarkEWaite, I wait for the other maintainers;) Thanks for now

Thanks for being understanding that I'm not the right person to do the detailed review.

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.

5 participants