Skip to content

Conversation

@TrafalgarZZZ
Copy link
Member

Ⅰ. Describe what this PR does

  • Add a script to inject the specified Fluid version into all charts
  • Ensure all charts (except Fluid control-plane and library charts) have the correct appVersion
  • This change improves consistency and traceability of Fluid versions across charts

Ⅱ. Does this pull request fix one issue?

fixes #XXXX

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

- Add a script to inject the specified Fluid version into all charts
- Ensure all charts (except Fluid control-plane and library charts) have the correct appVersion
- This change improves consistency and traceability of Fluid versions across charts

Signed-off-by: TzZtzt <trafalgarz@outlook.com>
@fluid-e2e-bot
Copy link

fluid-e2e-bot bot commented Dec 2, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@fluid-e2e-bot
Copy link

fluid-e2e-bot bot commented Dec 2, 2025

[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 trafalgarzzz by writing /assign @trafalgarzzz in a comment. For more information see:The Kubernetes Code Review Process.

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

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

Signed-off-by: TzZtzt <trafalgarz@outlook.com>
@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.56%. Comparing base (97a6cd8) to head (2bfd8f4).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5370      +/-   ##
==========================================
- Coverage   57.58%   57.56%   -0.02%     
==========================================
  Files         446      447       +1     
  Lines       30995    31013      +18     
==========================================
+ Hits        17849    17854       +5     
- Misses      11534    11545      +11     
- Partials     1612     1614       +2     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: TzZtzt <trafalgarz@outlook.com>
…ure git tree state is clean

Signed-off-by: TzZtzt <trafalgarz@outlook.com>
@TrafalgarZZZ
Copy link
Member Author

/test fluid-e2e

@TrafalgarZZZ TrafalgarZZZ marked this pull request as ready for review December 2, 2025 07:59
@TrafalgarZZZ
Copy link
Member Author

/retest

@RongGu RongGu requested a review from Copilot December 2, 2025 08:45
Copilot finished reviewing on behalf of RongGu December 2, 2025 08:47
@cheyang
Copy link
Collaborator

cheyang commented Dec 2, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

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 introduces a mechanism to pin the appVersion in runtime Helm charts to ensure version consistency across the Fluid ecosystem. This is achieved by adding a new script, hack/helm/pin_runtime_chart_version.sh, which is executed during the Docker image build process. The Makefile and various Dockerfiles are updated to support this new step. The overall approach is sound and effectively addresses the goal of version consistency. My review focuses on improving the newly added shell script for better robustness and clarity. I've provided two suggestions for hack/helm/pin_runtime_chart_version.sh: one to correct a misleading comment and another to refactor the file processing logic to be more robust and idiomatic.

Comment on lines 17 to 28
charts=$(find charts | grep Chart.yaml | grep -v "charts/fluid/\|charts/library" | xargs -I _ dirname _)

for chart in $charts; do
if [[ -f "$chart/Chart.yaml" ]]; then
echo "Processing $chart/Chart.yaml."
if [[ $(grep -c "appVersion:" $chart/Chart.yaml) == 0 ]]; then
echo "appVersion: $fluid_version" >> $chart/Chart.yaml
else
sed -i 's/appVersion:.*/appVersion: '"$fluid_version"'/' $chart/Chart.yaml
fi
fi
done
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The current implementation for finding and processing charts can be simplified and made more robust.

  1. find charts | grep Chart.yaml is less precise than find charts -name Chart.yaml and can lead to false positives.
  2. The for chart in $charts loop is not safe for paths containing spaces due to word splitting.
  3. The logic can be simplified by operating on the Chart.yaml file paths directly, removing the need for xargs dirname and the redundant if [[ -f ... ]] check.

A while read loop is a standard and safer way to process file paths from find.

Suggested change
charts=$(find charts | grep Chart.yaml | grep -v "charts/fluid/\|charts/library" | xargs -I _ dirname _)
for chart in $charts; do
if [[ -f "$chart/Chart.yaml" ]]; then
echo "Processing $chart/Chart.yaml."
if [[ $(grep -c "appVersion:" $chart/Chart.yaml) == 0 ]]; then
echo "appVersion: $fluid_version" >> $chart/Chart.yaml
else
sed -i 's/appVersion:.*/appVersion: '"$fluid_version"'/' $chart/Chart.yaml
fi
fi
done
find charts -name Chart.yaml | grep -v -e "charts/fluid/" -e "charts/library" | while read -r chart_file; do
echo "Processing $chart_file."
if [[ $(grep -c "appVersion:" "$chart_file") -eq 0 ]]; then
echo "appVersion: $fluid_version" >> "$chart_file"
else
sed -i 's/appVersion:.*/appVersion: '"$fluid_version"'/' "$chart_file"
fi
done

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a build-time mechanism to ensure consistent Fluid version tracking across runtime Helm charts by injecting the appVersion field into Chart.yaml files during Docker image builds.

Key Changes:

  • Adds a new shell script (pin_runtime_chart_version.sh) that updates the appVersion field in Helm charts
  • Modifies all runtime controller Dockerfiles to execute the version pinning script during the build stage
  • Updates the Makefile to pass the FLUID_VERSION build argument to all Docker builds

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
hack/helm/pin_runtime_chart_version.sh New script that updates appVersion in Chart.yaml files for runtime charts
docker/Dockerfile.vineyardruntime Adds FLUID_VERSION arg, executes pinning script, and copies modified charts from builder stage
docker/Dockerfile.thinruntime Adds FLUID_VERSION arg, executes pinning script, and copies modified charts from builder stage
docker/Dockerfile.juicefsruntime Adds FLUID_VERSION arg, executes pinning script, and copies modified charts from builder stage
docker/Dockerfile.jindoruntime Adds FLUID_VERSION arg, executes pinning script, and copies modified charts from builder stage
docker/Dockerfile.goosefsruntime Adds FLUID_VERSION arg, executes pinning script, and copies modified charts from builder stage
docker/Dockerfile.efcruntime Adds FLUID_VERSION arg, executes pinning script, and copies modified charts from builder stage
docker/Dockerfile.dataset Adds FLUID_VERSION arg, executes pinning script, and copies modified charts from builder stage
docker/Dockerfile.application Adds FLUID_VERSION arg, executes pinning script, and copies modified charts from builder stage
docker/Dockerfile.alluxioruntime Adds FLUID_VERSION arg, executes pinning script, and copies modified charts from builder stage
Makefile Centralizes build args including FLUID_VERSION for consistent propagation across all Docker builds

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if [[ $(grep -c "appVersion:" $chart/Chart.yaml) == 0 ]]; then
echo "appVersion: $fluid_version" >> $chart/Chart.yaml
else
sed -i 's/appVersion:.*/appVersion: '"$fluid_version"'/' $chart/Chart.yaml
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

The sed -i command is missing the backup extension argument that's used in the existing inject_library_chart.sh script (line 24 uses sed -i ""). On macOS, sed -i requires an extension argument (even if empty like ""), while on Linux it's optional. For consistency with the existing script and cross-platform compatibility, this should be sed -i "" 's/appVersion:.*/appVersion: '"$fluid_version"'/' $chart/Chart.yaml

Suggested change
sed -i 's/appVersion:.*/appVersion: '"$fluid_version"'/' $chart/Chart.yaml
sed -i "" 's/appVersion:.*/appVersion: '"$fluid_version"'/' $chart/Chart.yaml

Copilot uses AI. Check for mistakes.
exit 1
fi

# All charts should be injected except for Fluid control-plane chart and library chart itself.
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

The comment says "All charts should be injected" but this script is about pinning versions, not injecting. It should say something like "Process all charts except for Fluid control-plane chart and library chart itself."

Suggested change
# All charts should be injected except for Fluid control-plane chart and library chart itself.
# Process all charts except for Fluid control-plane chart and library chart itself.

Copilot uses AI. Check for mistakes.
Signed-off-by: TzZtzt <trafalgarz@outlook.com>
@TrafalgarZZZ
Copy link
Member Author

/test fluid-e2e

- Add a try-except block to handle flaky potential exceptions when checking DataLoad status

Signed-off-by: TzZtzt <trafalgarz@outlook.com>
@TrafalgarZZZ
Copy link
Member Author

/retest

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 2, 2025

@TrafalgarZZZ
Copy link
Member Author

/test fluid-e2e

@fluid-e2e-bot
Copy link

fluid-e2e-bot bot commented Dec 2, 2025

@TrafalgarZZZ: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
fluid-e2e 2bfd8f4 link true /test fluid-e2e

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants