Skip to content

Conversation

@pyek-bot
Copy link
Collaborator

@pyek-bot pyek-bot commented Aug 11, 2025

Description

This change allows a user to enable/disable the stats collector job dynamically without requiring a cluster restart

Related Issues

Resolves #4091

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.

Signed-off-by: Pavan Yekbote <pybot@amazon.com>
Signed-off-by: Pavan Yekbote <pybot@amazon.com>
Signed-off-by: Pavan Yekbote <pybot@amazon.com>
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval August 11, 2025 22:28 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval August 11, 2025 22:28 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval August 11, 2025 22:28 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval August 11, 2025 22:28 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Aug 11, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.05%. Comparing base (8ef3528) to head (780ec5d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...rch/ml/common/settings/SettingsChangeListener.java 0.00% 2 Missing ⚠️
...arch/ml/cluster/MLCommonsClusterEventListener.java 0.00% 1 Missing ⚠️
.../main/java/org/opensearch/ml/jobs/MLJobRunner.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4092      +/-   ##
============================================
- Coverage     79.06%   79.05%   -0.02%     
  Complexity     8621     8621              
============================================
  Files           755      756       +1     
  Lines         38352    38364      +12     
  Branches       4287     4289       +2     
============================================
+ Hits          30324    30327       +3     
- Misses         6220     6226       +6     
- Partials       1808     1811       +3     
Flag Coverage Δ
ml-commons 79.05% <80.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@pyek-bot pyek-bot had a problem deploying to ml-commons-cicd-env-require-approval August 11, 2025 23:36 — with GitHub Actions Failure
@pyek-bot pyek-bot had a problem deploying to ml-commons-cicd-env-require-approval August 11, 2025 23:36 — with GitHub Actions Failure
@dhrubo-os
Copy link
Collaborator

can we add bit more tests: https://github.com/opensearch-project/ml-commons/pull/4092/checks?check_run_id=47862333944

dhrubo-os
dhrubo-os previously approved these changes Aug 12, 2025
Copy link
Collaborator

@dhrubo-os dhrubo-os left a comment

Choose a reason for hiding this comment

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

approving to unblock you.

Zhangxunmt
Zhangxunmt previously approved these changes Aug 12, 2025
Copy link
Collaborator

@Zhangxunmt Zhangxunmt left a comment

Choose a reason for hiding this comment

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

LGTM. I think it worth adding a log in the JobRunner runJob validation showing that "the job is disabled and it shouldn't be executed by JS".

…ering a disabled job

Signed-off-by: Pavan Yekbote <pybot@amazon.com>
@pyek-bot pyek-bot dismissed stale reviews from Zhangxunmt and dhrubo-os via 780ec5d August 12, 2025 01:28
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval August 12, 2025 01:30 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval August 12, 2025 01:30 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval August 12, 2025 01:30 — with GitHub Actions Inactive
@pyek-bot pyek-bot had a problem deploying to ml-commons-cicd-env-require-approval August 12, 2025 01:30 — with GitHub Actions Failure
@pyek-bot
Copy link
Collaborator Author

Thanks for the reviews!

@dhrubo-os added more test cases

@Zhangxunmt addressed the comment by adding a validation in job runner

Once CI passes, can we merge and add backport labels for 3.2, 3.1? Thanks!

@dhrubo-os dhrubo-os merged commit b6952b9 into opensearch-project:main Aug 12, 2025
12 of 14 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 3.1 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-3.1 3.1
# Navigate to the new working tree
cd .worktrees/backport-3.1
# Create a new branch
git switch --create backport/backport-4092-to-3.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b6952b9d2ca7e0a7c42080d424ccb6d6c4d45e99
# Push it to GitHub
git push --set-upstream origin backport/backport-4092-to-3.1
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-3.1

Then, create a pull request where the base branch is 3.1 and the compare/head branch is backport/backport-4092-to-3.1.

opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 12, 2025
dhrubo-os pushed a commit that referenced this pull request Aug 12, 2025
…4094)

(cherry picked from commit b6952b9)

Co-authored-by: Pavan Yekbote <pybot@amazon.com>
pyek-bot added a commit to pyek-bot/ml-commons that referenced this pull request Oct 1, 2025
…ch-project#4092) (opensearch-project#4094)

(cherry picked from commit b6952b9)

Co-authored-by: Pavan Yekbote <pybot@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Modify static metric collection job setting to be dynamic

4 participants