Skip to content

fix(framework): set the logger in the Coscheduling and Volcano plugins - #4149

Open
Ahmad-Faraj wants to merge 1 commit into
kubeflow:masterfrom
Ahmad-Faraj:fix/plugin-logger
Open

Ahmad-Faraj wants to merge 1 commit into
kubeflow:masterfrom
Ahmad-Faraj:fix/plugin-logger

Conversation

@Ahmad-Faraj

Copy link
Copy Markdown

What this PR does / why we need it:
Sets logger in New for the Coscheduling and Volcano plugins, the same way the JobSet plugin does. Without it the "PodGroup CRDs must be installed in advance" error is dropped. Added a test per plugin that fails on master.

Which issue(s) this PR fixes (optional, in Fixes #<issue number>, #<issue number>, ... format, will close the issue(s) when PR gets merged):
Fixes #4148

Checklist:

  • Docs included if any changes are user facing

Copilot AI balanced review requested due to automatic review settings October 1, 2026 13:13
@github-project-automation github-project-automation Bot moved this to Needs Triage in Kubeflow Trainer Oct 1, 2026

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@rishabhsai

Copy link
Copy Markdown
Contributor

Ran this locally. With coscheduling.go and volcano.go reverted to master and the new tests kept, both fail with got logs: "", and both pass on the PR head, so the test pins the fix. golangci-lint is clean on both packages.

I also traced the wiring. main.go calls ctrl.SetLogger before runtimecore.New, and ctrl.LoggerFrom falls back to the global logger when the context has none, so the field holds a real logger by the time New runs. ReconcilerBuilders is the only place either plugin reads it, and it only runs from SetupWithManager, after New. The handlers already take theirs from the context. This matches JobSet at jobset.go:83.

One question: is this worth a cherry-pick to release-2.3? The same unset field is there at coscheduling.go:265 and volcano.go:338.

@Ahmad-Faraj

Copy link
Copy Markdown
Author

@rishabhsai up to the maintainers. It only drops the error log when the PodGroup CRDs are missing, nothing breaks without it, so I wouldn't push for a cherry-pick.

@abhishekKokadwar abhishekKokadwar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @Ahmad-Faraj, this looks right to me.

I checked it at 63bd7b11:

Result
PR head, go test on the volcano, coscheduling and framework core packages ok
coscheduling.go and volcano.go from master with the new tests both TestReconcilerBuildersLogsMissingPodGroupCRD fail with got logs: ""

So the tests pin the change, which matches what @rishabhsai saw.

The fix follows the JobSet plugin (jobset.go:84), and JobSet is the only other plugin with a logger field, so no other plugin has the same gap. On master the unset field is a zero logr.Logger, so the error is dropped silently, with no panic.

I only ran unit tests, not a cluster. The branch is 39 commits behind master but still merges cleanly.

One heads-up: #4127 also appends a test at the end of volcano_test.go, so the two will conflict there. I will rebase mine if this merges first.

@Ahmad-Faraj

Copy link
Copy Markdown
Author

/assign @andreyvelich

Signed-off-by: Ahmad-Faraj <ahmedfrag4040@gmail.com>
@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from andreyvelich. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

Coscheduling and Volcano plugins drop the missing PodGroup CRD error

5 participants