Skip to content

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Jul 10, 2025

Description

This PR contains an enhancement that allows user's to define an interval schedule in seconds. In order to adequately have jobs running in seconds, a cluster admin must set plugins.jobscheduler.sweeper.period also to a value in seconds as this is the frequency at which the jobs are swept.

One of the primary benefits of this PR is it drastically reduces the time for integ tests in the sample plugin bc we can now wait seconds instead of minutes to verify behavior.

This PR also refactors the integ tests in the sample plugin for readability.

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Jul 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 33.54%. Comparing base (bb908da) to head (1c89413).
Report is 2 commits behind head on main.

❌ Your project status has failed because the head coverage (33.54%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #796   +/-   ##
=========================================
  Coverage     33.54%   33.54%           
  Complexity      143      143           
=========================================
  Files            29       29           
  Lines          1389     1389           
  Branches        132      132           
=========================================
  Hits            466      466           
  Misses          886      886           
  Partials         37       37           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cwperks cwperks merged commit 877b11d into opensearch-project:main Jul 11, 2025
20 of 22 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in Engineering Effectiveness Board Jul 11, 2025
Jeremydupras pushed a commit to Jeremydupras/job-scheduler that referenced this pull request Aug 20, 2025
* WIP on allowing interval schedule to operate in seconds

Signed-off-by: Craig Perkins <[email protected]>

* Support defining IntervalSchedule in seconds

Signed-off-by: Craig Perkins <[email protected]>

* Use seconds in bwc test

Signed-off-by: Craig Perkins <[email protected]>

* Update runThenListJobs test

Signed-off-by: Craig Perkins <[email protected]>

* Consistent create watcher job

Signed-off-by: Craig Perkins <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Jeremy Dupras <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants