fix: watch Job resources in dataload and datamigrate controllers#5675
fix: watch Job resources in dataload and datamigrate controllers#5675jakharmonika364 wants to merge 1 commit intofluid-cloudnative:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @jakharmonika364. Thanks for your PR. I'm waiting for a fluid-cloudnative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical bug affecting DataLoad and DataMigrate resources. Previously, when Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Signed-off-by: Monika Jakhar <jakharmonika364@gmail.com>
0f82652 to
011336a
Compare
|
There was a problem hiding this comment.
Code Review
This pull request fixes a bug where DataLoad and DataMigrate resources would get stuck in the 'Executing' state by adding a watch for Job resources in both controllers. The change correctly addresses the issue for operations with a policy of Once. My review includes suggestions to refactor the controller setup logic in both modified files. This would reduce code duplication and improve long-term maintainability.



Ⅰ. Describe what this PR does
This PR fixes a bug where DataLoad and DataMigrate status gets stuck at "Executing" even after the job completes successfully.
The controllers were only watching CronJob resources, but when
policy: Onceis used (which is the default), the helm charts create regular Job resources instead. Since the controllers weren't watching Jobs, they never received completion events and couldn't update the status.Now both controllers watch Job and CronJob resources to handle all policy types.
Ⅱ. Does this pull request fix one issue?
fixes #4287
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
No new tests added. The change is straightforward - just adding the missing Job watcher to the controller setup. The existing reconciliation logic already handles Job status correctly, it just wasn't being triggered.
Ⅳ. Describe how to verify it
policy: Once(default)You can also verify by checking the controller logs - it should now reconcile when Jobs change state.
Ⅴ. Special notes for reviews
This is a minimal fix - only 4 lines added total (2 per controller). The same issue affects both DataLoad and DataMigrate controllers, so I fixed both in this PR. Let me know if you'd prefer separate PRs for each controller.