Skip to content

fix(thin): implement missing Validate logic for ReferenceDatasetEngine#5998

Open
Sukuna0007Abhi wants to merge 2 commits into
fluid-cloudnative:masterfrom
Sukuna0007Abhi:fix-referencedataset-validate
Open

fix(thin): implement missing Validate logic for ReferenceDatasetEngine#5998
Sukuna0007Abhi wants to merge 2 commits into
fluid-cloudnative:masterfrom
Sukuna0007Abhi:fix-referencedataset-validate

Conversation

@Sukuna0007Abhi

@Sukuna0007Abhi Sukuna0007Abhi commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Ⅰ. Describe what this PR does

This PR implements the missing Validate logic for the ReferenceDatasetEngine. Instead of immediately returning nil, it now retrieves the dataset and delegates validation to the checkDatasetMountSupport function. This ensures that any unsupported dataset mounts are caught early during the validation phase.

Ⅱ. Does this pull request fix one or more issues?

fixes #5997

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

No new tests were required; existing validation test flows will cover the integrated checkDatasetMountSupport logic.

Ⅳ. Describe how to verify it

Create a ReferenceDataset with an invalid or unsupported mount format. Ensure that the validation webhook/controller correctly rejects it during creation rather than failing silently.

Ⅴ. Special notes for reviews

None.

Signed-off-by: Sukuna0007Abhi <appsonly310@gmail.com>
@fluid-e2e-bot

fluid-e2e-bot Bot commented Jun 14, 2026

Copy link
Copy Markdown

Hi @Sukuna0007Abhi. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request implements validation logic for the ReferenceDatasetEngine by calling checkDatasetMountSupport in the Validate method. However, a correctness issue was identified where validation is bypassed during creation and uses stale data during updates because the dataset is fetched from the API server/cache instead of the reconciliation context. It is recommended to refactor the validation to use the dataset object provided in the context.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread pkg/ddc/thin/referencedataset/validate.go Outdated
…ass on creation

Signed-off-by: Sukuna0007Abhi <appsonly310@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

@Sukuna0007Abhi

Copy link
Copy Markdown
Contributor Author

Plz review @cheyang @TrafalgarZZZ

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 41.17647% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.56%. Comparing base (ae86e7c) to head (c0f8f03).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
pkg/ddc/thin/referencedataset/engine.go 58.33% 5 Missing ⚠️
pkg/ddc/thin/referencedataset/validate.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5998      +/-   ##
==========================================
- Coverage   63.56%   63.56%   -0.01%     
==========================================
  Files         479      479              
  Lines       33276    33280       +4     
==========================================
+ Hits        21151    21153       +2     
- Misses      10445    10447       +2     
  Partials     1680     1680              

☔ View full report in Codecov by Harness.
📢 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.

@cheyang cheyang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All CI checks passed and maintainer has approved. Auto-approving to satisfy branch protection.

@fluid-e2e-bot

fluid-e2e-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang

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

The pull request process is described 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

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.

[FEATURES] Implement Validate logic for ReferenceDatasetEngine

2 participants