feat(runtime): support dataset auto-create policy#5674
feat(runtime): support dataset auto-create policy#5674jakharmonika364 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 |
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 enhances the Fluid runtime controller by enabling the automatic creation of Datasets. It simplifies the deployment process for users by removing the prerequisite of manually creating a Dataset before a Runtime. The change streamlines the workflow for new Runtimes, making them more self-sufficient in their initial setup. 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
|
|
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. |
There was a problem hiding this comment.
Code Review
This pull request introduces a useful feature for auto-creating datasets when a runtime is deployed with a specific annotation. The overall implementation is sound, but I've identified a critical issue that could lead to resource leaks. The auto-created dataset lacks an owner reference to the runtime, which means it won't be garbage collected when the runtime is deleted. I've provided a high-severity comment with a code suggestion to fix this. I also found a minor opportunity to refactor a piece of code for better readability and have included a medium-severity suggestion for that. Given the nature of these changes, I strongly recommend adding unit tests, as you've also noted, to ensure the correctness of the auto-creation logic and prevent future regressions, especially around resource lifecycle management.
8a59efa to
97fd836
Compare
Signed-off-by: Monika Jakhar <jakharmonika364@gmail.com>
97fd836 to
bf571b3
Compare
|



Ⅰ. Describe what this PR does
Ⅱ. Does this pull request fix one issue?
fixes #4518
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
No new tests in this PR. The change is confined to the shared controller logic; I’ve verified the basic flow manually as described below and can add unit tests around RuntimeReconciler in a follow-up if preferred.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews