Skip to content

Fix cleanup frequency validation to match UI bounds - #485

Open
esidh1998 wants to merge 1 commit into
jenkinsci:masterfrom
esidh1998:codex/fix-cleanup-frequency
Open

esidh1998 wants to merge 1 commit into
jenkinsci:masterfrom
esidh1998:codex/fix-cleanup-frequency

Conversation

@esidh1998

Copy link
Copy Markdown

The cleanup frequency field defines a range of 10–1200 seconds in the UI, but its form validator accepts negative values and positive values outside that range.

This change aligns form validation with the existing inclusive 10–1200-second range, updates the validation error, and clarifies the help text with the minimum, maximum, default, and distinction from the agent idle timeout. Regression coverage includes both boundaries, negative values, zero, malformed input, and numeric overflow.

Testing done

  • Clean plugin build on Windows with JDK 21: mvn -B -ntp -pl plugin -am clean verify — 143 tests, 139 passed, four existing skips, zero failures or errors.
  • Packaging, SpotBugs, and Spotless passed.
  • Browser checks: 9 and 1201 rejected; 10 and 1200 accepted. Negative values, zero, and malformed input are covered by the regression test.
  • Updated help text verified in the browser.

Screenshots

Before — original help text

Original cleanup-frequency help

After — updated help and validation

Updated help and rejection of a value below the minimum

Submitter checklist

  • Opened from a topic/bugfix branch.
  • Pull request title describes the desired changelog entry.
  • Changes described above.
  • Relevant issues: none filed for this small validation fix.
  • Related pull requests: none known.
  • Regression tests demonstrate the validation fix.

@esidh1998

Copy link
Copy Markdown
Author

Hi maintainers, the test checks passed on Linux (Java 21 and 25) and Windows (Java 21), but the overall Jenkins build is marked aborted after the Windows agent was removed, with follow-on errors collecting results. Could you please rerun it at your convenience? The Jenkins Security Scan is also awaiting maintainer approval. Thank you for your time!

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.

1 participant